Skip to content

Commit aa35a02

Browse files
authored
Merge pull request #215 from TopCli/security-enhance
Security enhance
2 parents d62c883 + 4d476d3 commit aa35a02

5 files changed

Lines changed: 42 additions & 2 deletions

File tree

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ updates:
44
directory: /
55
schedule:
66
interval: monthly
7+
cooldown:
8+
default-days: 5
79
groups:
810
github-actions:
911
patterns:
@@ -14,6 +16,8 @@ updates:
1416
versioning-strategy: widen
1517
schedule:
1618
interval: weekly
19+
cooldown:
20+
default-days: 5
1721
groups:
1822
dependencies:
1923
dependency-type: "production"

.github/workflows/node.js.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
strategy:
1818
matrix:
19-
node-version: [20.x]
19+
node-version: [24.x]
2020
fail-fast: false
2121
steps:
2222
- name: Harden Runner
@@ -29,7 +29,7 @@ jobs:
2929
with:
3030
node-version: ${{ matrix.node-version }}
3131
- name: Install dependencies
32-
run: npm i
32+
run: npm install --ignore-scripts
3333
- name: Lint
3434
run: npm run lint
3535
- name: Build

.github/workflows/publish.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish Package
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
id-token: write # Required for OIDC
10+
contents: read
11+
12+
jobs:
13+
publish:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
17+
18+
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
19+
with:
20+
node-version: '24.x'
21+
registry-url: 'https://registry.npmjs.org'
22+
23+
# Ensure npm 11.5.1 or later is installed
24+
- name: Update npm
25+
run: npm install -g npm@latest
26+
- run: npm install --ignore-scripts
27+
- run: npm run build --if-present
28+
- run: npm test
29+
- run: npm publish

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
package-lock=false
2+
ignore-scripts=true
3+
save-exact=true

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
"coverage": "c8 -r html npm run test-only",
1414
"lint": "eslint src test"
1515
},
16+
"publishConfig": {
17+
"registry": "https://registry.npmjs.org",
18+
"access": "public",
19+
"provenance": true
20+
},
1621
"repository": {
1722
"type": "git",
1823
"url": "git+https://github.com/TopCli/Spinner.git"

0 commit comments

Comments
 (0)