@stencil/cli 5.0.0-alpha.12 → 5.0.0-alpha.14

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.
Files changed (2) hide show
  1. package/dist/index.mjs +40 -16
  2. package/package.json +4 -4
package/dist/index.mjs CHANGED
@@ -750,21 +750,24 @@ const KNOWN_INTEGRATIONS = [
750
750
  displayName: "React",
751
751
  description: "React component wrappers",
752
752
  group: "Framework integrations",
753
- requiresStencilConfig: true
753
+ requiresStencilConfig: true,
754
+ needsWorkspace: true
754
755
  },
755
756
  {
756
757
  package: "@stencil/angular-output-target",
757
758
  displayName: "Angular",
758
759
  description: "Angular component wrappers",
759
760
  group: "Framework integrations",
760
- requiresStencilConfig: true
761
+ requiresStencilConfig: true,
762
+ needsWorkspace: true
761
763
  },
762
764
  {
763
765
  package: "@stencil/vue-output-target",
764
766
  displayName: "Vue",
765
767
  description: "Vue component wrappers",
766
768
  group: "Framework integrations",
767
- requiresStencilConfig: true
769
+ requiresStencilConfig: true,
770
+ needsWorkspace: true
768
771
  }
769
772
  ];
770
773
  async function promptOutputs() {
@@ -896,7 +899,7 @@ async function promptIntegrations() {
896
899
  return KNOWN_INTEGRATIONS.filter((i) => picks.includes(i.package));
897
900
  }
898
901
  function hasFrameworkTargets(integrations) {
899
- return integrations.some((i) => i.group === "Framework integrations");
902
+ return integrations.some((i) => i.needsWorkspace);
900
903
  }
901
904
  function needsStencilConfig(integrations) {
902
905
  return integrations.some((i) => i.requiresStencilConfig);
@@ -1029,7 +1032,7 @@ async function isExistingStencilProject(dir) {
1029
1032
  }
1030
1033
  //#endregion
1031
1034
  //#region src/wizard/splash.ts
1032
- const CLI_VERSION = "5.0.0-alpha.12";
1035
+ const CLI_VERSION = "5.0.0-alpha.14";
1033
1036
  const isTTY = process.stdout.isTTY;
1034
1037
  const noColor = !isTTY || "NO_COLOR" in process.env;
1035
1038
  const RESET = noColor ? "" : "\x1B[0m";
@@ -3604,6 +3607,37 @@ async function copyTemplate(rootDir, projectName, namespace, stencilVersion) {
3604
3607
  else await writeIfAbsent(destPath, content);
3605
3608
  }
3606
3609
  }
3610
+ const PARCEL_WATCHER_BUILD_ALLOWANCES = [
3611
+ `onlyBuiltDependencies:`,
3612
+ ` - '@parcel/watcher'`,
3613
+ ``,
3614
+ `allowBuilds:`,
3615
+ ` '@parcel/watcher': true`
3616
+ ].join("\n");
3617
+ async function mergePnpmWorkspaceYaml(yamlPath) {
3618
+ let existing = null;
3619
+ try {
3620
+ existing = await readFile(yamlPath, "utf8");
3621
+ } catch {}
3622
+ if (existing === null) {
3623
+ await writeFile(yamlPath, [
3624
+ `packages:`,
3625
+ ` - 'packages/*'`,
3626
+ ``,
3627
+ PARCEL_WATCHER_BUILD_ALLOWANCES,
3628
+ ``
3629
+ ].join("\n"), "utf8");
3630
+ return;
3631
+ }
3632
+ let toAppend = "";
3633
+ if (!existing.includes("packages/*")) toAppend += `\npackages:\n - 'packages/*'\n`;
3634
+ if (!existing.includes("onlyBuiltDependencies:")) toAppend += `\nonlyBuiltDependencies:\n - '@parcel/watcher'\n`;
3635
+ if (!existing.includes("allowBuilds:")) toAppend += `\nallowBuilds:\n '@parcel/watcher': true\n`;
3636
+ if (toAppend) {
3637
+ const separator = existing.endsWith("\n") ? "" : "\n";
3638
+ await writeFile(yamlPath, existing + separator + toAppend, "utf8");
3639
+ }
3640
+ }
3607
3641
  async function writeIfAbsent(destPath, content) {
3608
3642
  try {
3609
3643
  await writeFile(destPath, content, {
@@ -3720,17 +3754,7 @@ async function scaffoldWorkspaceRoot(cwd, projectName) {
3720
3754
  delete pkg.dependencies;
3721
3755
  delete pkg.devDependencies;
3722
3756
  await writeFile(pkgPath, JSON.stringify(pkg, null, 2) + "\n", "utf8");
3723
- if (usePnpmYaml) {
3724
- const yamlPath = join(cwd, "pnpm-workspace.yaml");
3725
- try {
3726
- await writeFile(yamlPath, `packages:\n - 'packages/*'\n`, {
3727
- encoding: "utf8",
3728
- flag: "wx"
3729
- });
3730
- } catch (e) {
3731
- if (e.code !== "EEXIST") throw e;
3732
- }
3733
- }
3757
+ if (usePnpmYaml) await mergePnpmWorkspaceYaml(join(cwd, "pnpm-workspace.yaml"));
3734
3758
  }
3735
3759
  /**
3736
3760
  * Write output-driven distributable fields (type, module, types) into package.json.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/cli",
3
- "version": "5.0.0-alpha.12",
3
+ "version": "5.0.0-alpha.14",
4
4
  "description": "CLI for Stencil - Web component compiler",
5
5
  "keywords": [
6
6
  "components",
@@ -41,13 +41,13 @@
41
41
  "nypm": "^0.3.12",
42
42
  "std-env": "^3.8.0",
43
43
  "typescript": ">4.0.0 <7.0.0",
44
- "@stencil/dev-server": "5.0.0-alpha.12",
45
- "@stencil/templates": "5.0.0-alpha.12"
44
+ "@stencil/templates": "5.0.0-alpha.14",
45
+ "@stencil/dev-server": "5.0.0-alpha.14"
46
46
  },
47
47
  "devDependencies": {
48
48
  "tsdown": ">=0.21.0 <1.0.0",
49
49
  "vitest": "^4.1.7",
50
- "@stencil/core": "5.0.0-alpha.12"
50
+ "@stencil/core": "5.0.0-alpha.14"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "@stencil/core": "^5.0.0-0"