Skip to content

Commit 87f4bf5

Browse files
committed
fix: Align and fix scripts with the monorepo
1 parent 81ceb0d commit 87f4bf5

File tree

7 files changed

+12642
-7730
lines changed

7 files changed

+12642
-7730
lines changed

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ site/
6363
!packages/**/test/fixtures/**/node_modules
6464

6565
# Documentation
66-
packages/documentation/docs/pages/CLI.md
67-
packages/documentation/.vitepress/dist
68-
packages/documentation/.vitepress/cache
69-
packages/documentation/dist
66+
internal/documentation/docs/pages/CLI.md
67+
internal/documentation/.vitepress/dist
68+
internal/documentation/.vitepress/cache
69+
internal/documentation/dist

eslint.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ export default [
66
// to add to common config
77
ignores: [
88
"**/site/",
9-
"packages/"
9+
"packages/",
10+
"internal/"
1011
]
1112
},
1213
...eslintCommonConfig, // Load common ESLint config
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import eslintCommonConfig from "../../eslint.common.config.js";
2+
3+
export default [
4+
{
5+
// Ignore VitePress generated files and build output
6+
ignores: [
7+
"dist/",
8+
".vitepress/",
9+
"jsdoc/"
10+
]
11+
},
12+
...eslintCommonConfig, // Load common ESLint config
13+
{
14+
// Documentation-specific overrides
15+
rules: {
16+
"no-console": "off", // Allow console in documentation scripts
17+
}
18+
}
19+
];

internal/documentation/package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
},
2424
"scripts": {
2525
"start": "vitepress dev --open",
26+
"test": "echo 'No tests defined for documentation package'",
27+
"lint": "eslint .",
28+
"unit": "echo 'No unit tests defined for documentation package'",
29+
"coverage": "echo 'Coverage skipped for documentation package'",
30+
"depcheck": "depcheck --ignores @ui5/documentation,vitepress,docdash,jsdoc,open-cli,handlebars,@types/node,@ui5/webcomponents,autoprefixer,cssnano,@ui5/builder,@ui5/fs,@ui5/logger,@ui5/project,@ui5/server,@theme/components",
2631
"dev": "vitepress dev",
2732
"build:vitepress": "vitepress build",
2833
"build:assets": "sh -c 'DEST_DIR=${1:-./dist}; cp -r ./docs/images \"$DEST_DIR/images\"' --",
@@ -48,6 +53,7 @@
4853
"@ui5/logger": "^4.0.2",
4954
"@ui5/project": "^4.0.6",
5055
"@ui5/server": "^4.0.7",
56+
"depcheck": "^1.4.7",
5157
"docdash": "^2.0.2",
5258
"jsdoc": "^4.0.4",
5359
"open-cli": "^8.0.0",

internal/shrinkwrap-extractor/package.json

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,29 @@
11
{
2-
"name": "shrinkwrap-extractor",
2+
"name": "@ui5/shrinkwrap-extractor",
33
"version": "1.0.0",
44
"private": true,
55
"description": "Convert npm package-lock.json files to npm-shrinkwrap.json format for specific packages in monorepos",
6+
"author": {
7+
"name": "SAP SE",
8+
"email": "openui5@sap.com",
9+
"url": "https://www.sap.com"
10+
},
11+
"license": "Apache-2.0",
612
"main": "lib/convertPackageLockToShrinkwrap.js",
713
"bin": {
814
"shrinkwrap-extractor": "./cli.js"
915
},
16+
"repository": {
17+
"type": "git",
18+
"url": "git@github.com:UI5/cli.git"
19+
},
1020
"scripts": {
11-
"test": "npm run lint && npm run unit",
21+
"test": "npm run lint && npm run coverage && npm run depcheck",
1222
"unit": "node --test test/lib/convertToShrinkwrap.js",
1323
"unit-watch": "node --test --watch test/lib/convertToShrinkwrap.js",
14-
"lint": "eslint ."
24+
"coverage": "nyc node --test test/lib/convertToShrinkwrap.js",
25+
"lint": "eslint .",
26+
"depcheck": "depcheck --ignores @ui5/shrinkwrap-extractor,@eslint/js,eslint-config-google,globals,nyc"
1527
},
1628
"keywords": [
1729
"npm",
@@ -27,7 +39,25 @@
2739
},
2840
"devDependencies": {
2941
"@eslint/js": "^9.39.1",
42+
"depcheck": "^1.4.7",
43+
"nyc": "^17.1.0",
3044
"eslint-config-google": "^0.14.0",
3145
"globals": "^16.5.0"
46+
},
47+
"nyc": {
48+
"reporter": [
49+
"lcov",
50+
"text",
51+
"text-summary"
52+
],
53+
"exclude": [
54+
"coverage/**",
55+
"test/**"
56+
],
57+
"check-coverage": true,
58+
"statements": 80,
59+
"branches": 75,
60+
"functions": 75,
61+
"lines": 80
3262
}
3363
}

0 commit comments

Comments
 (0)