ui5-cc-chart 0.1.1 → 0.1.2
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/.github/workflows/publish.yml +54 -0
- package/.husky/pre-commit +0 -3
- package/.husky/pre-push +0 -3
- package/eslint.config.js +22 -0
- package/package.json +16 -13
- package/.eslintignore +0 -5
- package/.eslintrc.json +0 -13
- package/.github/workflows/release-auto.yml +0 -31
- package/.husky/skip.js +0 -5
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
# Trigger on tag push AND manual trigger
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
tags:
|
|
7
|
+
- "v*.*.*"
|
|
8
|
+
workflow_dispatch: # Manual trigger
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
id-token: write # REQUIRED for trusted publishing (OIDC)
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
publish:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Setup Node.js
|
|
21
|
+
uses: actions/setup-node@v4
|
|
22
|
+
with:
|
|
23
|
+
node-version: 24
|
|
24
|
+
cache: "npm"
|
|
25
|
+
registry-url: "https://registry.npmjs.org/"
|
|
26
|
+
|
|
27
|
+
- name: Read package name
|
|
28
|
+
id: pkg
|
|
29
|
+
run: |
|
|
30
|
+
echo "NAME=$(jq -r '.name' package.json)" >> $GITHUB_ENV
|
|
31
|
+
|
|
32
|
+
- name: Decide publish method
|
|
33
|
+
run: |
|
|
34
|
+
if npm view "$NAME" > /dev/null 2>&1; then
|
|
35
|
+
echo "EXISTS=true" >> $GITHUB_ENV
|
|
36
|
+
echo "Package exists → using trusted publishing"
|
|
37
|
+
else
|
|
38
|
+
echo "EXISTS=false" >> $GITHUB_ENV
|
|
39
|
+
echo "Package does not exist → bootstrap publish"
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
- name: Publish
|
|
43
|
+
env:
|
|
44
|
+
NPM_BOOTSTRAP_TOKEN: ${{ secrets.NPM_BOOTSTRAP_TOKEN }}
|
|
45
|
+
run: |
|
|
46
|
+
if [ "$EXISTS" = "false" ]; then
|
|
47
|
+
echo "//registry.npmjs.org/:_authToken=${NPM_BOOTSTRAP_TOKEN}" > ~/.npmrc
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
npm publish --access public
|
|
51
|
+
|
|
52
|
+
if [ "$EXISTS" = "false" ]; then
|
|
53
|
+
rm ~/.npmrc
|
|
54
|
+
fi
|
package/.husky/pre-commit
CHANGED
package/.husky/pre-push
CHANGED
package/eslint.config.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const globals = require("globals");
|
|
2
|
+
const js = require("@eslint/js");
|
|
3
|
+
|
|
4
|
+
module.exports = [
|
|
5
|
+
js.configs.recommended,
|
|
6
|
+
{
|
|
7
|
+
languageOptions: {
|
|
8
|
+
globals: {
|
|
9
|
+
...globals.browser,
|
|
10
|
+
sap: "readonly",
|
|
11
|
+
},
|
|
12
|
+
ecmaVersion: 2023,
|
|
13
|
+
sourceType: "script",
|
|
14
|
+
},
|
|
15
|
+
rules: {
|
|
16
|
+
"prefer-const": "warn",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
ignores: ["eslint.config.js"],
|
|
21
|
+
},
|
|
22
|
+
];
|
package/package.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ui5-cc-chart",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "UI5 Custom Control: Chart.js",
|
|
5
5
|
"author": "UI5 Community",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
|
+
"repository": {
|
|
8
|
+
"url": "https://github.com/ui5-community/ui5-cc-chart"
|
|
9
|
+
},
|
|
7
10
|
"scripts": {
|
|
8
|
-
"prepare": "node ./.husky/skip.js || husky install",
|
|
9
11
|
"lint": "eslint .",
|
|
10
12
|
"lint:staged": "lint-staged",
|
|
11
13
|
"lint:commit": "commitlint -e",
|
|
@@ -18,19 +20,20 @@
|
|
|
18
20
|
"version:publish": "git push && git push --tags"
|
|
19
21
|
},
|
|
20
22
|
"dependencies": {
|
|
21
|
-
"chart.js": "^
|
|
23
|
+
"chart.js": "^4.5.1"
|
|
22
24
|
},
|
|
23
25
|
"devDependencies": {
|
|
24
|
-
"@commitlint/cli": "^
|
|
25
|
-
"@commitlint/config-conventional": "^
|
|
26
|
-
"@prettier/plugin-xml": "^
|
|
27
|
-
"conventional-changelog-cli": "^
|
|
28
|
-
"eslint": "^
|
|
29
|
-
"
|
|
30
|
-
"
|
|
26
|
+
"@commitlint/cli": "^20.2.0",
|
|
27
|
+
"@commitlint/config-conventional": "^20.2.0",
|
|
28
|
+
"@prettier/plugin-xml": "^3.4.2",
|
|
29
|
+
"conventional-changelog-cli": "^5.0.0",
|
|
30
|
+
"eslint": "^9.39.2",
|
|
31
|
+
"globals": "^16.5.0",
|
|
32
|
+
"husky": "^9.1.7",
|
|
33
|
+
"lint-staged": "^16.2.7",
|
|
31
34
|
"npm-run-all": "^4.1.5",
|
|
32
|
-
"prettier": "^
|
|
33
|
-
"prettier-plugin-properties": "^0.1
|
|
34
|
-
"pretty-quick": "^
|
|
35
|
+
"prettier": "^3.7.4",
|
|
36
|
+
"prettier-plugin-properties": "^0.3.1",
|
|
37
|
+
"pretty-quick": "^4.2.2"
|
|
35
38
|
}
|
|
36
39
|
}
|
package/.eslintignore
DELETED
package/.eslintrc.json
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
name: Release (automatic)
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
tags:
|
|
6
|
-
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
|
|
7
|
-
|
|
8
|
-
env:
|
|
9
|
-
HUSKY_SKIP: true
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
release:
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
steps:
|
|
15
|
-
- uses: actions/checkout@v2
|
|
16
|
-
with:
|
|
17
|
-
fetch-depth: 0
|
|
18
|
-
- uses: actions/setup-node@v2
|
|
19
|
-
with:
|
|
20
|
-
node-version: "16"
|
|
21
|
-
|
|
22
|
-
- name: Install dependencies
|
|
23
|
-
run: npm install
|
|
24
|
-
|
|
25
|
-
- name: Publish to NPM
|
|
26
|
-
run: |
|
|
27
|
-
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
|
|
28
|
-
echo ":::: Publishing as $(npm whoami)"
|
|
29
|
-
npm publish
|
|
30
|
-
env:
|
|
31
|
-
NPM_TOKEN: ${{ secrets.NPM_RELEASE_AUTH_TOKEN }}
|