@ui5/create-webcomponents-package 2.11.0-rc.1 → 2.11.0-rc.3

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.11.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v2.11.0-rc.2...v2.11.0-rc.3) (2025-05-29)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * create new package script on windows ([#11555](https://github.com/SAP/ui5-webcomponents/issues/11555)) ([2a60bc0](https://github.com/SAP/ui5-webcomponents/commit/2a60bc09d76d08a6d168ae2041d8c472d38e7cc1))
12
+
13
+
14
+
15
+
16
+
17
+ # [2.11.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v2.11.0-rc.1...v2.11.0-rc.2) (2025-05-22)
18
+
19
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
20
+
21
+
22
+
23
+
24
+
6
25
  # [2.11.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v2.11.0-rc.0...v2.11.0-rc.1) (2025-05-15)
7
26
 
8
27
  **Note:** Version bump only for package @ui5/create-webcomponents-package
package/create-package.js CHANGED
@@ -4,7 +4,6 @@ import path, { dirname } from "path";
4
4
  import prompts from "prompts";
5
5
  import parser from "npm-config-user-agent-parser";
6
6
  import yargs from "yargs/yargs";
7
- import { globby } from "globby";
8
7
  import { hideBin } from "yargs/helpers";
9
8
  import { fileURLToPath } from "url";
10
9
  import * as prettier from "prettier";
@@ -19,12 +18,17 @@ const VERSION = JSON.parse(
19
18
  // Constants
20
19
  const SUPPORTED_TEST_SETUPS = ["cypress", "manual"];
21
20
  const SRC_DIR = path.join(__dirname, "template");
21
+ const DEST_DIR = process.cwd();
22
+
22
23
  const FILES_TO_RENAME = {
23
- "npmrc": ".npmrc",
24
- "env": ".env",
25
- "gitignore": ".gitignore",
26
- "tsconfig.template.json": "tsconfig.json",
27
- "cypress/tsconfig.template.json": "cypress/tsconfig.json"
24
+ [path.normalize("eslintignore")]: path.normalize(".eslintignore"),
25
+ [path.normalize("eslintrc.cjs")]: path.normalize(".eslintrc.cjs"),
26
+ [path.normalize("npsrc.json")]: path.normalize(".npsrc.json"),
27
+ [path.normalize("npmrc")]: path.normalize(".npmrc"),
28
+ [path.normalize("env")]: path.normalize(".env"),
29
+ [path.normalize("gitignore")]: path.normalize(".gitignore"),
30
+ [path.normalize("tsconfig.template.json")]: path.normalize("tsconfig.json"),
31
+ [path.normalize("cypress/tsconfig.template.json")]: path.normalize("cypress/tsconfig.json")
28
32
  };
29
33
  const FILES_TO_COPY = ["test/pages/img/logo.png"];
30
34
 
@@ -40,6 +44,21 @@ const isTagValid = tag => typeof tag === "string" && TagPattern.test(tag);
40
44
  const isTestSetupValid = setup =>
41
45
  typeof setup === "string" && SUPPORTED_TEST_SETUPS.includes(setup);
42
46
 
47
+ async function collectFiles(dir, fileList = []) {
48
+ const entries = await fs.readdir(dir, { withFileTypes: true });
49
+
50
+ for (const entry of entries) {
51
+ const fullPath = path.join(dir, entry.name);
52
+ if (entry.isDirectory()) {
53
+ await collectFiles(fullPath, fileList);
54
+ } else if (entry.isFile()) {
55
+ fileList.push(fullPath);
56
+ }
57
+ }
58
+
59
+ return fileList;
60
+ }
61
+
43
62
  /**
44
63
  * Hyphanates the given PascalCase string, f.e.:
45
64
  * Foo -> "my-foo" (adds preffix)
@@ -87,8 +106,8 @@ const generateFilesContent = async (
87
106
  ? packageName.slice(packageName.lastIndexOf("/") + 1)
88
107
  : packageName;
89
108
  const destDir = skipSubfolder
90
- ? path.join("./")
91
- : path.join("./", packageBaseName);
109
+ ? path.join(DEST_DIR)
110
+ : path.join(DEST_DIR, packageBaseName);
92
111
 
93
112
  await processFiles(destDir, vars, testSetup);
94
113
 
@@ -108,9 +127,9 @@ const generateFilesContent = async (
108
127
  };
109
128
 
110
129
  async function processFiles(destDir, replacements, testSetup) {
111
- const files = await globby(`${SRC_DIR}/**/*`, { dot: true });
130
+ const files = await collectFiles(SRC_DIR);
112
131
  const FILE_PATHS_TO_SKIP = [
113
- testSetup !== "cypress" ? "cypress" : undefined,
132
+ testSetup !== "cypress" ? path.normalize("cypress") : undefined,
114
133
  ].filter(Boolean);
115
134
 
116
135
  for (const file of files) {
@@ -122,11 +141,11 @@ async function processFiles(destDir, replacements, testSetup) {
122
141
  continue;
123
142
  }
124
143
 
125
- // Component related file based on the user input
126
- destPath = destPath.replace(
127
- "/MyFirstComponent",
128
- `/${replacements.INIT_PACKAGE_VAR_CLASS_NAME}`,
129
- );
144
+ // // Component related file based on the user input
145
+ // destPath = destPath.replace(
146
+ // "MyFirstComponent",
147
+ // replacements.INIT_PACKAGE_VAR_CLASS_NAME,
148
+ // );
130
149
 
131
150
  // Files that need to be renamed
132
151
  if (FILES_TO_RENAME[relativePath]) {
@@ -181,7 +200,7 @@ const createWebcomponentsPackage = async () => {
181
200
  }
182
201
 
183
202
  let packageName = argv.name || "my-package";
184
- let componentName = "MyComponent";
203
+ let componentName = "MyFirstComponent";
185
204
  let testSetup = argv.testSetup || "manual";
186
205
  const skipSubfolder = !!argv.skipSubfolder;
187
206
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/create-webcomponents-package",
3
- "version": "2.11.0-rc.1",
3
+ "version": "2.11.0-rc.3",
4
4
  "description": "UI5 Web Components: create package",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -20,12 +20,11 @@
20
20
  "directory": "packages/create-package"
21
21
  },
22
22
  "dependencies": {
23
- "globby": "^13.1.1",
24
23
  "mkdirp": "^1.0.4",
25
24
  "npm-config-user-agent-parser": "^1.0.0",
26
25
  "prettier": "^3.5.3",
27
26
  "prompts": "^2.4.1",
28
27
  "yargs": "^17.5.1"
29
28
  },
30
- "gitHead": "8702780b18c6100b879cab8d93ca992a944868e0"
29
+ "gitHead": "74e76986dcd0c20ea4cbd6441702c8e72a00b6d3"
31
30
  }