create-node-lib 2.17.3 → 2.17.4
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/CHANGELOG.md +7 -0
- package/__tests__/generator.test.js +22 -0
- package/package.json +1 -1
- package/saofile.js +9 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [2.17.4](https://github.com/lirantal/create-node-lib/compare/v2.17.3...v2.17.4) (2026-05-13)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* exclude pnpm-workspace.yaml when npm is selected as package manager ([#46](https://github.com/lirantal/create-node-lib/issues/46)) ([34891e1](https://github.com/lirantal/create-node-lib/commit/34891e1e9e1b5819ebea4dd36b6f42b3307d41e5))
|
|
7
|
+
|
|
1
8
|
## [2.17.3](https://github.com/lirantal/create-node-lib/compare/v2.17.2...v2.17.3) (2026-05-12)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -79,6 +79,28 @@ describe('all the template files are accountable for', () => {
|
|
|
79
79
|
expect(pkg.scripts['lint:lockfile']).toEqual(mockScripts['lint:lockfile'])
|
|
80
80
|
})
|
|
81
81
|
|
|
82
|
+
test('Generator includes pnpm-workspace.yaml when pnpm is selected', async () => {
|
|
83
|
+
const stream = await sao.mock(
|
|
84
|
+
{ generator: template },
|
|
85
|
+
{
|
|
86
|
+
npmClient: 'pnpm'
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
expect(stream.fileList).toContain('pnpm-workspace.yaml')
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
test('Generator excludes pnpm-workspace.yaml when npm is selected', async () => {
|
|
94
|
+
const stream = await sao.mock(
|
|
95
|
+
{ generator: template },
|
|
96
|
+
{
|
|
97
|
+
npmClient: 'npm'
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
expect(stream.fileList).not.toContain('pnpm-workspace.yaml')
|
|
102
|
+
})
|
|
103
|
+
|
|
82
104
|
test('Generator input creates correct package.json scripts with npm as client', async () => {
|
|
83
105
|
const mockScripts = {
|
|
84
106
|
'lint:lockfile': 'lockfile-lint --path package-lock.json --validate-https --allowed-hosts npm'
|
package/package.json
CHANGED
package/saofile.js
CHANGED
|
@@ -115,7 +115,15 @@ module.exports = {
|
|
|
115
115
|
gitignore: '.gitignore',
|
|
116
116
|
npmrc: '.npmrc'
|
|
117
117
|
}
|
|
118
|
-
}
|
|
118
|
+
},
|
|
119
|
+
...(npmClient !== 'pnpm'
|
|
120
|
+
? [
|
|
121
|
+
{
|
|
122
|
+
type: 'remove',
|
|
123
|
+
files: 'pnpm-workspace.yaml'
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
: [])
|
|
119
127
|
]
|
|
120
128
|
},
|
|
121
129
|
async completed() {
|