1
1
mirror of https://github.com/theoludwig/eslint-config-conventions.git synced 2024-09-09 00:25:53 +02:00

feat: add npm package provenance

Ref: https://github.blog/2023-04-19-introducing-npm-package-provenance/
This commit is contained in:
Divlo 2023-05-13 15:41:12 +02:00
parent ca9b1db4bd
commit b1bd574d42
No known key found for this signature in database
GPG Key ID: 8F9478F220CE65E9
6 changed files with 24 additions and 11 deletions

View File

@ -12,14 +12,14 @@ jobs:
steps:
- uses: 'actions/checkout@v3.5.2'
- name: 'Use Node.js'
- name: 'Setup Node.js'
uses: 'actions/setup-node@v3.6.0'
with:
node-version: 'lts/*'
cache: 'npm'
- name: 'Install'
run: 'npm install'
- name: 'Install dependencies'
run: 'npm clean-install'
- run: 'npm run lint:commit -- --to "${{ github.sha }}"'
- run: 'npm run lint:editorconfig'

View File

@ -7,20 +7,28 @@ on:
jobs:
release:
runs-on: 'ubuntu-latest'
permissions:
contents: 'write'
issues: 'write'
pull-requests: 'write'
id-token: 'write'
steps:
- uses: 'actions/checkout@v3.5.2'
with:
fetch-depth: 0
persist-credentials: false
- name: 'Use Node.js'
- name: 'Setup Node.js'
uses: 'actions/setup-node@v3.6.0'
with:
node-version: 'lts/*'
cache: 'npm'
- name: 'Install'
run: 'npm install'
- name: 'Install dependencies'
run: 'npm clean-install'
- name: 'Verify the integrity of provenance attestations and registry signatures for installed dependencies'
run: 'npm audit signatures'
- name: 'Release'
run: 'npm run release'

View File

@ -12,14 +12,14 @@ jobs:
steps:
- uses: 'actions/checkout@v3.5.2'
- name: 'Use Node.js'
- name: 'Setup Node.js'
uses: 'actions/setup-node@v3.6.0'
with:
node-version: 'lts/*'
cache: 'npm'
- name: 'Install'
run: 'npm install'
- name: 'Install dependencies'
run: 'npm clean-install'
- name: 'Test'
run: 'npm run test'

1
.npmrc
View File

@ -1 +1,2 @@
save-exact=true
provenance=true

2
package-lock.json generated
View File

@ -34,7 +34,7 @@
},
"engines": {
"node": ">=16.0.0",
"npm": ">=8.0.0"
"npm": ">=9.0.0"
},
"peerDependencies": {
"eslint": "^8.33.0",

View File

@ -27,9 +27,13 @@
"index.js",
".eslintrc.json"
],
"publishConfig": {
"access": "public",
"provenance": true
},
"engines": {
"node": ">=16.0.0",
"npm": ">=8.0.0"
"npm": ">=9.0.0"
},
"scripts": {
"lint:commit": "commitlint",