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: v7.0.10
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: v7.1.0
Choose a head ref
  • 19 commits
  • 6 files changed
  • 5 contributors

Commits on Jan 19, 2021

  1. chore(deps): update dependency semantic-release to v17.3.4 (#325)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jan 19, 2021
    Copy the full SHA
    1fd4f08 View commit details

Commits on Jan 20, 2021

  1. chore(deps): update dependency semantic-release to v17.3.5 (#326)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jan 20, 2021

    Verified

    This commit was signed with the committer’s verified signature.
    promatik António Almeida
    Copy the full SHA
    84a93e1 View commit details

Commits on Jan 21, 2021

  1. chore(deps): update dependency semantic-release to v17.3.6 (#327)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jan 21, 2021
    Copy the full SHA
    49d7cf5 View commit details

Commits on Jan 23, 2021

  1. chore(deps): update dependency semantic-release to v17.3.7 (#329)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jan 23, 2021
    Copy the full SHA
    ef6ff42 View commit details
  2. chore(deps): update dependency p-retry to v4.3.0 (#330)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jan 23, 2021
    Copy the full SHA
    bf48ca7 View commit details
  3. chore(deps): update dependency sinon to v9.2.4 (#331)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jan 23, 2021
    Copy the full SHA
    a35942e View commit details

Commits on Jan 25, 2021

  1. chore(deps): lock file maintenance (#332)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jan 25, 2021
    Copy the full SHA
    5593110 View commit details

Commits on Jan 30, 2021

  1. chore(deps): update dependency delay to v4.4.1 (#334)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jan 30, 2021
    Copy the full SHA
    722bc6a View commit details

Commits on Feb 1, 2021

  1. chore(deps): lock file maintenance (#335)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Feb 1, 2021
    Copy the full SHA
    97dcc9d View commit details
  2. chore(deps): lock file maintenance (#336)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Feb 1, 2021
    Copy the full SHA
    d93b5f0 View commit details
  3. chore(deps): update dependency delay to v5 (#337)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Feb 1, 2021
    Copy the full SHA
    94679ae View commit details

Commits on Feb 8, 2021

  1. chore(deps): lock file maintenance (#341)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Feb 8, 2021
    Copy the full SHA
    219dbec View commit details
  2. chore(deps): update dependency semantic-release to v17.3.8 (#342)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Feb 8, 2021
    Copy the full SHA
    8c818d4 View commit details

Commits on Feb 13, 2021

  1. chore(deps): update dependency semantic-release to v17.3.9 (#343)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Feb 13, 2021
    Copy the full SHA
    0be991b View commit details

Commits on Feb 15, 2021

  1. chore(deps): lock file maintenance (#344)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Feb 15, 2021
    Copy the full SHA
    8af06fd View commit details
  2. chore(deps): update dependency p-retry to v4.4.0 (#345)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Feb 15, 2021
    Copy the full SHA
    1800e75 View commit details

Commits on Feb 28, 2021

  1. Copy the full SHA
    cc771b8 View commit details

Commits on Mar 1, 2021

  1. chore(deps): lock file maintenance (#348)

    * chore(deps): lock file maintenance
    
    * build(package): lock file
    
    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
    3 people authored Mar 1, 2021
    Copy the full SHA
    7338fc2 View commit details

Commits on Mar 30, 2021

  1. feat: use npm v7 (#304)

    danez authored Mar 30, 2021
    Copy the full SHA
    a15c017 View commit details
Showing with 5,087 additions and 2,940 deletions.
  1. +1 −1 README.md
  2. +5,049 −2,895 package-lock.json
  3. +5 −5 package.json
  4. +23 −0 test/helpers/config.yaml
  5. +9 −13 test/helpers/npm-registry.js
  6. +0 −26 test/prepare.test.js
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -121,7 +121,7 @@ When publishing from a sub-directory with the `pkgRoot` option, the `package.jso
```json
{
"scripts": {
"postpublish": "cp -r package.json .. && cp -r npm-shrinkwrap.json .."
"postversion": "cp -r package.json .. && cp -r npm-shrinkwrap.json .."
}
}
```
7,944 changes: 5,049 additions & 2,895 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@
"lodash": "^4.17.15",
"nerf-dart": "^1.0.0",
"normalize-url": "^5.0.0",
"npm": "^6.14.9",
"npm": "^7.0.0",
"rc": "^1.2.8",
"read-pkg": "^5.0.0",
"registry-auth-token": "^4.0.0",
@@ -35,14 +35,14 @@
"ava": "3.15.0",
"clear-module": "4.1.1",
"codecov": "3.8.1",
"delay": "4.4.0",
"delay": "5.0.0",
"dockerode": "3.2.1",
"get-stream": "6.0.0",
"got": "11.8.1",
"nyc": "15.1.0",
"p-retry": "4.2.0",
"semantic-release": "17.3.3",
"sinon": "9.2.3",
"p-retry": "4.4.0",
"semantic-release": "17.3.9",
"sinon": "9.2.4",
"stream-buffers": "3.0.2",
"xo": "0.36.1"
},
23 changes: 23 additions & 0 deletions test/helpers/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
storage: /verdaccio/storage/data
plugins: /verdaccio/plugins
web:
title: Verdaccio
auth:
htpasswd:
file: /verdaccio/storage/htpasswd
packages:
'@*/*':
access: $all
publish: $authenticated
unpublish: $authenticated
'**':
access: $all
publish: $authenticated
unpublish: $authenticated
server:
keepAliveTimeout: 60
middlewares:
audit:
enabled: true
logs:
- { type: stdout, format: pretty, level: http }
22 changes: 9 additions & 13 deletions test/helpers/npm-registry.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
const Docker = require('dockerode');
const getStream = require('get-stream');
const got = require('got');
const path = require('path');
const delay = require('delay');
const pRetry = require('p-retry');

const IMAGE = 'semanticrelease/npm-registry-docker:latest';
const SERVER_PORT = 25986;
const COUCHDB_PORT = 5984;
const SERVER_HOST = 'localhost';
const COUCHDB_USER = 'admin';
const COUCHDB_PASSWORD = 'password';
const IMAGE = 'verdaccio/verdaccio:4';
const REGISTRY_PORT = 4873;
const REGISTRY_HOST = 'localhost';
const NPM_USERNAME = 'integration';
const NPM_PASSWORD = 'suchsecure';
const NPM_EMAIL = 'integration@test.com';
@@ -25,16 +23,16 @@ async function start() {
container = await docker.createContainer({
Tty: true,
Image: IMAGE,
PortBindings: {[`${COUCHDB_PORT}/tcp`]: [{HostPort: `${SERVER_PORT}`}]},
Env: [`COUCHDB_USER=${COUCHDB_USER}`, `COUCHDB_PASSWORD=${COUCHDB_PASSWORD}`],
PortBindings: {[`${REGISTRY_PORT}/tcp`]: [{HostPort: `${REGISTRY_PORT}`}]},
Binds: [`${path.join(__dirname, 'config.yaml')}:/verdaccio/conf/config.yaml`],
});

await container.start();
await delay(4000);

try {
// Wait for the registry to be ready
await pRetry(() => got(`http://${SERVER_HOST}:${SERVER_PORT}/registry/_design/app`, {cache: false}), {
await pRetry(() => got(`http://${REGISTRY_HOST}:${REGISTRY_PORT}/`, {cache: false}), {
retries: 7,
minTimeout: 1000,
factor: 2,
@@ -44,9 +42,7 @@ async function start() {
}

// Create user
await got(`http://${SERVER_HOST}:${SERVER_PORT}/_users/org.couchdb.user:${NPM_USERNAME}`, {
username: COUCHDB_USER,
password: COUCHDB_PASSWORD,
await got(`http://${REGISTRY_HOST}:${REGISTRY_PORT}/-/user/org.couchdb.user:${NPM_USERNAME}`, {
method: 'PUT',
json: {
_id: `org.couchdb.user:${NPM_USERNAME}`,
@@ -59,7 +55,7 @@ async function start() {
});
}

const url = `http://${SERVER_HOST}:${SERVER_PORT}/registry/_design/app/_rewrite/`;
const url = `http://${REGISTRY_HOST}:${REGISTRY_PORT}/`;

const authEnv = {
npm_config_registry: url, // eslint-disable-line camelcase
26 changes: 0 additions & 26 deletions test/prepare.test.js
Original file line number Diff line number Diff line change
@@ -189,32 +189,6 @@ test('Preserve indentation and newline', async (t) => {
t.deepEqual(t.context.log.args[0], ['Write version %s to package.json in %s', '1.0.0', cwd]);
});

test('Use default indentation and newline if it cannot be detected', async (t) => {
const cwd = tempy.directory();
const npmrc = tempy.file({name: '.npmrc'});
const packagePath = path.resolve(cwd, 'package.json');
await outputFile(packagePath, `{"name": "package-name","version": "0.0.0-dev"}`);

await prepare(
npmrc,
{},
{
cwd,
env: {},
stdout: t.context.stdout,
stderr: t.context.stderr,
nextRelease: {version: '1.0.0'},
logger: t.context.logger,
}
);

// Verify package.json has been updated
t.is(await readFile(packagePath, 'utf-8'), `{\n "name": "package-name",\n "version": "1.0.0"\n}\n`);

// Verify the logger has been called with the version updated
t.deepEqual(t.context.log.args[0], ['Write version %s to package.json in %s', '1.0.0', cwd]);
});

test('Create the package in the "tarballDir" directory', async (t) => {
const cwd = tempy.directory();
const npmrc = tempy.file({name: '.npmrc'});