@npmcli/template-oss 4.2.0 → 4.3.0

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.
Files changed (38) hide show
  1. package/bin/release-please.js +42 -28
  2. package/lib/config.js +44 -26
  3. package/lib/content/{_setup-job-matrix.yml → _job-matrix.yml} +12 -10
  4. package/lib/content/_job.yml +8 -0
  5. package/lib/content/{_setup-ci-on.yml → _on-ci.yml} +11 -13
  6. package/lib/content/_step-checks.yml +24 -0
  7. package/lib/content/_step-deps.yml +2 -0
  8. package/lib/content/_step-git.yml +12 -0
  9. package/lib/content/_step-lint.yml +4 -0
  10. package/lib/content/{_setup-node.yml → _step-node.yml} +10 -9
  11. package/lib/content/_step-test.yml +4 -0
  12. package/lib/content/_steps-setup.yml +6 -0
  13. package/lib/content/audit.yml +3 -2
  14. package/lib/content/ci-release.yml +31 -0
  15. package/lib/content/ci.yml +6 -8
  16. package/lib/content/codeql-analysis.yml +10 -17
  17. package/lib/content/commitlintrc.js +1 -1
  18. package/lib/content/dependabot.yml +2 -20
  19. package/lib/content/eslintrc.js +3 -3
  20. package/lib/content/gitignore +1 -1
  21. package/lib/content/index.js +34 -21
  22. package/lib/content/npmrc +1 -1
  23. package/lib/content/pkg.json +25 -23
  24. package/lib/content/post-dependabot.yml +55 -11
  25. package/lib/content/pull-request.yml +11 -9
  26. package/lib/content/release-please-config.json +5 -5
  27. package/lib/content/release-please-manifest.json +1 -1
  28. package/lib/content/release.yml +120 -15
  29. package/lib/index.js +9 -12
  30. package/lib/release-please/index.js +26 -5
  31. package/lib/util/files.js +5 -3
  32. package/lib/util/parser.js +73 -16
  33. package/lib/util/template.js +8 -1
  34. package/package.json +1 -1
  35. package/lib/content/_setup-deps.yml +0 -1
  36. package/lib/content/_setup-git.yml +0 -11
  37. package/lib/content/_setup-job.yml +0 -6
  38. package/lib/content/release-please.yml +0 -64
@@ -6,30 +6,24 @@ const main = require('../lib/release-please/index.js')
6
6
  const dryRun = !process.env.CI
7
7
  const [branch] = process.argv.slice(2)
8
8
 
