Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: npm/template-oss
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 124406e9cad0e54b053e95ea15f260dabb85be10
Choose a base ref
...
head repository: npm/template-oss
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 844092742836cd09d9ac50bf5e8e1b2425b50711
Choose a head ref

Commits on Apr 22, 2022

  1. Copy the full SHA
    9bf3126 View commit details
  2. Copy the full SHA
    eb55928 View commit details
  3. chore(main): release 3.4.2 (#140)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Apr 22, 2022
    Copy the full SHA
    53cb445 View commit details

Commits on May 3, 2022

  1. fix: add 'use strict' to .eslintrc.js (#141)

    cacache wants that rule to replace a test and this file fails linting hehe
    wraithgar authored May 3, 2022
    Copy the full SHA
    6486967 View commit details
  2. chore(main): release 3.4.3 (#142)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored May 3, 2022
    Copy the full SHA
    190ecb1 View commit details

Commits on May 10, 2022

  1. 1
    Copy the full SHA
    f802204 View commit details

Commits on May 11, 2022

  1. Copy the full SHA
    ad8c6fc View commit details
  2. chore(main): release 3.5.0 (#148)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored May 11, 2022
    Copy the full SHA
    755a300 View commit details

Commits on Aug 15, 2022

  1. fix: compare to \n instead of os.EOL (#157)

    * fix: compare to \n instead of os.EOL
    
    os.EOL is \r\n in win32, which means this check is pretty much guaranteed to fail in windows
    
    * chore: lint
    nlf authored Aug 15, 2022
    Copy the full SHA
    5517e9e View commit details

Commits on Aug 16, 2022

  1. Copy the full SHA
    8176e44 View commit details
  2. fix: pin yaml to 2.0.0-11 (#161)

    nlf authored Aug 16, 2022
    Copy the full SHA
    e095275 View commit details
  3. Copy the full SHA
    4dde648 View commit details

Commits on Aug 22, 2022

  1. Copy the full SHA
    6f571eb View commit details

Commits on Aug 23, 2022

  1. chore(main): release 3.6.0 (#158)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Aug 23, 2022
    Copy the full SHA
    fc95e6e View commit details

Commits on Aug 24, 2022

  1. Copy the full SHA
    e5d3d0e View commit details

Commits on Aug 25, 2022

  1. Copy the full SHA
    95118ec View commit details
  2. Copy the full SHA
    0f2a89f View commit details
  3. Copy the full SHA
    09d955f View commit details
  4. chore(main): release 3.7.0 (#169)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Aug 25, 2022
    Copy the full SHA
    b37de29 View commit details
  5. Copy the full SHA
    678cb5a View commit details
  6. Copy the full SHA
    ce977c4 View commit details
  7. chore(main): release 3.7.1

    github-actions[bot] authored and lukekarrys committed Aug 25, 2022
    Copy the full SHA
    8e4e66d View commit details

Commits on Aug 31, 2022

  1. feat: use custom release please script (#174)

    * feat: use custom release please script
    
    * fix: install commitlint deps to package.json
    
    * fix: add breaking changes to changelog notes
    
    * chore: add tap timeout
    
    * fix: allow git installs for required packages
    
    * fix: use actions/checkout for pull requests and make setup deps partial
    
    * fix: pass token to release please
    
    * fix: check out headRefName from release please PR
    
    * fix: allow release please to pass in branch name for testing
    
    * fix: add node-workspace plugin
    
    * fix: branch name typo
    
    * feat: exclude other package commits from root
    
    * feat: call release-test workflow after updating release PR
    
    * fix: checkout head ref for dependabot
    
    * feat: add change default versioning strategy
    
    * feat: rewrite workspace deps
    
    * fix: use release please fork
    
    * fix: only write release test file if necessary
    
    * fix: set release please title patterns
    lukekarrys authored Aug 31, 2022
    Copy the full SHA
    7562777 View commit details
  2. Copy the full SHA
    0f44075 View commit details
  3. chore: release 3.8.0 (#176)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Aug 31, 2022
    Copy the full SHA
    e851661 View commit details

Commits on Sep 1, 2022

  1. fix: update a few release nits after trying it on the cli (#179)

    - Correctly link workspace dep changelog entry to release even when
      release component is different than the package name
    - Update changelog entry also when rewriting workspaces deps
    - Clone repo during release process with `fetch-depth: 0` so we can have
      full commit history to build `AUTHORS` files
    - Removes `preversion`, `postversion`, and `prepublishOnly` scripts now
      that all tagging happens via `release-please`
    - Correctly version root when going from prerelease -> release
    
    Closes #178
    lukekarrys authored Sep 1, 2022
    Copy the full SHA
    70782b3 View commit details
  2. chore: release 3.8.1 (#181)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Sep 1, 2022
    Copy the full SHA
    ae75f91 View commit details

Commits on Sep 8, 2022

  1. feat: update engines to ^14.17.0 || ^16.13.0 || >=18.0.0 (#184)

    BREAKING CHANGE: this updates this package and the templated engines for
    node to `^14.17.0 || ^16.13.0 || >=18.0.0`
    lukekarrys authored Sep 8, 2022
    Copy the full SHA
    a72774a View commit details
  2. deps: update yaml requirement from 2.0.0-11 to 2.1.1 (#163)

    Updates the requirements on [yaml](https://github.com/eemeli/yaml) to permit the latest version.
    - [Release notes](https://github.com/eemeli/yaml/releases)
    - [Commits](eemeli/yaml@v2.0.0-11...v2.1.1)
    
    ---
    updated-dependencies:
    - dependency-name: yaml
      dependency-type: direct:production
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Sep 8, 2022
    Copy the full SHA
    8e4785d View commit details
  3. chore: release 4.0.0 (#185)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Sep 8, 2022
    Copy the full SHA
    d281908 View commit details

Commits on Sep 13, 2022

  1. Copy the full SHA
    352d332 View commit details
  2. fix: use conventional commits from release-please for changelog (#183)

    `release-please` already fetches the commits and parses them into
    conventional commit objects, so we are able to reuse most of that
    instead of fetching it from GitHub again. This also adds tests for the
    changelog output.
    
    This also removes the workspace-deps plugin in favor of extending the
    builtin node-workspace plugin. This fixes the issue of workspaces
    sometimes not getting the correct tag name and changelog title if they
    were only bumped as part of a workspace dep.
    lukekarrys authored Sep 13, 2022
    Copy the full SHA
    b58d86a View commit details
  3. chore: release 4.1.0 (#188)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Sep 13, 2022
    Copy the full SHA
    f9f0964 View commit details
  4. Copy the full SHA
    78a05fe View commit details
  5. chore: release 4.1.1 (#191)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Sep 13, 2022
    Copy the full SHA
    c0f6c06 View commit details

Commits on Sep 14, 2022

  1. Copy the full SHA
    6bc355a View commit details
  2. chore: release 4.1.2 (#193)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Sep 14, 2022
    Copy the full SHA
    ca5c14e View commit details

Commits on Sep 15, 2022

  1. Copy the full SHA
    423450f View commit details
  2. feat: add content config option to allow a module to set own content

    This also removes a lot of the redundant snapshot tests in favor of
    testing the actual files written.
    
    This also adds a few other features to allow `npm/cli` to use this in
    the root workspace:
    
    - set `npm` and `npx` paths in workflows via config
    - dependabot now works with workspaces
    - templated files now include more partials which can be overwritten
      with `content` directory config
    - only file config options are merged between root and workspaces. this
      allows for the root to set config which will only apply to itself
    - workspace paths are ignored from linting and testing in the root
    lukekarrys committed Sep 15, 2022
    Copy the full SHA
    849cecc View commit details
  3. fix: dont run workflows outside of npm org (#194)

    This adds a `if: github.repository_owner == 'npm'` to each workflow so
    they don't run outside of the npm organization by default.
    
    Closes #182
    lukekarrys committed Sep 15, 2022
    Copy the full SHA
    ffa2c08 View commit details
  4. chore: release 4.2.0

    github-actions[bot] authored and lukekarrys committed Sep 15, 2022
    Copy the full SHA
    f3bb589 View commit details

Commits on Sep 16, 2022

  1. Copy the full SHA
    e43ee70 View commit details

Commits on Sep 18, 2022

  1. Copy the full SHA
    caf393c View commit details
  2. Copy the full SHA
    5b65537 View commit details

Commits on Sep 19, 2022

  1. Copy the full SHA
    3640080 View commit details
  2. chore: release 4.3.0

    github-actions[bot] authored and lukekarrys committed Sep 19, 2022
    Copy the full SHA
    2abf443 View commit details
  3. Copy the full SHA
    817d49e View commit details
  4. chore: release 4.3.1

    github-actions[bot] authored and lukekarrys committed Sep 19, 2022
    Copy the full SHA
    4bbb731 View commit details
  5. Copy the full SHA
    5fededb View commit details
  6. chore: release 4.3.2

    github-actions[bot] authored and lukekarrys committed Sep 19, 2022
    Copy the full SHA
    dd944ab View commit details
Showing with 10,813 additions and 2,087 deletions.
  1. +2 −0 .eslintrc.js
  2. +0 −6 .eslintrc.local.js
  3. +6 −0 .eslintrc.local.json
  4. +1 −1 .github/dependabot.yml
  5. +32 −0 .github/matchers/tap.json
  6. +0 −2 .github/settings.yml
  7. +22 −12 .github/workflows/audit.yml
  8. +210 −0 .github/workflows/ci-release.yml
  9. +107 −36 .github/workflows/ci.yml
  10. +11 −17 .github/workflows/codeql-analysis.yml
  11. +100 −22 .github/workflows/post-dependabot.yml
  12. +28 −18 .github/workflows/pull-request.yml
  13. +0 −26 .github/workflows/release-please.yml
  14. +298 −0 .github/workflows/release.yml
  15. +13 −10 .gitignore
  16. +3 −0 .release-please-manifest.json
  17. +233 −0 CHANGELOG.md
  18. +7 −0 CODE_OF_CONDUCT.md
  19. +260 −0 bin/release-manager.js
  20. +68 −0 bin/release-please.js
  21. +2 −2 lib/apply/apply-files.js
  22. +1 −1 lib/apply/index.js
  23. +5 −4 lib/check/check-apply.js
  24. +6 −6 lib/check/check-changelog.js
  25. +4 −4 lib/check/check-gitignore.js
  26. +1 −1 lib/check/index.js
  27. +202 −117 lib/config.js
  28. +5 −0 lib/content/CODE_OF_CONDUCT.md
  29. +29 −0 lib/content/_job-matrix.yml
  30. +8 −0 lib/content/_job.yml
  31. +30 −0 lib/content/_on-ci.yml
  32. +2 −0 lib/content/_step-audit.yml
  33. +54 −0 lib/content/_step-checks.yml
  34. +2 −0 lib/content/_step-deps.yml
  35. +12 −0 lib/content/_step-git.yml
  36. +4 −0 lib/content/_step-lint.yml
  37. +12 −9 lib/content/{setup-node.yml → _step-node.yml}
  38. +4 −0 lib/content/_step-test.yml
  39. +6 −0 lib/content/_steps-setup.yml
  40. +4 −8 lib/content/audit.yml
  41. +31 −0 lib/content/ci-release.yml
  42. +15 −52 lib/content/ci.yml
  43. +12 −19 lib/content/codeql-analysis.yml
  44. +1 −1 lib/content/commitlintrc.js
  45. +2 −2 lib/content/dependabot.yml
  46. +9 −0 lib/content/eslintrc.js
  47. +1 −14 lib/content/gitignore
  48. +82 −15 lib/content/index.js
  49. +1 −1 lib/content/npmrc
  50. +34 −18 lib/content/pkg.json
  51. +87 −19 lib/content/post-dependabot.yml
  52. +11 −14 lib/content/pull-request.yml
  53. +13 −0 lib/content/release-please-config.json
  54. +3 −0 lib/content/release-please-manifest.json
  55. +0 −56 lib/content/release-please.yml
  56. +133 −0 lib/content/release.yml
  57. +0 −11 lib/content/setup-git.yml
  58. +28 −0 lib/content/tap.json
  59. +27 −30 lib/index.js
  60. +83 −0 lib/release-please/changelog.js
  61. +56 −0 lib/release-please/github.js
  62. +97 −0 lib/release-please/index.js
  63. +193 −0 lib/release-please/node-workspace.js
  64. +14 −0 lib/release-please/util.js
  65. +103 −0 lib/release-please/version.js
  66. +73 −27 lib/util/files.js
  67. +3 −1 lib/util/get-git-url.js
  68. +34 −0 lib/util/gitignore.js
  69. +13 −1 lib/util/has-package.js
  70. +21 −0 lib/util/merge.js
  71. +79 −22 lib/util/parser.js
  72. +38 −20 lib/util/template.js
  73. +28 −15 package.json
  74. +36 −0 release-please-config.json
  75. +161 −0 tap-snapshots/test/apply/files-snapshots.js.test.cjs
  76. +1,351 −199 tap-snapshots/test/apply/full-content.js.test.cjs
  77. +0 −49 tap-snapshots/test/apply/index.js.test.cjs
  78. +0 −79 tap-snapshots/test/apply/lockfile.js.test.cjs
  79. +4,297 −0 tap-snapshots/test/apply/source-snapshots.js.test.cjs
  80. +0 −23 tap-snapshots/test/check/changelog.js.test.cjs
  81. +244 −0 tap-snapshots/test/check/diff-snapshots.js.test.cjs
  82. +0 −444 tap-snapshots/test/check/diffs.js.test.cjs
  83. +0 −215 tap-snapshots/test/check/gitignore.js.test.cjs
  84. +0 −22 tap-snapshots/test/check/required.js.test.cjs
  85. +248 −29 tap-snapshots/test/check/{index.js.test.cjs → snapshots.js.test.cjs}
  86. +0 −20 tap-snapshots/test/check/unwanted.js.test.cjs
  87. +47 −0 test/apply/allow-paths.js
  88. +81 −0 test/apply/engines.js
  89. +178 −0 test/apply/files-snapshots.js
  90. +0 −48 test/apply/full-content.js
  91. +278 −34 test/apply/index.js
  92. +0 −10 test/apply/lockfile.js
  93. +117 −0 test/apply/merge-yml.js
  94. +3 −71 test/apply/npm-bin.js
  95. +27 −0 test/apply/release.js
  96. +75 −0 test/apply/source-snapshots.js
  97. +27 −0 test/apply/version.js
  98. +0 −17 test/check/changelog.js
  99. +36 −46 test/check/{diffs.js → diff-snapshots.js}
  100. +1 −1 test/check/dogfood.js
  101. +0 −64 test/check/gitignore.js
  102. +10 −15 test/check/index.js
  103. +0 −9 test/check/required.js
  104. +77 −0 test/check/snapshots.js
  105. +0 −17 test/check/unwanted.js
  106. +0 −1 test/fixtures/header.js
  107. +13 −0 test/fixtures/yml-merge.js
  108. +16 −11 test/index.js
  109. +98 −0 test/release-please/changelog.js
  110. +178 −0 test/release-please/node-workspace.js
  111. +62 −0 test/release-please/version.js
  112. +28 −22 test/setup.js
  113. +5 −1 test/util/has-package.js
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/* This file is automatically added by @npmcli/template-oss. Do not edit. */

'use strict'

const { readdirSync: readdir } = require('fs')

const localConfigs = readdir(__dirname)
6 changes: 0 additions & 6 deletions .eslintrc.local.js

This file was deleted.

6 changes: 6 additions & 0 deletions .eslintrc.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ignorePatterns": [
"lib/content/*",
"!lib/content/index.js"
]
}
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ version: 2

updates:
- package-ecosystem: npm
directory: "/"
directory: /
schedule:
interval: daily
allow:
32 changes: 32 additions & 0 deletions .github/matchers/tap.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"//@npmcli/template-oss": "This file is automatically added by @npmcli/template-oss. Do not edit.",
"problemMatcher": [
{
"owner": "tap",
"pattern": [
{
"regexp": "^\\s*not ok \\d+ - (.*)",
"message": 1
},
{
"regexp": "^\\s*---"
},
{
"regexp": "^\\s*at:"
},
{
"regexp": "^\\s*line:\\s*(\\d+)",
"line": 1
},
{
"regexp": "^\\s*column:\\s*(\\d+)",
"column": 1
},
{
"regexp": "^\\s*file:\\s*(.*)",
"file": 1
}
]
}
]
}
2 changes: 0 additions & 2 deletions .github/settings.yml

This file was deleted.

34 changes: 22 additions & 12 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -5,23 +5,33 @@ name: Audit
on:
workflow_dispatch:
schedule:
# "At 01:00 on Monday" https://crontab.guru/#0_1_*_*_1
- cron: "0 1 * * 1"
# "At 08:00 UTC (01:00 PT) on Monday" https://crontab.guru/#0_8_*_*_1
- cron: "0 8 * * 1"

jobs:
audit:
name: Audit Dependencies
if: github.repository_owner == 'npm'
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: Setup git user
- name: Checkout
uses: actions/checkout@v3
- name: Setup Git User
run: |
git config --global user.email "npm team"
git config --global user.name "ops+robot@npmjs.com"
- uses: actions/setup-node@v3
git config --global user.email "npm-cli+bot@github.com"
git config --global user.name "npm CLI robot"
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Update npm to latest
node-version: 18.x
- name: Install npm@latest
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
- run: npm -v
- run: npm i --ignore-scripts --no-audit --no-fund --package-lock
- run: npm audit
- name: npm Version
run: npm -v
- name: Install Dependencies
run: npm i --ignore-scripts --no-audit --no-fund --package-lock
- name: Run Audit
run: npm audit
210 changes: 210 additions & 0 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
# This file is automatically added by @npmcli/template-oss. Do not edit.

name: CI - Release

on:
workflow_call:
inputs:
ref:
required: true
type: string
check-sha:
required: true
type: string

jobs:
lint-all:
name: Lint All
if: github.repository_owner == 'npm'
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Get Workflow Job
uses: actions/github-script@v6

id: check-output
env:
JOB_NAME: "Lint All"
MATRIX_NAME: ""
with:
script: |
const { owner, repo } = context.repo
const { data } = await github.rest.actions.listJobsForWorkflowRun({
owner,
repo,
run_id: context.runId,
per_page: 100
})
const jobName = process.env.JOB_NAME + process.env.MATRIX_NAME
const job = data.jobs.find(j => j.name.endsWith(jobName))
const jobUrl = job?.html_url
const shaUrl = `${context.serverUrl}/${owner}/${repo}/commit/${{ inputs.check-sha }}`
let summary = `This check is assosciated with ${shaUrl}\n\n`
if (jobUrl) {
summary += `For run logs, click here: ${jobUrl}`
} else {
summary += `Run logs could not be found for a job with name: "${jobName}"`
}
return { summary }
- name: Create Check
uses: LouisBrunner/checks-action@v1.3.1
id: check

with:
token: ${{ secrets.GITHUB_TOKEN }}
status: in_progress
name: Lint All
sha: ${{ inputs.check-sha }}
output: ${{ steps.check-output.outputs.result }}
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ inputs.ref }}
- name: Setup Git User
run: |
git config --global user.email "npm-cli+bot@github.com"
git config --global user.name "npm CLI robot"
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install npm@latest
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
- name: npm Version
run: npm -v
- name: Install Dependencies
run: npm i --ignore-scripts --no-audit --no-fund
- name: Lint
run: npm run lint --ignore-scripts
- name: Post Lint
run: npm run postlint --ignore-scripts
- name: Conclude Check
uses: LouisBrunner/checks-action@v1.3.1
if: always()
with:
token: ${{ secrets.GITHUB_TOKEN }}
conclusion: ${{ job.status }}
check_id: ${{ steps.check.outputs.check_id }}

test-all:
name: Test All - ${{ matrix.platform.name }} - ${{ matrix.node-version }}
if: github.repository_owner == 'npm'
strategy:
fail-fast: false
matrix:
platform:
- name: Linux
os: ubuntu-latest
shell: bash
- name: macOS
os: macos-latest
shell: bash
- name: Windows
os: windows-latest
shell: cmd
node-version:
- 14.17.0
- 14.x
- 16.13.0
- 16.x
- 18.0.0
- 18.x
runs-on: ${{ matrix.platform.os }}
defaults:
run:
shell: ${{ matrix.platform.shell }}
steps:
- name: Get Workflow Job
uses: actions/github-script@v6

id: check-output
env:
JOB_NAME: "Test All"
MATRIX_NAME: " - ${{ matrix.platform.name }} - ${{ matrix.node-version }}"
with:
script: |
const { owner, repo } = context.repo
const { data } = await github.rest.actions.listJobsForWorkflowRun({
owner,
repo,
run_id: context.runId,
per_page: 100
})
const jobName = process.env.JOB_NAME + process.env.MATRIX_NAME
const job = data.jobs.find(j => j.name.endsWith(jobName))
const jobUrl = job?.html_url
const shaUrl = `${context.serverUrl}/${owner}/${repo}/commit/${{ inputs.check-sha }}`
let summary = `This check is assosciated with ${shaUrl}\n\n`
if (jobUrl) {
summary += `For run logs, click here: ${jobUrl}`
} else {
summary += `Run logs could not be found for a job with name: "${jobName}"`
}
return { summary }
- name: Create Check
uses: LouisBrunner/checks-action@v1.3.1
id: check

with:
token: ${{ secrets.GITHUB_TOKEN }}
status: in_progress
name: Test All - ${{ matrix.platform.name }} - ${{ matrix.node-version }}
sha: ${{ inputs.check-sha }}
output: ${{ steps.check-output.outputs.result }}
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ inputs.ref }}
- name: Setup Git User
run: |
git config --global user.email "npm-cli+bot@github.com"
git config --global user.name "npm CLI robot"
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Update Windows npm
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.'))
run: |
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
tar xf npm-7.5.4.tgz
cd package
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
cd ..
rmdir /s /q package
- name: Install npm@7
if: startsWith(matrix.node-version, '10.')
run: npm i --prefer-online --no-fund --no-audit -g npm@7
- name: Install npm@latest
if: ${{ !startsWith(matrix.node-version, '10.') }}
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
- name: npm Version
run: npm -v
- name: Install Dependencies
run: npm i --ignore-scripts --no-audit --no-fund
- name: Add Problem Matcher
run: echo "::add-matcher::.github/matchers/tap.json"
- name: Test
run: npm test --ignore-scripts
- name: Conclude Check
uses: LouisBrunner/checks-action@v1.3.1
if: always()
with:
token: ${{ secrets.GITHUB_TOKEN }}
conclusion: ${{ job.status }}
check_id: ${{ steps.check.outputs.check_id }}
Loading