@npmcli/template-oss 4.5.0 → 4.5.1
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/lib/config.js +9 -5
- package/lib/content/_step-lint.yml +2 -2
- package/lib/content/release.yml +1 -1
- package/package.json +2 -2
package/lib/config.js
CHANGED
|
@@ -99,6 +99,10 @@ const getFullConfig = async ({
|
|
|
99
99
|
pkgConfig: _pkgConfig,
|
|
100
100
|
}) => {
|
|
101
101
|
const isRoot = root === path
|
|
102
|
+
const isWorkspace = !isRoot
|
|
103
|
+
const isMono = !!workspaces.length
|
|
104
|
+
const isRootMono = isRoot && isMono
|
|
105
|
+
|
|
102
106
|
const isLatest = _pkgConfig.version === LATEST_VERSION
|
|
103
107
|
const isDogFood = pkgJson.name === NAME
|
|
104
108
|
const isForce = process.argv.includes('--force')
|
|
@@ -154,14 +158,14 @@ const getFullConfig = async ({
|
|
|
154
158
|
// all derived keys
|
|
155
159
|
const derived = {
|
|
156
160
|
isRoot,
|
|
157
|
-
isWorkspace
|
|
161
|
+
isWorkspace,
|
|
158
162
|
// Some files are written to the base of a repo but will
|
|
159
163
|
// include configuration for all packages within a monorepo
|
|
160
164
|
// For these cases it is helpful to know if we are in a
|
|
161
165
|
// monorepo since template-oss might be used only for
|
|
162
166
|
// workspaces and not the root or vice versa.
|
|
163
|
-
isRootMono
|
|
164
|
-
isMono
|
|
167
|
+
isRootMono,
|
|
168
|
+
isMono,
|
|
165
169
|
// repo
|
|
166
170
|
repoDir: root,
|
|
167
171
|
repoFiles,
|
|
@@ -177,8 +181,8 @@ const getFullConfig = async ({
|
|
|
177
181
|
pkgPath,
|
|
178
182
|
pkgDir: posixDir(pkgPath),
|
|
179
183
|
pkgGlob: posixGlob(pkgPath),
|
|
180
|
-
pkgFlags:
|
|
181
|
-
allFlags:
|
|
184
|
+
pkgFlags: isWorkspace ? `-w ${pkgJson.name}` : '',
|
|
185
|
+
allFlags: isMono ? '-ws -iwr --if-present' : '',
|
|
182
186
|
workspacePaths,
|
|
183
187
|
workspaceGlobs: workspacePaths.map(posixGlob),
|
|
184
188
|
// booleans to control application of updates
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
- name: Lint
|
|
2
|
-
run: {{ rootNpmPath }} run lint --ignore-scripts
|
|
2
|
+
run: {{ rootNpmPath }} run lint --ignore-scripts {{~#if jobRunFlags}} {{ jobRunFlags }}{{/if}}
|
|
3
3
|
- name: Post Lint
|
|
4
|
-
run: {{ rootNpmPath }} run postlint --ignore-scripts
|
|
4
|
+
run: {{ rootNpmPath }} run postlint --ignore-scripts {{~#if jobRunFlags}} {{ jobRunFlags }}{{/if}}
|
package/lib/content/release.yml
CHANGED
|
@@ -78,7 +78,7 @@ jobs:
|
|
|
78
78
|
GITHUB_TOKEN: $\{{ secrets.GITHUB_TOKEN }}
|
|
79
79
|
run: |
|
|
80
80
|
{{ rootNpmPath }} exec --offline -- template-oss-release-manager
|
|
81
|
-
{{ rootNpmPath }} run rp-pull-request --ignore-scripts {{ allFlags }}
|
|
81
|
+
{{ rootNpmPath }} run rp-pull-request --ignore-scripts {{~#if allFlags}} {{ allFlags }}{{else}} --if-present{{/if}}
|
|
82
82
|
- name: Commit
|
|
83
83
|
id: commit
|
|
84
84
|
env:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@npmcli/template-oss",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.1",
|
|
4
4
|
"description": "templated files used in npm CLI team oss projects",
|
|
5
5
|
"main": "lib/content/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"lodash": "^4.17.21",
|
|
50
50
|
"npm-package-arg": "^9.0.1",
|
|
51
51
|
"proc-log": "^2.0.0",
|
|
52
|
-
"release-please": "npm:@npmcli/release-please@^14.2.
|
|
52
|
+
"release-please": "npm:@npmcli/release-please@^14.2.6",
|
|
53
53
|
"semver": "^7.3.5",
|
|
54
54
|
"yaml": "^2.1.1"
|
|
55
55
|
},
|