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/run-script
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.0.1
Choose a base ref
...
head repository: npm/run-script
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.0.2
Choose a head ref
  • 7 commits
  • 19 files changed
  • 4 contributors

Commits on Mar 3, 2022

  1. chore: update @npmcli/template-oss requirement from ^2.9.1 to ^2.9.2 (#…

    …56)
    
    * chore: update @npmcli/template-oss requirement from ^2.9.1 to ^2.9.2
    
    Updates the requirements on [@npmcli/template-oss](https://github.com/npm/template-oss) to permit the latest version.
    - [Release notes](https://github.com/npm/template-oss/releases)
    - [Changelog](https://github.com/npm/template-oss/blob/main/CHANGELOG.md)
    - [Commits](npm/template-oss@v2.9.1...v2.9.2)
    
    ---
    updated-dependencies:
    - dependency-name: "@npmcli/template-oss"
      dependency-type: direct:development
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    * chore: postinstall for dependabot template-oss PR
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: npm cli ops bot <ops+npm-cli@npmjs.com>
    dependabot[bot] and npm cli ops bot authored Mar 3, 2022
    Copy the full SHA
    16eb42a View commit details

Commits on Mar 28, 2022

  1. chore: bump @npmcli/template-oss from 2.9.2 to 3.2.0 (#62)

    * chore: bump @npmcli/template-oss from 2.9.2 to 3.2.0
    
    Bumps [@npmcli/template-oss](https://github.com/npm/template-oss) from 2.9.2 to 3.2.0.
    - [Release notes](https://github.com/npm/template-oss/releases)
    - [Changelog](https://github.com/npm/template-oss/blob/main/CHANGELOG.md)
    - [Commits](npm/template-oss@v2.9.2...v3.2.0)
    
    ---
    updated-dependencies:
    - dependency-name: "@npmcli/template-oss"
      dependency-type: direct:development
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    * chore: postinstall for dependabot template-oss PR
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Gar <gar+gh@danger.computer>
    dependabot[bot] and wraithgar authored Mar 28, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    4b24d9f View commit details
  2. chore: bump tap from 15.2.3 to 16.0.1 (#63)

    Bumps [tap](https://github.com/tapjs/node-tap) from 15.2.3 to 16.0.1.
    - [Release notes](https://github.com/tapjs/node-tap/releases)
    - [Commits](tapjs/tapjs@v15.2.3...v16.0.1)
    
    ---
    updated-dependencies:
    - dependency-name: tap
      dependency-type: direct:development
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 28, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    c9c6bf6 View commit details

Commits on Apr 5, 2022

  1. deps: bump @npmcli/node-gyp from 1.0.3 to 2.0.0 (#65)

    Bumps [@npmcli/node-gyp](https://github.com/npm/node-gyp) from 1.0.3 to 2.0.0.
    - [Release notes](https://github.com/npm/node-gyp/releases)
    - [Changelog](https://github.com/npm/node-gyp/blob/main/CHANGELOG.md)
    - [Commits](npm/node-gyp@v1.0.3...v2.0.0)
    
    ---
    updated-dependencies:
    - dependency-name: "@npmcli/node-gyp"
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Apr 5, 2022

    Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    731240d View commit details
  2. chore: bump @npmcli/template-oss from 3.2.0 to 3.2.2 (#64)

    * chore: bump @npmcli/template-oss from 3.2.0 to 3.2.2
    
    Bumps [@npmcli/template-oss](https://github.com/npm/template-oss) from 3.2.0 to 3.2.2.
    - [Release notes](https://github.com/npm/template-oss/releases)
    - [Changelog](https://github.com/npm/template-oss/blob/main/CHANGELOG.md)
    - [Commits](npm/template-oss@v3.2.0...v3.2.2)
    
    ---
    updated-dependencies:
    - dependency-name: "@npmcli/template-oss"
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    * chore: postinstall for dependabot template-oss PR
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Gar <gar+gh@danger.computer>
    dependabot[bot] and wraithgar authored Apr 5, 2022
    Copy the full SHA
    b927fc6 View commit details
  3. deps: bump @npmcli/promise-spawn from 1.3.2 to 3.0.0 (#67)

    Bumps [@npmcli/promise-spawn](https://github.com/npm/promise-spawn) from 1.3.2 to 3.0.0.
    - [Release notes](https://github.com/npm/promise-spawn/releases)
    - [Changelog](https://github.com/npm/promise-spawn/blob/main/CHANGELOG.md)
    - [Commits](npm/promise-spawn@v1.3.2...v3.0.0)
    
    ---
    updated-dependencies:
    - dependency-name: "@npmcli/promise-spawn"
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Apr 5, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    afcab18 View commit details
  4. chore(main): release 3.0.2 (#66)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Apr 5, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    51a597b View commit details
5 changes: 2 additions & 3 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
// This file is automatically added by @npmcli/template-oss. Do not edit.
/* This file is automatically added by @npmcli/template-oss. Do not edit. */

module.exports = {
extends: ['@commitlint/config-conventional'],
// If you change rules be sure to also update release-please.yml
rules: {
'type-enum': [2, 'always', ['feat', 'fix', 'docs', 'chore', 'deps']],
'type-enum': [2, 'always', ['feat', 'fix', 'docs', 'deps', 'chore']],
'header-max-length': [2, 'always', 80],
'subject-case': [0, 'always', ['lower-case', 'sentence-case', 'start-case']],
},
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file is automatically added by @npmcli/template-oss. Do not edit.
/* This file is automatically added by @npmcli/template-oss. Do not edit. */

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

@@ -7,6 +7,7 @@ const localConfigs = readdir(__dirname)
.map((file) => `./${file}`)

module.exports = {
root: true,
extends: [
'@npmcli',
...localConfigs,
4 changes: 3 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
* @npm/cli-team
# This file is automatically added by @npmcli/template-oss. Do not edit.

* @npm/cli-team
88 changes: 44 additions & 44 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -3,52 +3,52 @@
name: Bug
description: File a bug/issue
title: "[BUG] <title>"
labels: [Bug, Needs Triage]
labels: [ Bug, Needs Triage ]

body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please [search here](./issues) to see if an issue already exists for your problem.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Current Behavior
description: A clear & concise description of what you're experiencing.
validations:
required: false
- type: textarea
attributes:
label: Expected Behavior
description: A clear & concise description of what you expected to happen.
validations:
required: false
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
value: |
1. In this environment...
2. With this config...
3. Run '...'
4. See error...
validations:
required: false
- type: textarea
attributes:
label: Environment
description: |
examples:
- **npm**: 7.6.3
- **Node**: 13.14.0
- **OS**: Ubuntu 20.04
- **platform**: Macbook Pro
value: |
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please [search here](./issues) to see if an issue already exists for your problem.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Current Behavior
description: A clear & concise description of what you're experiencing.
validations:
required: false
- type: textarea
attributes:
label: Expected Behavior
description: A clear & concise description of what you expected to happen.
validations:
required: false
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
value: |
1. In this environment...
2. With this config...
3. Run '...'
4. See error...
validations:
required: false
- type: textarea
attributes:
label: Environment
description: |
examples:
- **npm**: 7.6.3
- **Node**: 13.14.0
- **OS**: Ubuntu 20.04
- **platform**: Macbook Pro
value: |
- npm:
- Node:
- OS:
- platform:
validations:
required: false

validations:
required: false
25 changes: 13 additions & 12 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# This file is automatically added by @npmcli/template-oss. Do not edit.

version: 2

updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
allow:
- dependency-type: direct
versioning-strategy: increase
commit-message:
prefix: deps
prefix-development: chore
labels:
- "Dependencies"
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
allow:
- dependency-type: direct
versioning-strategy: increase-if-necessary
commit-message:
prefix: deps
prefix-development: chore
labels:
- "Dependencies"
22 changes: 13 additions & 9 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -3,21 +3,25 @@
name: Audit

on:
workflow_dispatch:
schedule:
# "At 01:00 on Monday" https://crontab.guru/#0_1_*_*_1
- cron: "0 1 * * 1"
workflow_dispatch:

jobs:
audit:
name: npm audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- name: Setup git user
run: |
git config --global user.email "ops+npm-cli@npmjs.com"
git config --global user.name "npm cli ops bot"
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install deps
run: npm i --package-lock
- name: Audit
run: npm audit
node-version: 16.x
- name: Update npm to latest
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
- run: npm -v
- run: npm i --ignore-scripts --package-lock
- run: npm audit
60 changes: 42 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -3,7 +3,10 @@
name: CI

on:
workflow_dispatch:
pull_request:
branches:
- '*'
push:
branches:
- main
@@ -16,47 +19,68 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- name: Setup git user
run: |
git config --global user.email "ops+npm-cli@npmjs.com"
git config --global user.name "npm cli ops bot"
- uses: actions/setup-node@v3
with:
node-version: '16'
- run: npm i --prefer-online -g npm@latest
- run: npm i
node-version: 16.x
- name: Update npm to latest
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
- run: npm -v
- run: npm i --ignore-scripts
- run: npm run lint

test:
strategy:
fail-fast: false
matrix:
node-version: [12.13.0, 12.x, 14.15.0, 14.x, 16.13.0, 16.x]
node-version:
- 12.13.0
- 12.x
- 14.15.0
- 14.x
- 16.0.0
- 16.x
platform:
- os: ubuntu-latest
shell: bash
- os: macos-latest
shell: bash
- os: windows-latest
shell: cmd
- os: ubuntu-latest
shell: bash
- os: macos-latest
shell: bash
- os: windows-latest
shell: cmd
runs-on: ${{ matrix.platform.os }}
defaults:
run:
shell: ${{ matrix.platform.shell }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- name: Setup git user
run: |
git config --global user.email "ops+npm-cli@npmjs.com"
git config --global user.name "npm cli ops bot"
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
- name: Update to workable npm (windows)
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14'))
# 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: Update npm
- name: Update npm to 7
# If we do test on npm 10 it needs npm7
if: startsWith(matrix.node-version, '10.')
run: npm i --prefer-online --no-fund --no-audit -g npm@7
- name: Update npm to latest
if: ${{ !startsWith(matrix.node-version, '10.') }}
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
- run: npm -v
- run: npm i
- run: npm i --ignore-scripts
- run: npm test --ignore-scripts
30 changes: 18 additions & 12 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -4,10 +4,14 @@ name: "CodeQL"

on:
push:
branches: [ main ]
branches:
- main
- latest
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
branches:
- main
- latest
schedule:
# "At 03:00 on Monday" https://crontab.guru/#0_3_*_*_1
- cron: "0 3 * * 1"
@@ -24,15 +28,17 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
language: [ javascript ]

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- uses: actions/checkout@v3
- name: Setup git user
run: |
git config --global user.email "ops+npm-cli@npmjs.com"
git config --global user.name "npm cli ops bot"
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
27 changes: 18 additions & 9 deletions .github/workflows/post-dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,44 @@
# This file is automatically added by @npmcli/template-oss. Do not edit.

name: "Post Dependabot Actions"
name: Post Dependabot Actions

on: pull_request

# https://docs.github.com/en/rest/overview/permissions-required-for-github-apps
permissions:
actions: write
contents: write

jobs:
Install:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
if: github.actor == 'dependabot[bot]'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- name: Setup git user
run: |
git config --global user.email "ops+npm-cli@npmjs.com"
git config --global user.name "npm cli ops bot"
- uses: actions/setup-node@v3
with:
node-version: '16'
node-version: 16.x
- name: Update npm to latest
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
- run: npm -v
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.1.1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: npm install and commit
if: ${{contains(steps.metadata.outputs.dependency-names, '@npmcli/template-oss')}}
if: contains(steps.metadata.outputs.dependency-names, '@npmcli/template-oss')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --local user.email "ops+npm-cli@npmjs.com"
git config --local user.name "npm cli ops bot"
gh pr checkout ${{ github.event.pull_request.number }}
npm install
npm install --ignore-scripts
npm run template-oss-apply
git add .
git commit -am "chore: postinstall for dependabot template-oss PR"
git push
npm run lint
Loading