@stencil/core 4.20.0 → 4.21.0-dev.1724734910.f741f44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal",
3
- "version": "4.20.0",
3
+ "version": "4.21.0-dev.1724734910.f741f44",
4
4
  "description": "Stencil internals only to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -847,10 +847,10 @@ export interface SerializeDocumentOptions extends HydrateDocumentOptions {
847
847
  */
848
848
  removeHtmlComments?: boolean;
849
849
  /**
850
- * If set to `false` Stencil will ignore the fact that a component has a `shadow: true`
851
- * flag and serializes it as a scoped component. If set to `true` the component will
852
- * be rendered within a Declarative Shadow DOM.
853
- * @default false
850
+ * If set to `true` the component will be rendered within a Declarative Shadow DOM.
851
+ * If set to `false` Stencil will ignore the contents of the shadow root and render the
852
+ * element as given in provided template.
853
+ * @default true
854
854
  */
855
855
  serializeShadowRoot?: boolean;
856
856
  /**
@@ -1504,6 +1504,11 @@ export interface CopyTask {
1504
1504
  * the output target for which this copy operation is configured.
1505
1505
  */
1506
1506
  dest?: string;
1507
+ /**
1508
+ * An optional array of glob patterns to exclude from the copy operation.
1509
+ * @default ['**\/__mocks__/**', '**\/__fixtures__/**', '**\/dist/**', '**\/.{idea,git,cache,output,temp}/**', '**\/.ds_store', '**\/.gitignore', '**\/desktop.ini', '**\/thumbs.db']
1510
+ */
1511
+ ignore?: string[];
1507
1512
  /**
1508
1513
  * Whether or not Stencil should issue warnings if it cannot find the
1509
1514
  * specified source files or directories. Defaults to `false`.
@@ -1014,17 +1014,19 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
1014
1014
  if ((import_app_data7.BUILD.hydrateServerSide || import_app_data7.BUILD.hotModuleReplacement) && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1015
1015
  styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
1016
1016
  }
1017
- const injectStyle = (
1018
- /**
1019
- * we render a scoped component
1020
- */
1021
- !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) || /**
1022
- * we are using shadow dom and render the style tag within the shadowRoot
1023
- */
1024
- cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD"
1025
- );
1026
- if (injectStyle) {
1027
- styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
1017
+ if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
1018
+ if (styleContainerNode.nodeName === "HEAD") {
1019
+ const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
1020
+ const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : document.querySelector("style");
1021
+ styleContainerNode.insertBefore(styleElm, referenceNode2);
1022
+ } else if ("host" in styleContainerNode) {
1023
+ styleContainerNode.prepend(styleElm);
1024
+ } else {
1025
+ styleContainerNode.append(styleElm);
1026
+ }
1027
+ }
1028
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
1029
+ styleContainerNode.insertBefore(styleElm, null);
1028
1030
  }
1029
1031
  }
1030
1032
  if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
@@ -1132,7 +1134,11 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
1132
1134
  if (memberName === "list") {
1133
1135
  isProp = false;
1134
1136
  } else if (oldValue == null || elm[memberName] != n) {
1135
- elm[memberName] = n;
1137
+ if (typeof elm.__lookupSetter__(memberName) === "function") {
1138
+ elm[memberName] = n;
1139
+ } else {
1140
+ elm.setAttribute(memberName, n);
1141
+ }
1136
1142
  }
1137
1143
  } else {
1138
1144
  elm[memberName] = newValue;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/testing",
3
- "version": "4.20.0",
3
+ "version": "4.21.0-dev.1724734910.f741f44",
4
4
  "description": "Stencil internal testing platform to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.",
5
5
  "main": "./index.js",
6
6
  "private": true
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Mock Doc (CommonJS) v4.20.0 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc (CommonJS) v4.21.0-dev.1724734910.f741f44 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __defProp = Object.defineProperty;
@@ -7853,6 +7853,11 @@ patchPropAttributes(
7853
7853
  type: "submit"
7854
7854
  }
7855
7855
  );