9
- const setOutput = (key, val) => {
10
- if (val && (!Array.isArray(val) || val.length)) {
11
- if (dryRun) {
12
- if (key === 'pr') {
13
- console.log('PR:', val.title.toString())
14
- console.log('='.repeat(40))
15
- console.log(val.body.toString())
16
- console.log('='.repeat(40))
17
- for (const update of val.updates.filter(u => u.updater.changelogEntry)) {
18
- console.log('CHANGELOG:', update.path)
19
- console.log('-'.repeat(40))
20
- console.log(update.updater.changelogEntry)
21
- console.log('-'.repeat(40))
22
- }
23
- for (const update of val.updates.filter(u => u.updater.rawContent)) {
24
- console.log('package:', update.path)
25
- console.log('-'.repeat(40))
26
- console.log(JSON.parse(update.updater.rawContent).name)
27
- console.log(JSON.parse(update.updater.rawContent).version)
28
- console.log('-'.repeat(40))
29
- }
30
- }
31
- } else {
32
- core.setOutput(key, JSON.stringify(val))
9
+ const debugPr = (val) => {
10
+ if (dryRun) {
11
+ console.log('PR:', val.title.toString())
12
+ console.log('='.repeat(40))
13
+ console.log(val.body.toString())
14
+ console.log('='.repeat(40))
15
+ for (const update of val.updates.filter(u => u.updater.changelogEntry)) {
16
+ console.log('CHANGELOG:', update.path)
17
+ console.log('-'.repeat(40))
18
+ console.log(update.updater.changelogEntry)
19
+ console.log('-'.repeat(40))
20
+ }
21
+ for (const update of val.updates.filter(u => u.updater.rawContent)) {
22
+ console.log('package:', update.path)
23
+ console.log('-'.repeat(40))
24
+ console.log(JSON.parse(update.updater.rawContent).name)
25
+ console.log(JSON.parse(update.updater.rawContent).version)
26
+ console.log('-'.repeat(40))
33
27
  }
34
28
  }
35
29
  }
@@ -39,10 +33,30 @@ main({
39
33
  repo: process.env.GITHUB_REPOSITORY,
40
34
  dryRun,
41
35
  branch,
42
- }).then(({ pr, releases, release }) => {
43
- setOutput('pr', pr)
44
- setOutput('releases', releases)
45
- setOutput('release', release)
36
+ }).then(({ pr, release, releases }) => {
37
+ if (pr) {
38
+ debugPr(pr)
39
+ core.setOutput('pr', JSON.stringify(pr))
40
+ core.setOutput('pr-branch', pr.headBranchName)
41
+ core.setOutput('pr-number', pr.number)
42
+ core.setOutput('pr-sha', pr.sha)
43
+ }
44
+
45
+ if (release) {
46
+ core.setOutput('release', JSON.stringify(release))
47
+ core.setOutput('release-path', release.path)
48
+ core.setOutput('release-version', release.version)
49
+ core.setOutput('release-tag', release.tagName)
50
+ core.setOutput('release-url', release.url)
51
+ }
52
+
53
+ if (releases) {
54
+ core.setOutput('releases', JSON.stringify(releases))
55
+ core.setOutput('release-flags', JSON.stringify(releases.map((r) => {
56
+ return r.path === '.' ? '-iwr' : `-w ${r.path}`
57
+ })))
58
+ }
59
+
46
60
  return null
47
61
  }).catch(err => {
48
62
  if (dryRun) {
package/lib/config.js CHANGED
@@ -15,7 +15,10 @@ const DEFAULT_CONTENT = require.resolve(NAME)
15
15
 
16
16
  const merge = withArrays('branches', 'distPaths', 'allowPaths', 'ignorePaths')
17
17
 
18
- const makePosix = (str) => str.split(win32.sep).join(posix.sep)
18
+ const makePosix = (v) => v.split(win32.sep).join(posix.sep)
19
+ const deglob = (v) => makePosix(v).replace(/[/*]+$/, '')
20
+ const posixDir = (v) => `${v === '.' ? '' : deglob(v).replace(/\/$/, '')}${posix.sep}`
21
+ const posixGlob = (str) => `${posixDir(str)}**`
19
22
 
20
23
  const getCmdPath = (key, { rootConfig, defaultConfig, isRoot, path, root }) => {
21
24
  // Make a path relative from a workspace to the root if we are in a workspace
@@ -78,27 +81,27 @@ const getFiles = (path, rawConfig) => {
78
81
  }
79
82
 
80
83
  const getFullConfig = async ({
84
+ // the path to the root of the repo
81
85
  root,
86
+ // the path to the package being operated on
87
+ // this is the same as root when operating on the root
82
88
  path,
83
- pkg,
89
+ // the full contents of the package.json for this package
90
+ pkgJson,
91
+ // an array of all package info {pkgJson,path,config}[]
84
92
  pkgs,
93
+ // an array of all workspaces in this repo
85
94
  workspaces,
95
+ // the config from the package.json in the root
86
96
  rootConfig: _rootConfig,
97
+ // the config from the package.json being operated on
87
98
  pkgConfig: _pkgConfig,
88
99
  }) => {
89
100
  const isRoot = root === path
90
- const isRootMono = isRoot && workspaces.length > 0
91
101
  const isLatest = _pkgConfig.version === LATEST_VERSION
92
- const isDogFood = pkg.name === NAME
102
+ const isDogFood = pkgJson.name === NAME
93
103
  const isForce = process.argv.includes('--force')
94
104
 
95
- // this is written to ci yml files so it needs to always use posix
96
- const pkgRelPath = makePosix(relative(root, path))
97
-
98
- const workspacePkgs = pkgs.filter((p) => p.path !== path)
99
- const workspaceDirs = isRootMono && workspaces.map((p) => makePosix(relative(root, p)))
100
- const workspaceGlobs = isRootMono && pkg.workspaces.map(p => p.replace(/[/*]+$/, ''))
101
-
102
105
  // These config items are merged betweent the root and child workspaces and only come from
103
106
  // the package.json because they can be used to read configs from other the content directories
104
107
  const mergedConfig = mergeConfigs(_rootConfig, _pkgConfig)
@@ -112,6 +115,7 @@ const getFullConfig = async ({
112
115
 
113
116
  // The content config only gets set from the package we are in, it doesn't inherit
114
117
  // anything from the root
118
+ const rootPkgConfig = merge(useDefault, rootConfig)
115
119
  const pkgConfig = merge(useDefault, getConfig(_pkgConfig.content, _pkgConfig))
116
120
  const [pkgFiles, pkgDir] = getFiles(mergedConfig.content, mergedConfig)
117
121
 
@@ -128,16 +132,24 @@ const getFullConfig = async ({
128
132
  ...isRoot ? [
129
133
  // in the root allow all repo files
130
134
  ...getAddedFiles(repoFiles),
131
- // and allow all workspace repo level files
132
- ...workspacePkgs.filter(p => p.config.workspaceRepo !== false).flatMap((p) =>
133
- getAddedFiles(files.workspaceRepo)
134
- ),
135
+ // and allow all workspace repo level files in the root
136
+ ...pkgs
137
+ .filter(p => p.path !== root && p.config.workspaceRepo !== false)
138
+ .flatMap(() => getAddedFiles(files.workspaceRepo)),
135
139
  ] : [],
136
140
  ]
137
141
 
142
+ // root only configs
138
143
  const npmPath = getCmdPath('npm', { rootConfig, defaultConfig, isRoot, path, root })
139
144
  const npxPath = getCmdPath('npx', { rootConfig, defaultConfig, isRoot, path, root })
140
145
 
146
+ // these are written to ci yml files so it needs to always use posix
147
+ const pkgPath = makePosix(relative(root, path)) || '.'
148
+
149
+ // we use the raw paths from the package.json workspaces as ignore patterns in
150
+ // some cases. the workspaces passed in have already been run through map workspaces
151
+ const workspacePaths = (pkgJson.workspaces || []).map(deglob)
152
+
141
153
  // all derived keys
142
154
  const derived = {
143
155
  isRoot,
@@ -147,8 +159,8 @@ const getFullConfig = async ({
147
159
  // For these cases it is helpful to know if we are in a
148
160
  // monorepo since template-oss might be used only for
149
161
  // workspaces and not the root or vice versa.
150
- isRootMono,
151
- isMono: isRootMono || !isRoot,
162
+ isRootMono: isRoot && !!workspaces.length,
163
+ isMono: !!workspaces.length,
152
164
  // repo
153
165
  repoDir: root,
154
166
  repoFiles,
@@ -158,13 +170,16 @@ const getFullConfig = async ({
158
170
  moduleFiles,
159
171
  applyModule: !!moduleFiles,
160
172
  // package
161
- pkgName: pkg.name,
162
- pkgNameFs: pkg.name.replace(/\//g, '-').replace(/@/g, ''),
163
- pkgRelPath: pkgRelPath,
164
- pkgPrivate: !!pkg.private,
165
- pkgPublic: !pkg.private,
166
- workspaces: workspaceDirs,
167
- workspaceGlobs,
173
+ pkgName: pkgJson.name,
174
+ pkgNameFs: pkgJson.name.replace(/\//g, '-').replace(/@/g, ''),
175
+ // paths
176
+ pkgPath,
177
+ pkgDir: posixDir(pkgPath),
178
+ pkgGlob: posixGlob(pkgPath),
179
+ pkgFlags: isRoot ? '-iwr' : `-w ${pkgJson.name}`,
180
+ allFlags: '-ws -iwr --if-present',
181
+ workspacePaths,
182
+ workspaceGlobs: workspacePaths.map(posixGlob),
168
183
  // booleans to control application of updates
169
184
  isForce,
170
185
  isDogFood,
@@ -175,6 +190,9 @@ const getFullConfig = async ({
175
190
  rootNpmPath: npmPath.root,
176
191
  localNpmPath: npmPath.local,
177
192
  rootNpxPath: npxPath.root,
193
+ // lockfiles are only present at the root, so this only should be set for
194
+ // all workspaces based on the root
195
+ lockfile: rootPkgConfig.lockfile,
178
196
  // gitignore
179
197
  ignorePaths: [
180
198
  ...gitignore.sort([
@@ -185,7 +203,7 @@ const getFullConfig = async ({
185
203
  ]),
186
204
  // these cant be sorted since they rely on order
187
205
  // to allow a previously ignored directoy
188
- ...gitignore.allowDir(workspaceDirs || []),
206
+ ...isRoot ? gitignore.allowDir(workspaces.map((p) => makePosix(relative(root, p)))) : [],
189
207
  ],
190
208
  // needs update if we are dogfooding this repo, with force argv, or its
191
209
  // behind the current version
@@ -210,7 +228,7 @@ const getFullConfig = async ({
210
228
  derived.repository = {
211
229
  type: 'git',
212
230
  url: gitUrl,
213
- ...(pkgRelPath ? { directory: pkgRelPath } : {}),
231
+ ...(!isRoot ? { directory: pkgPath } : {}),
214
232
  }
215
233
  }
216
234
 
@@ -1,27 +1,29 @@
1
+ name: {{ jobName }}
1
2
  if: github.repository_owner == 'npm'
2
3
  strategy:
3
4
  fail-fast: false
4
5
  matrix:
5
- node-version:
6
- {{#each ciVersions}}
7
- - {{.}}
8
- {{/each}}
9
6
  platform:
10
- - os: ubuntu-latest
7
+ - name: Linux
8
+ os: ubuntu-latest
11
9
  shell: bash
12
10
  {{#if macCI}}
13
- - os: macos-latest
11
+ - name: macOS
12
+ os: macos-latest
14
13
  shell: bash
15
14
  {{/if}}
16
15
  {{#if windowsCI}}
17
- - os: windows-latest
16
+ - name: Windows
17
+ os: windows-latest
18
18
  shell: cmd
19
19
  {{/if}}
20
+ node-version:
21
+ {{#each ciVersions}}
22
+ - {{ . }}
23
+ {{/each}}
20
24
  runs-on: $\{{ matrix.platform.os }}
21
25
  defaults:
22
26
  run:
23
27
  shell: $\{{ matrix.platform.shell }}
24
28
  steps:
25
- {{> setupGit}}
26
- {{> setupNode useMatrix=true}}
27
- {{> setupDeps}}
29
+ {{> stepsSetup jobNodeMatrix=true }}
@@ -0,0 +1,8 @@
1
+ name: {{ jobName }}
2
+ if: github.repository_owner == 'npm' {{~#if jobIf}} && {{{ jobIf }}}{{/if}}
3
+ runs-on: ubuntu-latest
4
+ defaults:
5
+ run:
6
+ shell: bash
7
+ steps:
8
+ {{> stepsSetup }}
@@ -1,30 +1,28 @@
1
1
  workflow_dispatch:
2
2
  pull_request:
3
- branches:
4
- - '*'
5
- {{#if pkgRelPath}}
3
+ {{#if isWorkspace}}
6
4
  paths:
7
- - {{pkgRelPath}}/**
5
+ - {{ pkgGlob }}
8
6
  {{/if}}
9
- {{#if workspaceGlobs}}
7
+ {{#if isRootMono}}
10
8
  paths-ignore:
11
- {{#each workspaceGlobs}}
12
- - {{.}}/**
9
+ {{#each workspaceGlob}}
10
+ - {{ . }}
13
11
  {{/each}}
14
12
  {{/if}}
15
13
  push:
16
14
  branches:
17
15
  {{#each branches}}
18
- - {{.}}
16
+ - {{ . }}
19
17
  {{/each}}
20
- {{#if pkgRelPath}}
18
+ {{#if isWorkspace}}
21
19
  paths:
22
- - {{pkgRelPath}}/**
20
+ - {{ pkgGlob }}
23
21
  {{/if}}
24
- {{#if workspaceGlobs}}
22
+ {{#if isRootMono}}
25
23
  paths-ignore:
26
- {{#each workspaceGlobs}}
27
- - {{.}}/**
24
+ {{#each workspaceGlob}}
25
+ - {{ . }}
28
26
  {{/each}}
29
27
  {{/if}}
30
28
  schedule:
@@ -0,0 +1,24 @@
1
+ - name: {{#if jobCheck.sha}}Create{{else}}Conclude{{/if}} Check
2
+ uses: LouisBrunner/checks-action@v1.3.1
3
+ {{#if jobCheck.sha}}
4
+ id: check
5
+ {{#if jobCheck.if}}if: {{ jobCheck.if }}{{/if}}
6
+ {{else}}
7
+ if: always()
8
+ {{/if}}
9
+ with:
10
+ token: $\{{ secrets.GITHUB_TOKEN }}
11
+ {{#if jobCheck.sha}}
12
+ status: {{#if jobCheck.status}}{{ jobCheck.status }}{{else}}in_progress{{/if}}
13
+ name: {{#if jobCheck.name}}{{ jobCheck.name }}{{else}}{{ jobName }}{{/if}}
14
+ sha: {{ jobCheck.sha }}
15
+ # XXX: this does not work when using the default GITHUB_TOKEN.
16
+ # Instead we post the main job url to the PR as a comment which
17
+ # will link to all the other checks. To work around this we would
18
+ # need to create a GitHub that would create on-demand tokens.
19
+ # https://github.com/LouisBrunner/checks-action/issues/18
20
+ # details_url:
21
+ {{else}}
22
+ conclusion: {{#if jobCheck.status}}{{ jobCheck.status }}{{else}}$\{{ job.status }}{{/if}}
23
+ check_id: {{#if jobCheck.id}}{{ jobCheck.id }}{{else}}$\{{ steps.check.outputs.check_id }}{{/if}}
24
+ {{/if}}
@@ -0,0 +1,2 @@
1
+ - name: Install Dependencies
2
+ run: {{ rootNpmPath }} i --ignore-scripts --no-audit --no-fund {{~#if jobDepFlags}} {{ jobDepFlags }}{{/if}}
@@ -0,0 +1,12 @@
1
+ - name: Checkout
2
+ uses: actions/checkout@v3
3
+ {{#if jobCheckout}}
4
+ with:
5
+ {{#each jobCheckout}}
6
+ {{ @key }}: {{ this }}
7
+ {{/each}}
8
+ {{/if}}
9
+ - name: Setup Git User
10
+ run: |
11
+ git config --global user.email "npm-cli+bot@github.com"
12
+ git config --global user.name "npm CLI robot"
@@ -0,0 +1,4 @@
1
+ - name: Lint
2
+ run: {{ rootNpmPath }} run lint --ignore-scripts
3
+ - name: Post Lint
4
+ run: {{ rootNpmPath }} run postlint --ignore-scripts
@@ -1,12 +1,13 @@
1
- - uses: actions/setup-node@v3
1
+ - name: Setup Node
2
+ uses: actions/setup-node@v3
2
3
  with:
3
- node-version: {{#if useMatrix}}$\{{ matrix.node-version }}{{else}}{{#each ciVersions}}{{#if @last}}{{.}}{{/if}}{{/each}}{{/if}}
4
+ node-version: {{#if jobNodeMatrix}}$\{{ matrix.node-version }}{{else}}{{ last ciVersions }}{{/if}}
4
5
  {{#if lockfile}}
5
6
  cache: npm
6
7
  {{/if}}
7
8
  {{#if updateNpm}}
8
- {{#if useMatrix}}
9
- - name: Update to workable npm (windows)
9
+ {{#if jobNodeMatrix}}
10
+ - name: Update Windows npm
10
11
  # node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
11
12
  if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.'))
12
13
  run: |
@@ -16,15 +17,15 @@
16
17
  node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
17
18
  cd ..
18
19
  rmdir /s /q package
19
- - name: Update npm to 7
20
- # If we do test on npm 10 it needs npm7
20
+ - name: Install npm@7
21
21
  if: startsWith(matrix.node-version, '10.')
22
22
  run: npm i --prefer-online --no-fund --no-audit -g npm@7
23
- - name: Update npm to latest
23
+ - name: Install npm@latest
24
24
  if: $\{{ !startsWith(matrix.node-version, '10.') }}
25
25
  {{else}}
26
- - name: Update npm to latest
26
+ - name: Install npm@latest
27
27
  {{/if}}
28
28
  run: npm i --prefer-online --no-fund --no-audit -g npm@latest
29
- - run: npm -v
29
+ - name: npm Version
30
+ run: npm -v
30
31
  {{/if}}
@@ -0,0 +1,4 @@
1
+ - name: Add Problem Matcher
2
+ run: echo "::add-matcher::.github/matchers/tap.json"
3
+ - name: Test
4
+ run: {{ rootNpmPath }} test --ignore-scripts {{~#if jobRunFlags}} {{ jobRunFlags }}{{/if}}
@@ -0,0 +1,6 @@
1
+ {{~#if jobCheck}}{{> stepChecks }}{{/if}}
2
+ {{~#unless jobSkipSetup}}
3
+ {{> stepGit }}
4
+ {{> stepNode }}
5
+ {{> stepDeps }}
6
+ {{/unless}}
@@ -8,5 +8,6 @@ on:
8
8
 
9
9
  jobs:
10
10
  audit:
11
- {{> setupJob flags="--package-lock"}}
12
- - run: {{rootNpmPath}} audit
11
+ {{> job jobName="Audit Dependencies" jobDepFlags="--package-lock" }}
12
+ - name: Run Audit
13
+ run: {{ rootNpmPath }} audit
@@ -0,0 +1,31 @@
1
+
2
+ name: CI - Release
3
+
4
+ on:
5
+ workflow_call:
6
+ inputs:
7
+ ref:
8
+ required: true
9
+ type: string
10
+ check-sha:
11
+ required: true
12
+ type: string
13
+
14
+ jobs:
15
+ lint-all:
16
+ {{> job
17
+ jobName="Lint All"
18
+ jobCheck=(obj sha="${{ inputs.check-sha }}")
19
+ jobCheckout=(obj ref="${{ inputs.ref }}")
20
+ }}
21
+ {{> stepLint jobRunFlags=allFlags }}
22
+ {{> stepChecks jobCheck=true }}
23
+
24
+ test-all:
25
+ {{> jobMatrix
26
+ jobName="Test All - ${{ matrix.platform.name }} - Node ${{ matrix.node-version }}"
27
+ jobCheck=(obj sha="${{ inputs.check-sha }}")
28
+ jobCheckout=(obj ref="${{ inputs.ref }}")
29
+ }}
30
+ {{> stepTest jobRunFlags=allFlags }}
31
+ {{> stepChecks jobCheck=true }}
@@ -1,15 +1,13 @@
1
- name: CI {{~#if isWorkspace}} - {{pkgName}}{{/if}}
1
+ name: CI {{~#if isWorkspace}} - {{ pkgName }}{{/if}}
2
2
 
3
3
  on:
4
- {{> setupCiOn}}
4
+ {{> onCi }}
5
5
 
6
6
  jobs:
7
7
  lint:
8
- {{> setupJob }}
9
- - run: {{rootNpmPath}} run lint {{~#if isWorkspace}} -w {{pkgName}}{{/if}}
8
+ {{> job jobName="Lint" }}
9
+ {{> stepLint jobRunFlags=pkgFlags }}
10
10
 
11
11
  test:
12
- {{> setupJobMatrix }}
13
- - name: add tap problem matcher
14
- run: echo "::add-matcher::.github/matchers/tap.json"
15
- - run: {{rootNpmPath}} test --ignore-scripts {{~#if isWorkspace}} -w {{pkgName}}{{/if}}
12
+ {{> jobMatrix jobName="Test All - ${{ matrix.platform.name }} - Node ${{ matrix.node-version }}" }}
13
+ {{> stepTest jobRunFlags=pkgFlags }}
@@ -1,16 +1,15 @@
1
- name: "CodeQL"
1
+ name: CodeQL
2
2
 
3
3
  on:
4
4
  push:
5
5
  branches:
6
6
  {{#each branches}}
7
- - {{.}}
7
+ - {{ . }}
8
8
  {{/each}}
9
9
  pull_request:
10
- # The branches below must be a subset of the branches above
11
10
  branches:
12
11
  {{#each branches}}
13
- - {{.}}
12
+ - {{ . }}
14
13
  {{/each}}
15
14
  schedule:
16
15
  # "At 10:00 UTC (03:00 PT) on Monday" https://crontab.guru/#0_10_*_*_1
@@ -24,17 +23,11 @@ jobs:
24
23
  actions: read
25
24
  contents: read
26
25
  security-events: write
27
-
28
- strategy:
29
- fail-fast: false
30
- matrix:
31
- language: [javascript]
32
-
33
26
  steps:
34
- {{> setupGit}}
35
- - name: Initialize CodeQL
36
- uses: github/codeql-action/init@v1
37
- with:
38
- languages: $\{{ matrix.language }}
39
- - name: Perform CodeQL Analysis
40
- uses: github/codeql-action/analyze@v1
27
+ {{> stepGit }}
28
+ - name: Initialize CodeQL
29
+ uses: github/codeql-action/init@v2
30
+ with:
31
+ languages: javascript
32
+ - name: Perform CodeQL Analysis
33
+ uses: github/codeql-action/analyze@v2
@@ -1,7 +1,7 @@
1
1
  module.exports = {
2
2
  extends: ['@commitlint/config-conventional'],
3
3
  rules: {
4
- 'type-enum': [2, 'always', [{{#each changelogTypes}}'{{type}}'{{#unless @last}}, {{/unless}}{{/each}}]],
4
+ 'type-enum': [2, 'always', [{{{ join (quote (pluck changelogTypes "type")) }}}]],
5
5
  'header-max-length': [2, 'always', 80],
6
6
  'subject-case': [0, 'always', ['lower-case', 'sentence-case', 'start-case']],
7
7
  },
@@ -2,32 +2,14 @@ version: 2
2
2
 
3
3
  updates:
4
4
  - package-ecosystem: npm
5
- directory: "/"
5
+ directory: {{ pkgDir }}
6
6
  schedule:
7
7
  interval: daily
8
8
  allow:
9
9
  - dependency-type: direct
10
- versioning-strategy: increase-if-necessary
10
+ versioning-strategy: {{ dependabot }}
11
11
  commit-message:
12
12
  prefix: deps
13
13
  prefix-development: chore
14
14
  labels:
15
15
  - "Dependencies"
16
-
17
- {{#if workspaces}}
18
- {{#each workspaces}}
19
- - package-ecosystem: npm
20
- directory: "{{.}}/"
21
- schedule:
22
- interval: daily
23
- allow:
24
- - dependency-type: direct
25
- versioning-strategy: increase-if-necessary
26
- commit-message:
27
- prefix: deps
28
- prefix-development: chore
29
- labels:
30
- - "Dependencies"
31
-
32
- {{/each}}
33
- {{/if}}
@@ -8,10 +8,10 @@ const localConfigs = readdir(__dirname)
8
8
 
9
9
  module.exports = {
10
10
  root: true,
11
- {{#if isRootMono}}
11
+ {{#if workspaceGlobs}}
12
12
  ignorePatterns: [
13
- {{#each workspaces}}
14
- '{{.}}',
13
+ {{#each workspaceGlobs}}
14
+ '{{ . }}',
15
15
  {{/each}}
16
16
  ],
17
17
  {{/if}}
@@ -3,5 +3,5 @@
3
3
 
4
4
  # keep these
5
5
  {{#each ignorePaths}}
6
- {{.}}
6
+ {{ . }}
7
7
  {{/each}}