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: semantic-release/npm
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v11.0.3
Choose a base ref
...
head repository: semantic-release/npm
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v12.0.0
Choose a head ref
  • 5 commits
  • 5 files changed
  • 3 contributors

Commits on Mar 7, 2024

  1. chore(deps): update dependency got to v14.2.1 (#762)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Mar 7, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    baywet Vincent Biret
    Copy the full SHA
    c7f9b0a View commit details

Commits on Mar 15, 2024

  1. feat(node-versions): dropped support for node v18 and v19

    BREAKING CHANGE: node v18 and v19 are no longer supported
    travi committed Mar 15, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    baywet Vincent Biret
    Copy the full SHA
    2df962b View commit details
  2. feat(exports): defined exports to point at ./index.js

    BREAKING CHANGE: `exports` has been defined, which prevents access to private apis (which arent
    intended for consumption anyway)
    travi committed Mar 15, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9e193c2 View commit details
  3. ci(verify): updated to follow modern conventions

    travi committed Mar 15, 2024
    Copy the full SHA
    adb1ded View commit details

Commits on Mar 16, 2024

  1. Merge pull request #766 from semantic-release/next-major

    next major
    travi authored Mar 16, 2024
    Copy the full SHA
    702c68a View commit details
Showing with 9,869 additions and 4,339 deletions.
  1. +29 −9 .github/workflows/test.yml
  2. +9,805 −4,317 package-lock.json
  3. +28 −10 package.json
  4. +5 −2 test/helpers/npm-registry.js
  5. +2 −1 test/integration.test.js
38 changes: 29 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -8,14 +8,22 @@ name: Test
types:
- opened
- synchronize

permissions:
contents: read

env:
FORCE_COLOR: 1
NPM_CONFIG_COLOR: always

jobs:
test_matrix:
strategy:
matrix:
node-version:
- 18.17.0
- 20.0.0
- 20.8.1
- 20
- 21
os:
- ubuntu-latest
runs-on: "${{ matrix.os }}"
@@ -27,18 +35,30 @@ jobs:
node-version: "${{ matrix.node-version }}"
cache: npm
- run: npm clean-install
- run: "npm run test:ci"
test:
- run: npm test

test_dev:
runs-on: ubuntu-latest
needs: test_matrix
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: "lts/*"
node-version-file: .nvmrc
cache: npm
- run: npm clean-install
- run: npm audit signatures
- name: Ensure dependencies are compatible with the version of node
run: npx ls-engines
- run: npm run lint
- run: npm test

test:
runs-on: ubuntu-latest
needs:
- test_dev
- test_matrix
if: ${{ !cancelled() }}
steps:
- name: All matrix versions passed
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Some matrix version failed
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
14,122 changes: 9,805 additions & 4,317 deletions package-lock.json

Large diffs are not rendered by default.

38 changes: 28 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -5,7 +5,8 @@
"author": "Pierre Vanduynslager (https://twitter.com/@pvdlg_)",
"ava": {
"files": [
"test/**/*.test.js"
"test/**/*.test.js",
"!test/integration.test.js"
],
"timeout": "2m",
"workerThreads": false
@@ -37,15 +38,20 @@
"c8": "9.1.0",
"codecov": "3.8.3",
"dockerode": "4.0.2",
"got": "14.2.0",
"got": "14.2.1",
"lockfile-lint": "4.13.2",
"ls-engines": "0.9.1",
"npm-run-all2": "6.1.2",
"p-retry": "6.2.0",
"prettier": "3.2.5",
"publint": "0.2.7",
"semantic-release": "23.0.2",
"sinon": "17.0.1",
"stream-buffers": "3.0.2"
"stream-buffers": "3.0.2",
"strip-ansi": "7.1.0"
},
"engines": {
"node": "^18.17 || >=20"
"node": ">=20.8.1"
},
"files": [
"lib",
@@ -60,7 +66,8 @@
"version"
],
"license": "MIT",
"main": "index.js",
"main": "./index.js",
"exports": "./index.js",
"c8": {
"include": [
"lib/**/*.js",
@@ -73,6 +80,14 @@
],
"all": true
},
"lockfile-lint": {
"path": "package-lock.json",
"type": "npm",
"validate-https": true,
"allowed-hosts": [
"npm"
]
},
"peerDependencies": {
"semantic-release": ">=20.1.0"
},
@@ -89,12 +104,15 @@
"url": "https://github.com/semantic-release/npm.git"
},
"scripts": {
"codecov": "codecov -f coverage/coverage-final.json",
"lint": "prettier --check \"{lib,test}/**/*.{js,json,ts}\" \"*.{md,json,js}\" \".github/**/*.yml\"",
"lint:fix": "prettier --write \"{lib,test}/**/*.{js,json,ts}\" \"*.{md,json,js}\" \".github/**/*.yml\"",
"pretest": "npm run lint",
"test": "c8 ava -v",
"test:ci": "c8 ava -v"
"lint:prettier": "prettier --check \"{lib,test}/**/*.{js,json,ts}\" \"*.{md,json,js}\" \".github/**/*.yml\"",
"lint:prettier:fix": "prettier --write \"*.{js,json,md}\" \".github/**/*.{md,yml}\" \"{bin,lib,test}/**/*.js\"",
"lint:lockfile": "lockfile-lint",
"lint:engines": "ls-engines",
"lint:publish": "publint --strict",
"test": "npm-run-all --print-label --parallel lint:* --parallel test:*",
"test:unit": "c8 ava --verbose",
"test:integration": "ava --verbose test/integration.test.js"
},
"type": "module",
"renovate": {
7 changes: 5 additions & 2 deletions test/helpers/npm-registry.js
Original file line number Diff line number Diff line change
@@ -29,8 +29,11 @@ export async function start() {
container = await docker.createContainer({
Tty: true,
Image: IMAGE,
PortBindings: { [`${REGISTRY_PORT}/tcp`]: [{ HostPort: `${REGISTRY_PORT}` }] },
Binds: [`${path.join(__dirname, "config.yaml")}:/verdaccio/conf/config.yaml`],
HostConfig: {
PortBindings: { [`${REGISTRY_PORT}/tcp`]: [{ HostPort: `${REGISTRY_PORT}` }] },
Binds: [`${path.join(__dirname, "config.yaml")}:/verdaccio/conf/config.yaml`],
},
ExposedPorts: { [`${REGISTRY_PORT}/tcp`]: {} },
});

await container.start();
3 changes: 2 additions & 1 deletion test/integration.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import path from "path";
import test from "ava";
import fs from "fs-extra";
import stripAnsi from "strip-ansi";
import { execa } from "execa";
import { spy } from "sinon";
import { temporaryDirectory } from "tempy";
@@ -596,7 +597,7 @@ test("Publish the package and add to lts dist-tag", async (t) => {

t.deepEqual(result, { name: "npm package (@release-1.x dist-tag)", url: undefined, channel: "release-1.x" });
t.is(
(await execa("npm", ["view", pkg.name, "dist-tags"], { cwd, env })).stdout,
stripAnsi((await execa("npm", ["view", pkg.name, "dist-tags"], { cwd, env })).stdout),
"{ latest: '1.0.0', 'release-1.x': '1.0.0' }"
);
});