7856
+ Object.defineProperty(MockButtonElement.prototype, "form", {
7857
+ get() {
7858
+ return this.hasAttribute("form") ? this.getAttribute("form") : null;
7859
+ }
7860
+ });
7856
7861
  var MockImageElement = class extends MockHTMLElement {
7857
7862
  constructor(ownerDocument) {
7858
7863
  super(ownerDocument, "img");
package/mock-doc/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Mock Doc v4.20.0 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc v4.21.0-dev.1724734910.f741f44 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
 
5
5
  // src/runtime/runtime-constants.ts
@@ -7800,6 +7800,11 @@ patchPropAttributes(
7800
7800
  type: "submit"
7801
7801
  }
7802
7802
  );
7803
+ Object.defineProperty(MockButtonElement.prototype, "form", {
7804
+ get() {
7805
+ return this.hasAttribute("form") ? this.getAttribute("form") : null;
7806
+ }
7807
+ });
7803
7808
  var MockImageElement = class extends MockHTMLElement {
7804
7809
  constructor(ownerDocument) {
7805
7810
  super(ownerDocument, "img");
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/mock-doc",
3
- "version": "4.20.0",
3
+ "version": "4.21.0-dev.1724734910.f741f44",
4
4
  "description": "Mock window, document and DOM outside of a browser environment.",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core",
3
- "version": "4.20.0",
3
+ "version": "4.21.0-dev.1724734910.f741f44",
4
4
  "license": "MIT",
5
5
  "main": "./internal/stencil-core/index.cjs",
6
6
  "module": "./internal/stencil-core/index.js",
@@ -96,11 +96,11 @@
96
96
  "build": "npm run clean && npm run tsc.prod && npm run ts scripts/index.ts -- --prod --ci",
97
97
  "build.watch": "npm run build -- --watch",
98
98
  "build.updateSelectorEngine": "npm run ts scripts/updateSelectorEngine.ts",
99
- "clean": "rm -rf build/ cli/ compiler/ dev-server/ internal/ mock-doc/ sys/ testing/ && npm run clean:scripts && npm run clean.screenshots",
100
- "clean.screenshots": "rm -rf test/end-to-end/screenshot/builds test/end-to-end/screenshot/images",
101
- "clean:scripts": "rm -rf scripts/build",
99
+ "clean": "rimraf build/ cli/ compiler/ dev-server/ internal/ mock-doc/ sys/ testing/ && npm run clean:scripts && npm run clean.screenshots",
100
+ "clean.screenshots": "rimraf test/end-to-end/screenshot/builds test/end-to-end/screenshot/images",
101
+ "clean:scripts": "rimraf scripts/build",
102
102
  "lint": "eslint 'bin/*' 'scripts/*.ts' 'scripts/**/*.ts' 'src/*.ts' 'src/**/*.ts' 'src/**/*.tsx' 'test/wdio/**/*.tsx'",
103
- "install.jest": "bash ./src/testing/jest/install-dependencies.sh",
103
+ "install.jest": "npx tsx ./src/testing/jest/install-dependencies.mts",
104
104
  "prettier": "npm run prettier.base -- --write",
105
105
  "prettier.base": "prettier --cache \"./({bin,scripts,src,test}/**/*.{ts,tsx,js,jsx})|bin/stencil|.github/(**/)?*.(yml|yaml)|*.js\"",
106
106
  "prettier.dry-run": "npm run prettier.base -- --list-different",
@@ -112,6 +112,7 @@
112
112
  "test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --coverage",
113
113
  "test.analysis": "cd test && npm run analysis.build-and-analyze",
114
114
  "test.bundlers": "cd test && npm run bundlers",
115
+ "test.copytask": "cd test/copy-task && npm ci && npm run test",
115
116
  "test.dist": "npm run ts scripts/index.ts -- --validate-build",
116
117
  "test.end-to-end": "cd test/end-to-end && npm ci && npm test && npm run test.dist",
117
118
  "test.jest": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js",
@@ -158,7 +159,7 @@
158
159
  "eslint": "^8.23.1",
159
160
  "eslint-config-prettier": "^9.0.0",
160
161
  "eslint-plugin-jest": "^28.0.0",
161
- "eslint-plugin-jsdoc": "^48.0.0",
162
+ "eslint-plugin-jsdoc": "^50.0.0",
162
163
  "eslint-plugin-simple-import-sort": "^12.0.0",
163
164
  "eslint-plugin-wdio": "^8.24.12",
164
165
  "execa": "9.3.0",
@@ -184,6 +185,7 @@
184
185
  "prettier": "3.3.1",
185
186
  "prompts": "2.4.2",
186
187
  "puppeteer": "^21.0.0",
188
+ "rimraf": "^6.0.1",
187
189
  "rollup": "2.56.3",
188
190
  "semver": "^7.3.7",
189
191
  "terser": "5.31.1",
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Screenshot v4.20.0 | MIT Licensed | https://stenciljs.com
2
+ Stencil Screenshot v4.21.0-dev.1724734910.f741f44 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __create = Object.create;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/screenshot",
3
- "version": "4.20.0",
3
+ "version": "4.21.0-dev.1724734910.f741f44",
4
4
  "description": "Stencil Screenshot.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Screenshot Pixel Match v4.20.0 | MIT Licensed | https://stenciljs.com
2
+ Stencil Screenshot Pixel Match v4.21.0-dev.1724734910.f741f44 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __create = Object.create;