Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,28 @@ jobs:
- name: Install dependencies
run: npm ci --engine-strict # --engine-strict is used to fail-fast if deps require node versions unsupported by the repo

- name: Check package.json "engines" consistency
run: |
node << 'EOF'
const { execSync } = require('child_process');
const fs = require('fs');

const rootPkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
const workspaces = JSON.parse(execSync('npm query .workspace --json', { encoding: 'utf8' }));

let hasError = false;
workspaces.forEach(pkg => {
if (JSON.stringify(pkg.engines) !== JSON.stringify(rootPkg.engines)) {
console.error(`❌ ${pkg.location}/package.json "engines" mismatch with root package.json`);
hasError = true;
}
});

if (hasError) process.exit(1);
console.log('✅ All workspace packages "engines" are consistent with root package.json');

EOF

- name: Perform ESLint check
run: npm run lint

Expand Down
16 changes: 16 additions & 0 deletions ava.common.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export default {
files: [
"test/lib/**/*.js",
"!test/**/__helper__/**"
],
watchMode: {
ignoreChanges: [
"test/tmp/**"
],
},
nodeArguments: [
"--loader=esmock",
"--no-warnings"
],
workerThreads: false,
};
4 changes: 4 additions & 0 deletions internal/benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"private": true,
"license": "Apache-2.0",
"type": "module",
"engines": {
"node": "^22.20.0 || >=24.0.0",
"npm": ">= 8"
},
"bin": {
"ui5-cli-benchmark": "./cli.js"
},
Expand Down
29 changes: 7 additions & 22 deletions internal/shrinkwrap-extractor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
"test": "npm run lint && npm run coverage && npm run depcheck",
"unit": "node --test test/lib/convertToShrinkwrap.js",
"unit-watch": "node --test --watch test/lib/convertToShrinkwrap.js",
"coverage": "nyc node --test test/lib/convertToShrinkwrap.js",
"coverage": "node --test --experimental-test-coverage 'test/lib/convertToShrinkwrap.js'",
"lint": "eslint .",
"depcheck": "depcheck --ignores @ui5/shrinkwrap-extractor,@eslint/js,eslint-config-google,globals,nyc"
"depcheck": "depcheck"
},
"keywords": [
"npm",
Expand All @@ -34,32 +34,17 @@
"dependencies"
],
"type": "module",
"engines": {
"node": "^22.20.0 || >=24.0.0",
"npm": ">= 8"
},
"dependencies": {
"@npmcli/arborist": "^9.1.7",
"@npmcli/config": "^10.4.0",
"pacote": "^21.0.4"
},
"devDependencies": {
"@eslint/js": "^9.39.1",
"depcheck": "^1.4.7",
"eslint-config-google": "^0.14.0",
"globals": "^16.5.0",
"nyc": "^17.1.0"
},
"nyc": {
"reporter": [
"lcov",
"text",
"text-summary"
],
"exclude": [
"coverage/**",
"test/**"
],
"check-coverage": true,
"statements": 80,
"branches": 75,
"functions": 75,
"lines": 80
"eslint": "^9.39.1"
}
}
33 changes: 33 additions & 0 deletions nyc.common.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
export default {
"reporter": [
"lcov",
"text",
"text-summary"
],
"exclude": [
"coverage/**",
"test/**",
"*.config.js"
],
"check-coverage": true,
"watermarks": {
"statements": [
70,
90
],
"branches": [
70,
90
],
"functions": [
70,
90
],
"lines": [
70,
90
]
},
"cache": true,
"all": true
};
34 changes: 10 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"coverage": "npm run coverage --workspaces --if-present",
"depcheck": "depcheck --ignores @ui5/builder,@ui5/cli,@ui5/fs,@ui5/logger,@ui5/project,@ui5/server,local-web-server,@commitlint/config-conventional,husky && npm run depcheck --workspaces --if-present",
"check-licenses": "licensee --errors-only",
"schema-generate": "npm run schema-generate --workspace=@ui5/documentation",
"generate-cli-doc": "npm run generate-cli-doc --workspace=@ui5/documentation"
},
"repository": {
Expand Down
3 changes: 3 additions & 0 deletions packages/builder/ava.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import avaCommonConfig from "../../ava.common.config.js";

export default avaCommonConfig;
12 changes: 12 additions & 0 deletions packages/builder/nyc.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import nycCommonConfig from "../../nyc.common.config.js";

// Exclude jsdoc library files from coverage as they are originally maintained at https://github.com/UI5/openui5/tree/master/lib/jsdoc

Check warning on line 3 in packages/builder/nyc.config.js

View check run for this annotation

In Solidarity / Inclusive Language

Match Found

You might want to consider an alternative to the term "master". Possibilities might include: "active", "central", "initiator", "leader", "main", "orchestrator", "parent", "primary", "server". (This check uses pattern-matching and may therefore be incorrect. To improve the patterns or to make other suggestions, please open an issue or pull-request at https://github.com/ietf/terminology/issues.)
Raw output
/\bmaster\w*\b/gi
nycCommonConfig.exclude.push("lib/processors/jsdoc/lib/**");

export default {
...nycCommonConfig,
"statements": 95,
"branches": 90,
"functions": 95,
"lines": 95,
};
19 changes: 0 additions & 19 deletions packages/builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,32 +40,13 @@
"unit-watch": "rimraf test/tmp && ava --watch",
"unit-inspect": "cross-env UI5_LOG_LVL=verbose ava debug --break",
"coverage": "rimraf test/tmp && nyc ava --node-arguments=\"--experimental-loader=@istanbuljs/esm-loader-hook\"",
"preversion": "npm test",
"version": "git-chglog --sort semver --next-tag v$npm_package_version -o CHANGELOG.md v4.0.0.. && git add CHANGELOG.md",
"prepublishOnly": "git push --follow-tags",
"release-note": "git-chglog --sort semver -c .chglog/release-config.yml v$npm_package_version",
"depcheck": "depcheck --ignores @ui5/builder,@istanbuljs/esm-loader-hook,catharsis,rimraf,jsdoc --parsers='**/*.js:es6,**/*.cjs:es6'"
},
"files": [
"CHANGELOG.md",
"lib/**",
"LICENSES/**"
],
"ava": {
"files": [
"test/lib/**/*.js"
],
"watchMode": {
"ignoreChanges": [
"test/tmp/**"
]
},
"nodeArguments": [
"--loader=esmock",
"--no-warnings"
],
"workerThreads": false
},
"nyc": {
"reporter": [
"lcov",
Expand Down
5 changes: 5 additions & 0 deletions packages/cli/ava.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import avaCommonConfig from "../../ava.common.config.js";

avaCommonConfig.files.push("test/bin/**/*.js");

export default avaCommonConfig;
9 changes: 9 additions & 0 deletions packages/cli/nyc.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import nycCommonConfig from "../../nyc.common.config.js";

export default {
...nycCommonConfig,
"statements": 95,
"branches": 90,
"functions": 85,
"lines": 95,
};
Loading