mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
merge release-6.3.5
Release 6.3.5
This commit is contained in:
@ -3,6 +3,17 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [6.3.5](https://github.com/ionic-team/ionic/compare/v6.3.4...v6.3.5) (2022-11-09)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **vue:** generate web-types for components ([#26205](https://github.com/ionic-team/ionic/issues/26205)) ([1f7fc8f](https://github.com/ionic-team/ionic/commit/1f7fc8f05c03316560e0b58c3bf58db6b189d0e1)), closes [#26198](https://github.com/ionic-team/ionic/issues/26198)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [6.3.4](https://github.com/ionic-team/ionic/compare/v6.3.3...v6.3.4) (2022-11-02)
|
||||
|
||||
**Note:** Version bump only for package @ionic/vue
|
||||
|
18
packages/vue/package-lock.json
generated
18
packages/vue/package-lock.json
generated
@ -1,15 +1,15 @@
|
||||
{
|
||||
"name": "@ionic/vue",
|
||||
"version": "6.3.4",
|
||||
"version": "6.3.5",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@ionic/vue",
|
||||
"version": "6.3.4",
|
||||
"version": "6.3.5",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@ionic/core": "^6.3.4",
|
||||
"@ionic/core": "^6.3.5",
|
||||
"ionicons": "^6.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -59,9 +59,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@ionic/core": {
|
||||
"version": "6.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.4.tgz",
|
||||
"integrity": "sha512-3EnKqFdon7Im8JNvuPoq/iGyYK7hskdb9u5hlQE0fHU/9Q0DvFVh17QTq1sQjXntoJovfRhaPJhG+kvZK3mVAQ==",
|
||||
"version": "6.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.5.tgz",
|
||||
"integrity": "sha512-srAZbD1ThJPNHr/6WolC89PFnJ8AA+MKYkZF/Wjq7ysHO+qdg5gP5GtlEN/sfO8DM5J3GZHEbRW3m+jCepNoxA==",
|
||||
"dependencies": {
|
||||
"@stencil/core": "^2.18.0",
|
||||
"ionicons": "^6.0.3",
|
||||
@ -768,9 +768,9 @@
|
||||
}
|
||||
},
|
||||
"@ionic/core": {
|
||||
"version": "6.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.4.tgz",
|
||||
"integrity": "sha512-3EnKqFdon7Im8JNvuPoq/iGyYK7hskdb9u5hlQE0fHU/9Q0DvFVh17QTq1sQjXntoJovfRhaPJhG+kvZK3mVAQ==",
|
||||
"version": "6.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.5.tgz",
|
||||
"integrity": "sha512-srAZbD1ThJPNHr/6WolC89PFnJ8AA+MKYkZF/Wjq7ysHO+qdg5gP5GtlEN/sfO8DM5J3GZHEbRW3m+jCepNoxA==",
|
||||
"requires": {
|
||||
"@stencil/core": "^2.18.0",
|
||||
"ionicons": "^6.0.3",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ionic/vue",
|
||||
"version": "6.3.4",
|
||||
"version": "6.3.5",
|
||||
"description": "Vue specific wrapper for @ionic/core",
|
||||
"scripts": {
|
||||
"prepublishOnly": "npm run build",
|
||||
@ -61,7 +61,7 @@
|
||||
"vue-router": "^4.0.16"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ionic/core": "^6.3.4",
|
||||
"@ionic/core": "^6.3.5",
|
||||
"ionicons": "^6.0.2"
|
||||
},
|
||||
"vetur": {
|
||||
|
@ -1,16 +1,37 @@
|
||||
const fs = require("fs")
|
||||
const docs = require("@ionic/core/dist/docs.json")
|
||||
const { pascalCase } = require('change-case')
|
||||
const fs = require("fs");
|
||||
const docs = require("@ionic/core/dist/docs.json");
|
||||
const { pascalCase } = require("change-case");
|
||||
|
||||
const components = []
|
||||
const components = [];
|
||||
|
||||
for (const component of docs.components) {
|
||||
if (!component.usage.vue) continue
|
||||
const attributes = []
|
||||
const slots = []
|
||||
const events = []
|
||||
const componentName = pascalCase(component.tag)
|
||||
const docUrl = "https://ionicframework.com/docs/api/" + component.tag.substr(4)
|
||||
/**
|
||||
* The list of tag names to ignore generating web types for.
|
||||
*/
|
||||
const excludeComponents = [
|
||||
"ion-app",
|
||||
"ion-icon",
|
||||
"ion-nav",
|
||||
"ion-nav-link",
|
||||
"ion-router",
|
||||
"ion-route-redirect",
|
||||
"ion-router-link",
|
||||
"ion-router-outlet",
|
||||
];
|
||||
|
||||
/**
|
||||
* The filtered set of components to generate web types for.
|
||||
*/
|
||||
const filteredComponents = docs.components.filter(
|
||||
(c) => !excludeComponents.includes(c.tag)
|
||||
);
|
||||
|
||||
for (const component of filteredComponents) {
|
||||
const attributes = [];
|
||||
const slots = [];
|
||||
const events = [];
|
||||
const componentName = pascalCase(component.tag);
|
||||
const docUrl =
|
||||
"https://ionicframework.com/docs/api/" + component.tag.substr(4);
|
||||
|
||||
for (const prop of component.props || []) {
|
||||
attributes.push({
|
||||
@ -20,9 +41,9 @@ for (const component of docs.components) {
|
||||
default: prop.default,
|
||||
value: {
|
||||
kind: "expression",
|
||||
type: prop.type
|
||||
}
|
||||
})
|
||||
type: prop.type,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
for (const event of component.events || []) {
|
||||
@ -33,18 +54,20 @@ for (const component of docs.components) {
|
||||
events.push({
|
||||
name: eventName,
|
||||
description: event.docs,
|
||||
arguments: [{
|
||||
name: "detail",
|
||||
type: event.detail
|
||||
}]
|
||||
})
|
||||
arguments: [
|
||||
{
|
||||
name: "detail",
|
||||
type: event.detail,
|
||||
},
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
for (const slot of component.slots || []) {
|
||||
slots.push({
|
||||
name: slot.name === "" ? "default" : slot.name,
|
||||
description: slot.docs
|
||||
})
|
||||
description: slot.docs,
|
||||
});
|
||||
}
|
||||
|
||||
components.push({
|
||||
@ -52,13 +75,17 @@ for (const component of docs.components) {
|
||||
"doc-url": docUrl,
|
||||
description: component.docs,
|
||||
source: {
|
||||
module: "@ionic/core/" + component.filePath.replace("./src/", "dist/types/").replace(".tsx", ".d.ts"),
|
||||
symbol: componentName.substr(3)
|
||||
module:
|
||||
"@ionic/core/" +
|
||||
component.filePath
|
||||
.replace("./src/", "dist/types/")
|
||||
.replace(".tsx", ".d.ts"),
|
||||
symbol: componentName.substr(3),
|
||||
},
|
||||
attributes,
|
||||
slots,
|
||||
events
|
||||
})
|
||||
events,
|
||||
});
|
||||
}
|
||||
|
||||
const webTypes = {
|
||||
@ -70,9 +97,9 @@ const webTypes = {
|
||||
html: {
|
||||
"types-syntax": "typescript",
|
||||
"description-markup": "markdown",
|
||||
tags: components
|
||||
}
|
||||
}
|
||||
}
|
||||
tags: components,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
fs.writeFileSync("dist/web-types.json", JSON.stringify(webTypes, null, 2))
|
||||
fs.writeFileSync("dist/web-types.json", JSON.stringify(webTypes, null, 2));
|
||||
|
Reference in New Issue
Block a user