create-node-lib 2.9.1 → 2.9.3
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/main.yml +10 -4
- package/CHANGELOG.md +13 -0
- package/README.md +2 -2
- package/__tests__/generator.test.js +6 -0
- package/package.json +38 -26
- package/saofile.js +1 -0
- package/template/package.json +1 -0
|
@@ -20,7 +20,7 @@ jobs:
|
|
|
20
20
|
strategy:
|
|
21
21
|
matrix:
|
|
22
22
|
platform: [ubuntu-latest]
|
|
23
|
-
node: ['
|
|
23
|
+
node: ['24']
|
|
24
24
|
name: Tests - Node ${{ matrix.node }} (${{ matrix.platform }})
|
|
25
25
|
runs-on: ${{ matrix.platform }}
|
|
26
26
|
steps:
|
|
@@ -29,7 +29,7 @@ jobs:
|
|
|
29
29
|
with:
|
|
30
30
|
node-version: ${{ matrix.node }}
|
|
31
31
|
- name: install dependencies
|
|
32
|
-
run: npm ci --
|
|
32
|
+
run: npm ci --audit false
|
|
33
33
|
- name: run tests
|
|
34
34
|
run: npm run test
|
|
35
35
|
# - name: code coverage report
|
|
@@ -42,13 +42,19 @@ jobs:
|
|
|
42
42
|
runs-on: 'ubuntu-latest'
|
|
43
43
|
needs: build
|
|
44
44
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
45
|
+
permissions:
|
|
46
|
+
contents: write
|
|
47
|
+
issues: write
|
|
48
|
+
pull-requests: write
|
|
49
|
+
id-token: write
|
|
45
50
|
steps:
|
|
46
51
|
- uses: actions/checkout@v3
|
|
47
52
|
- uses: actions/setup-node@v3
|
|
48
53
|
with:
|
|
49
|
-
node-version: '
|
|
54
|
+
node-version: '24'
|
|
55
|
+
registry-url: 'https://registry.npmjs.org'
|
|
50
56
|
- name: install dependencies
|
|
51
|
-
run: npm ci --
|
|
57
|
+
run: npm ci --audit false
|
|
52
58
|
- name: release
|
|
53
59
|
run: npx semantic-release
|
|
54
60
|
env:
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
## [2.9.3](https://github.com/lirantal/create-node-lib/compare/v2.9.2...v2.9.3) (2026-01-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add prepare script to template for Husky initialization ([#33](https://github.com/lirantal/create-node-lib/issues/33)) ([4ff841d](https://github.com/lirantal/create-node-lib/commit/4ff841d79f03f18e1e2f13222fcbc8d38cd9069e))
|
|
7
|
+
* add publishConfig to package.json ([13fd5cf](https://github.com/lirantal/create-node-lib/commit/13fd5cf8cf7d02465bd4c1a48e1143ae39ce6047))
|
|
8
|
+
* fix automated release failures from main branch ([#35](https://github.com/lirantal/create-node-lib/issues/35)) ([4450205](https://github.com/lirantal/create-node-lib/commit/44502052361a33db2e3283a827bf93638f21d55b))
|
|
9
|
+
* Fix JSON formatting in package.json ([2532548](https://github.com/lirantal/create-node-lib/commit/25325482c68b7f3f85c18255bff9bdffb97f8050))
|
|
10
|
+
* nest semantic-release plugins in release config for OIDC provenance ([#37](https://github.com/lirantal/create-node-lib/issues/37)) ([afbcecd](https://github.com/lirantal/create-node-lib/commit/afbcecd664c6da84f74aee97e5f568c066742ba4))
|
|
11
|
+
* npm publishing ([00bd030](https://github.com/lirantal/create-node-lib/commit/00bd030794206a8726e5d5996e120beade63a6d0))
|
|
12
|
+
* out of sync package lock ([a5400dc](https://github.com/lirantal/create-node-lib/commit/a5400dca74f2a320942007158214ed076a066d88))
|
|
13
|
+
* update deep deps ([49fdbae](https://github.com/lirantal/create-node-lib/commit/49fdbaee2bd540ee0d8d8bc17155edae2c721da8))
|
package/README.md
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
<a href="https://www.npmjs.org/package/create-node-lib"><img src="https://badgen.net/npm/v/create-node-lib"alt="npm version"/></a>
|
|
11
11
|
<a href="https://www.npmjs.org/package/create-node-lib"><img src="https://badgen.net/npm/license/create-node-lib"alt="license"/></a>
|
|
12
12
|
<a href="https://www.npmjs.org/package/create-node-lib"><img src="https://badgen.net/npm/dt/create-node-lib"alt="downloads"/></a>
|
|
13
|
-
<a href="https://travis-ci.org/lirantal/create-node-lib"><img src="https://badgen.net/travis/lirantal/create-node-lib" alt="build"/></a>
|
|
14
13
|
<a href="https://snyk.io/test/github/lirantal/create-node-lib"><img src="https://snyk.io/test/github/lirantal/create-node-lib/badge.svg" alt="Known Vulnerabilities"/></a>
|
|
15
14
|
<a href="./SECURITY.md"><img src="https://img.shields.io/badge/Security-Responsible%20Disclosure-yellow.svg" alt="Responsible Disclosure Policy" /></a>
|
|
16
15
|
<a href="https://github.com/saojs/awesome-sao"><img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome"/></a>
|
|
@@ -35,7 +34,8 @@ or if you're using yarn
|
|
|
35
34
|
yarn create node-lib my-cool-lib-name
|
|
36
35
|
```
|
|
37
36
|
|
|
38
|
-
<img
|
|
37
|
+
<img alt="Israel Rail API and CLI using npx and npm" src="https://github.com/user-attachments/assets/48ce8c3b-e56f-44a5-9d87-911c34eae43b" />
|
|
38
|
+
|
|
39
39
|
|
|
40
40
|
# Contributing
|
|
41
41
|
|
|
@@ -88,4 +88,10 @@ describe('all the template files are accountable for', () => {
|
|
|
88
88
|
// Testing only variable scripts
|
|
89
89
|
expect(pkg.scripts['lint:lockfile']).toEqual(mockScripts['lint:lockfile'])
|
|
90
90
|
})
|
|
91
|
+
|
|
92
|
+
test('Generator creates package.json with prepare script for husky', async () => {
|
|
93
|
+
const stream = await sao.mock({ generator: template })
|
|
94
|
+
const pkg = JSON.parse(await stream.readFile('package.json'))
|
|
95
|
+
expect(pkg.scripts.prepare).toBe('husky')
|
|
96
|
+
})
|
|
91
97
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-node-lib",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.3",
|
|
4
4
|
"description": "Scaffolding out a Node.js library module",
|
|
5
5
|
"bin": "./bin/cli.js",
|
|
6
6
|
"engines": {
|
|
@@ -41,19 +41,25 @@
|
|
|
41
41
|
"type": "git",
|
|
42
42
|
"url": "https://github.com/lirantal/create-node-lib.git"
|
|
43
43
|
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"registry": "https://registry.npmjs.org/",
|
|
46
|
+
"tag": "latest",
|
|
47
|
+
"provenance": true
|
|
48
|
+
},
|
|
44
49
|
"dependencies": {
|
|
45
50
|
"sao": "^1.7.1",
|
|
51
|
+
"semantic-release": "^25.0.2",
|
|
46
52
|
"validate-npm-package-name": "^5.0.0"
|
|
47
53
|
},
|
|
48
54
|
"devDependencies": {
|
|
49
55
|
"@commitlint/cli": "^17.4.2",
|
|
50
56
|
"@commitlint/config-conventional": "^17.4.2",
|
|
51
57
|
"@semantic-release/changelog": "^6.0.2",
|
|
52
|
-
"@semantic-release/commit-analyzer": "^
|
|
58
|
+
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
53
59
|
"@semantic-release/git": "^10.0.1",
|
|
54
|
-
"@semantic-release/github": "^
|
|
55
|
-
"@semantic-release/npm": "^
|
|
56
|
-
"@semantic-release/release-notes-generator": "^
|
|
60
|
+
"@semantic-release/github": "^12.0.2",
|
|
61
|
+
"@semantic-release/npm": "^13.1.3",
|
|
62
|
+
"@semantic-release/release-notes-generator": "^14.1.0",
|
|
57
63
|
"babel-eslint": "^10.0.1",
|
|
58
64
|
"babel-plugin-syntax-async-functions": "^6.13.0",
|
|
59
65
|
"babel-plugin-transform-regenerator": "^6.26.0",
|
|
@@ -193,28 +199,34 @@
|
|
|
193
199
|
"release": "patch"
|
|
194
200
|
}
|
|
195
201
|
]
|
|
196
|
-
}
|
|
202
|
+
},
|
|
203
|
+
"plugins": [
|
|
204
|
+
"@semantic-release/commit-analyzer",
|
|
205
|
+
"@semantic-release/release-notes-generator",
|
|
206
|
+
[
|
|
207
|
+
"@semantic-release/changelog",
|
|
208
|
+
{
|
|
209
|
+
"changelogFile": "CHANGELOG.md"
|
|
210
|
+
}
|
|
211
|
+
],
|
|
212
|
+
[
|
|
213
|
+
"@semantic-release/npm",
|
|
214
|
+
{
|
|
215
|
+
"npmPublish": true,
|
|
216
|
+
"provenance": true
|
|
217
|
+
}
|
|
218
|
+
],
|
|
219
|
+
[
|
|
220
|
+
"@semantic-release/git",
|
|
221
|
+
{
|
|
222
|
+
"assets": [
|
|
223
|
+
"CHANGELOG.md"
|
|
224
|
+
]
|
|
225
|
+
}
|
|
226
|
+
],
|
|
227
|
+
"@semantic-release/github"
|
|
228
|
+
]
|
|
197
229
|
},
|
|
198
|
-
"plugins": [
|
|
199
|
-
"@semantic-release/commit-analyzer",
|
|
200
|
-
"@semantic-release/release-notes-generator",
|
|
201
|
-
[
|
|
202
|
-
"@semantic-release/changelog",
|
|
203
|
-
{
|
|
204
|
-
"changelogFile": "CHANGELOG.md"
|
|
205
|
-
}
|
|
206
|
-
],
|
|
207
|
-
"@semantic-release/npm",
|
|
208
|
-
[
|
|
209
|
-
"@semantic-release/git",
|
|
210
|
-
{
|
|
211
|
-
"assets": [
|
|
212
|
-
"CHANGELOG.md"
|
|
213
|
-
]
|
|
214
|
-
}
|
|
215
|
-
],
|
|
216
|
-
"@semantic-release/github"
|
|
217
|
-
],
|
|
218
230
|
"peerDependencies": {
|
|
219
231
|
"node-notifier": "^10.0.1"
|
|
220
232
|
}
|
package/saofile.js
CHANGED
|
@@ -107,6 +107,7 @@ module.exports = {
|
|
|
107
107
|
async completed() {
|
|
108
108
|
this.gitInit()
|
|
109
109
|
await this.npmInstall({ npmClient: this.answers.npmClient })
|
|
110
|
+
await this.npmInstall({ npmClient: this.answers.npmClient, args: ['run', 'prepare'] })
|
|
110
111
|
this.showProjectTips()
|
|
111
112
|
|
|
112
113
|
this.logger.tip('You\'re all setup. hack away!')
|
package/template/package.json
CHANGED
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"test": "c8 node --import tsx --test __tests__/**/*.test.ts",
|
|
43
43
|
"test:watch": "c8 node --import tsx --test --watch __tests__/**/*.test.ts",
|
|
44
44
|
"coverage:view": "open coverage/lcov-report/index.html",
|
|
45
|
+
"prepare": "husky",
|
|
45
46
|
"version": "changeset version",
|
|
46
47
|
"release": "changeset publish"
|
|
47
48
|
},
|