You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@ui5/create-webcomponents-package

Package Overview
Dependencies
Maintainers
8
Versions
403
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ui5/create-webcomponents-package - npm Package Compare versions

Comparing version

to
2.11.0-rc.3

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [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)
### Bug Fixes
* create new package script on windows ([#11555](https://github.com/SAP/ui5-webcomponents/issues/11555)) ([2a60bc0](https://github.com/SAP/ui5-webcomponents/commit/2a60bc09d76d08a6d168ae2041d8c472d38e7cc1))
# [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)

@@ -8,0 +19,0 @@

51

create-package.js

@@ -7,3 +7,2 @@ #!/usr/bin/env node

import yargs from "yargs/yargs";
import { globby } from "globby";
import { hideBin } from "yargs/helpers";

@@ -23,8 +22,13 @@ import { fileURLToPath } from "url";

const SRC_DIR = path.join(__dirname, "template");
const DEST_DIR = process.cwd();
const FILES_TO_RENAME = {
"npmrc": ".npmrc",
"env": ".env",
"gitignore": ".gitignore",
"tsconfig.template.json": "tsconfig.json",
"cypress/tsconfig.template.json": "cypress/tsconfig.json"
[path.normalize("eslintignore")]: path.normalize(".eslintignore"),
[path.normalize("eslintrc.cjs")]: path.normalize(".eslintrc.cjs"),
[path.normalize("npsrc.json")]: path.normalize(".npsrc.json"),
[path.normalize("npmrc")]: path.normalize(".npmrc"),
[path.normalize("env")]: path.normalize(".env"),
[path.normalize("gitignore")]: path.normalize(".gitignore"),
[path.normalize("tsconfig.template.json")]: path.normalize("tsconfig.json"),
[path.normalize("cypress/tsconfig.template.json")]: path.normalize("cypress/tsconfig.json")
};

@@ -45,2 +49,17 @@ const FILES_TO_COPY = ["test/pages/img/logo.png"];

async function collectFiles(dir, fileList = []) {
const entries = await fs.readdir(dir, { withFileTypes: true });
for (const entry of entries) {
const fullPath = path.join(dir, entry.name);
if (entry.isDirectory()) {
await collectFiles(fullPath, fileList);
} else if (entry.isFile()) {
fileList.push(fullPath);
}
}
return fileList;
}
/**

@@ -93,4 +112,4 @@ * Hyphanates the given PascalCase string, f.e.:

const destDir = skipSubfolder
? path.join("./")
: path.join("./", packageBaseName);
? path.join(DEST_DIR)
: path.join(DEST_DIR, packageBaseName);

@@ -115,5 +134,5 @@ await processFiles(destDir, vars, testSetup);

async function processFiles(destDir, replacements, testSetup) {
const files = await globby(`${SRC_DIR}/**/*`, { dot: true });
const files = await collectFiles(SRC_DIR);
const FILE_PATHS_TO_SKIP = [
testSetup !== "cypress" ? "cypress" : undefined,
testSetup !== "cypress" ? path.normalize("cypress") : undefined,
].filter(Boolean);

@@ -130,7 +149,7 @@

// Component related file based on the user input
destPath = destPath.replace(
"/MyFirstComponent",
`/${replacements.INIT_PACKAGE_VAR_CLASS_NAME}`,
);
// // Component related file based on the user input
// destPath = destPath.replace(
// "MyFirstComponent",
// replacements.INIT_PACKAGE_VAR_CLASS_NAME,
// );

@@ -190,3 +209,3 @@ // Files that need to be renamed

let packageName = argv.name || "my-package";
let componentName = "MyComponent";
let componentName = "MyFirstComponent";
let testSetup = argv.testSetup || "manual";

@@ -193,0 +212,0 @@ const skipSubfolder = !!argv.skipSubfolder;

{
"name": "@ui5/create-webcomponents-package",
"version": "2.11.0-rc.2",
"version": "2.11.0-rc.3",
"description": "UI5 Web Components: create package",

@@ -23,3 +23,2 @@ "author": "SAP SE (https://www.sap.com)",

"dependencies": {
"globby": "^13.1.1",
"mkdirp": "^1.0.4",

@@ -31,3 +30,3 @@ "npm-config-user-agent-parser": "^1.0.0",

},
"gitHead": "ee469c159184053263f933da57457025a8ac7ddb"
"gitHead": "74e76986dcd0c20ea4cbd6441702c8e72a00b6d3"
}