@npmcli/template-oss 4.4.1 → 4.4.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.
@@ -11,7 +11,7 @@ jobs:
11
11
  {{> job
12
12
  jobName="template-oss"
13
13
  jobIf="github.actor == 'dependabot[bot]'"
14
- jobCheckout=(obj ref="${{ github.event.pull_request.head_ref }}")
14
+ jobCheckout=(obj ref="${{ github.event.pull_request.head.ref }}")
15
15
  }}
16
16
  - name: Fetch Dependabot Metadata
17
17
  id: metadata
@@ -25,10 +25,13 @@ jobs:
25
25
  if: contains(steps.metadata.outputs.dependency-names, '{{ __NAME__ }}')
26
26
  id: flags
27
27
  run: |
28
- if [[ "$\{{ steps.metadata.outputs.directory }}" == "/" ]]; then
28
+ dependabot_dir="$\{{ steps.metadata.outputs.directory }}"
29
+ if [[ "$dependabot_dir" == "/" ]]; then
29
30
  echo "::set-output name=workspace::-iwr"
30
31
  else
31
- echo "::set-output name=workspace::-w $\{{ steps.metadata.outputs.directory }}"
32
+ # strip leading slash from directory so it works as a
33
+ # a path to the workspace flag
34
+ echo "::set-output name=workspace::-w ${dependabot_dir#/}"
32
35
  fi
33
36
 
34
37
  - name: Apply Changes
@@ -65,7 +68,7 @@ jobs:
65
68
  # If the previous step failed, then reset the commit and remove any workflow changes
66
69
  # and attempt to commit and push again. This is helpful because we will have a commit
67
70
  # with the correct prefix that we can then --amend with @npmcli/stafftools later.
68
- - name: Commit and push all changes except workflows
71
+ - name: Push All Changes Except Workflows
69
72
  if: steps.apply.outputs.changes && steps.push-all.outcome == 'failure'
70
73
  env:
71
74
  GITHUB_TOKEN: $\{{ secrets.GITHUB_TOKEN }}
@@ -20,9 +20,21 @@ const main = async ({ repo: fullRepo, token, dryRun, branch }) => {
20
20
 
21
21
  const [owner, repo] = fullRepo.split('/')
22
22
  const github = await RP.GitHub.create({ owner, repo, token })
23
+
24
+ // This is mostly for testing and debugging. Use environs with the
25
+ // format `RELEASE_PLEASE_<manfiestOverrideConfigName>` (eg
26
+ // `RELEASE_PLEASE_lastReleaseSha=<SHA>`) to set one-off config items
27
+ // for the release please run without needing to commit and push the config.
28
+ const manifestOverrides = Object.entries(process.env)
29
+ .filter(([k, v]) => k.startsWith('RELEASE_PLEASE_') && v != null)
30
+ .map(([k, v]) => [k.replace('RELEASE_PLEASE_', ''), v])
31
+
23
32
  const manifest = await RP.Manifest.fromManifest(
24
33
  github,
25
- branch ?? github.repository.defaultBranch
34
+ branch ?? github.repository.defaultBranch,
35
+ undefined,
36
+ undefined,
37
+ Object.fromEntries(manifestOverrides)
26
38
  )
27
39
 
28
40
  const pullRequests = await (dryRun ? manifest.buildPullRequests() : manifest.createPullRequests())
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npmcli/template-oss",
3
- "version": "4.4.1",
3
+ "version": "4.4.3",
4
4
  "description": "templated files used in npm CLI team oss projects",
5
5
  "main": "lib/content/index.js",
6
6
  "bin": {
@@ -47,7 +47,7 @@
47
47
  "lodash": "^4.17.21",
48
48
  "npm-package-arg": "^9.0.1",
49
49
  "proc-log": "^2.0.0",
50
- "release-please": "npm:@npmcli/release-please@^14.2.4",
50
+ "release-please": "npm:@npmcli/release-please@^14.2.5",
51
51
  "semver": "^7.3.5",
52
52
  "yaml": "^2.1.1"
53
53
  },