feat(core, config): update WebComponent base class
- update to WebComponent v2.0.0 - provide new auto imports: html, attachEffect
This commit is contained in:
parent
9736015c29
commit
1cafa7326f
5 changed files with 17 additions and 17 deletions
24
package-lock.json
generated
24
package-lock.json
generated
|
@ -3850,9 +3850,9 @@
|
||||||
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
||||||
},
|
},
|
||||||
"node_modules/web-component-base": {
|
"node_modules/web-component-base": {
|
||||||
"version": "1.11.2",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/web-component-base/-/web-component-base-1.11.2.tgz",
|
"resolved": "https://registry.npmjs.org/web-component-base/-/web-component-base-2.0.0.tgz",
|
||||||
"integrity": "sha512-I3IQyyi4Nd1clUfmTaPUQiU3I/pKSN+wrP5w6Imy0ItANmBZhb89aEbIXbbwJ2cNghu/Xr3islHs0UjsT564ig=="
|
"integrity": "sha512-2YL9WFWwPyf6S6n+bRHWqcfHl/1nBUHoI9UBXgMOTmMkvloxc8iHgyYRVlyIQRXdBfOmHLr9wr1CBoWvgNxtsg=="
|
||||||
},
|
},
|
||||||
"node_modules/webidl-conversions": {
|
"node_modules/webidl-conversions": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
|
@ -3989,17 +3989,17 @@
|
||||||
},
|
},
|
||||||
"packages/config": {
|
"packages/config": {
|
||||||
"name": "@mcflyjs/config",
|
"name": "@mcflyjs/config",
|
||||||
"version": "0.0.15",
|
"version": "0.1.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@mcflyjs/core": "latest",
|
"@mcflyjs/core": "latest",
|
||||||
"web-component-base": "latest"
|
"web-component-base": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"packages/config/node_modules/@mcflyjs/core": {
|
"packages/config/node_modules/@mcflyjs/core": {
|
||||||
"version": "0.4.3",
|
"version": "0.4.4",
|
||||||
"resolved": "https://registry.npmjs.org/@mcflyjs/core/-/core-0.4.3.tgz",
|
"resolved": "https://registry.npmjs.org/@mcflyjs/core/-/core-0.4.4.tgz",
|
||||||
"integrity": "sha512-I426r4hRdfCwEQclER9eQp/RRhSlr7AFCJD8UhuCtAZL5aGYd/aiJsWJGb9lmLyCCFgcTA1VfZnZtqh8wqJLUw==",
|
"integrity": "sha512-qwFehS5LOO2KLQCihYJs/weYE71YyuoECbndmFd0DqDZHNPfHMhL+ukMerQW/kAsDJx7PCROXnD6tUbBNZV6cw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"esprima": "^4.0.1",
|
"esprima": "^4.0.1",
|
||||||
"h3": "^1.8.2",
|
"h3": "^1.8.2",
|
||||||
|
@ -4008,7 +4008,7 @@
|
||||||
},
|
},
|
||||||
"packages/core": {
|
"packages/core": {
|
||||||
"name": "@mcflyjs/core",
|
"name": "@mcflyjs/core",
|
||||||
"version": "0.4.4",
|
"version": "0.5.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"esprima": "^4.0.1",
|
"esprima": "^4.0.1",
|
||||||
|
@ -4072,9 +4072,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"templates/basic/node_modules/@mcflyjs/core": {
|
"templates/basic/node_modules/@mcflyjs/core": {
|
||||||
"version": "0.4.3",
|
"version": "0.4.4",
|
||||||
"resolved": "https://registry.npmjs.org/@mcflyjs/core/-/core-0.4.3.tgz",
|
"resolved": "https://registry.npmjs.org/@mcflyjs/core/-/core-0.4.4.tgz",
|
||||||
"integrity": "sha512-I426r4hRdfCwEQclER9eQp/RRhSlr7AFCJD8UhuCtAZL5aGYd/aiJsWJGb9lmLyCCFgcTA1VfZnZtqh8wqJLUw==",
|
"integrity": "sha512-qwFehS5LOO2KLQCihYJs/weYE71YyuoECbndmFd0DqDZHNPfHMhL+ukMerQW/kAsDJx7PCROXnD6tUbBNZV6cw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"esprima": "^4.0.1",
|
"esprima": "^4.0.1",
|
||||||
"h3": "^1.8.2",
|
"h3": "^1.8.2",
|
||||||
|
|
|
@ -25,7 +25,7 @@ export default function () {
|
||||||
presets: [
|
presets: [
|
||||||
{
|
{
|
||||||
from: "web-component-base/WebComponent",
|
from: "web-component-base/WebComponent",
|
||||||
imports: ["WebComponent"],
|
imports: ["WebComponent", "html", "attachEffect"],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
from: "@mcflyjs/core",
|
from: "@mcflyjs/core",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@mcflyjs/config",
|
"name": "@mcflyjs/config",
|
||||||
"version": "0.0.15",
|
"version": "0.1.0",
|
||||||
"description": "Nitro configuration for McFly apps",
|
"description": "Nitro configuration for McFly apps",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
|
@ -20,6 +20,6 @@
|
||||||
"homepage": "https://github.com/ayoayco/McFly#readme",
|
"homepage": "https://github.com/ayoayco/McFly#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@mcflyjs/core": "latest",
|
"@mcflyjs/core": "latest",
|
||||||
"web-component-base": "latest"
|
"web-component-base": "^2.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,7 +142,7 @@ async function buildRegistry(usedCustomElements, type, storage) {
|
||||||
!isBaseClassImported &&
|
!isBaseClassImported &&
|
||||||
content.toString().includes("extends WebComponent")
|
content.toString().includes("extends WebComponent")
|
||||||
) {
|
) {
|
||||||
const baseClassImport = `import { WebComponent } from "https://unpkg.com/web-component-base@1.13.2/WebComponent.min.js";`;
|
const baseClassImport = `import { WebComponent, html, attachEffect } from "https://unpkg.com/web-component-base@2.0.0/index.js";`;
|
||||||
registryScript += baseClassImport;
|
registryScript += baseClassImport;
|
||||||
isBaseClassImported = true;
|
isBaseClassImported = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@mcflyjs/core",
|
"name": "@mcflyjs/core",
|
||||||
"version": "0.4.4",
|
"version": "0.5.0",
|
||||||
"description": "McFly core package",
|
"description": "McFly core package",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
|
|
Loading…
Reference in a new issue