Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
FLOATING PATCH: Canarification™
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed May 22, 2018
1 parent c9c6b45 commit 245a5a7
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 12 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ npm(1) -- a JavaScript package manager

[![Build Status](https://img.shields.io/travis/npm/npm/latest.svg)](https://travis-ci.org/npm/npm)

# NOTE: This is a "Canary" version of npm itself!

This version of npm is meant to be rapid-release and unstable, essentially
tracking `release-next` on the main npm repository (but not necessarily).

The code in this package might be experimental, unreviewed, or have specific
errors while adding other features.

## SYNOPSIS

This is just enough info to get you up and running.
Expand Down
1 change: 1 addition & 0 deletions lib/npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@
if (loadErr) return
loadErr = er
if (er) return cb_(er)
log.notice('CANARY', 'npmc is experimental software. If you find an issue, please file it in the main npm repository, and call out that you were using npmc.')
if (npm.config.get('force')) {
log.warn('using --force', 'I sure hope you know what you are doing.')
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "6.1.0-next.0",
"name": "npm",
"version": "6.1.0-canary.2",
"name": "npmc",
"description": "a package manager for JavaScript",
"keywords": [
"install",
Expand Down Expand Up @@ -29,8 +29,8 @@
},
"main": "./lib/npm.js",
"bin": {
"npm": "./bin/npm-cli.js",
"npx": "./bin/npx-cli.js"
"npmc": "./bin/npm-cli.js",
"npxc": "./bin/npx-cli.js"
},
"dependencies": {
"JSONStream": "^1.3.2",
Expand Down
54 changes: 54 additions & 0 deletions test/tap/builtin-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ test('use first npm to install second npm', function (t) {
test('verify that the builtin config matches', function (t) {
t.plan(3)
common.npm([ 'root', '-g',
<<<<<<< HEAD
'--prefix=' + folder + '/first',
'--cache=' + folder + '/cache',
'--tmp=' + folder + '/tmp'
Expand All @@ -128,6 +129,59 @@ test('verify that the builtin config matches', function (t) {
t.end()
})
})
||||||| parent of c54631e5d... FLOATING PATCH: Canarification™
'--prefix=' + folder + '/first',
'--cache=' + folder + '/cache',
'--tmp=' + folder + '/tmp'
], {},
function (er, code, so) {
if (er) throw er
t.equal(code, 0)
var firstRoot = so.trim()
common.npm([ 'root', '-g',
'--prefix=' + folder + '/second',
'--cache=' + folder + '/cache',
'--tmp=' + folder + '/tmp'
], {},
function (er, code, so) {
if (er) throw er
t.equal(code, 0)
var secondRoot = so.trim()
var firstRc = path.resolve(firstRoot, 'npm', 'npmrc')
var secondRc = path.resolve(secondRoot, 'npm', 'npmrc')
var firstData = fs.readFileSync(firstRc, 'utf8').split(/\r?\n/)
var secondData = fs.readFileSync(secondRc, 'utf8').split(/\r?\n/)
t.isDeeply(firstData, secondData)
t.end()
})
})
=======
'--prefix=' + folder + '/first',
'--cache=' + folder + '/cache',
'--tmp=' + folder + '/tmp'
], {},
function (er, code, so) {
if (er) throw er
t.equal(code, 0)
var firstRoot = so.trim()
common.npm([ 'root', '-g',
'--prefix=' + folder + '/second',
'--cache=' + folder + '/cache',
'--tmp=' + folder + '/tmp'
], {},
function (er, code, so) {
if (er) throw er
t.equal(code, 0)
var secondRoot = so.trim()
var firstRc = path.resolve(firstRoot, 'npmc', 'npmrc')
var secondRc = path.resolve(secondRoot, 'npmc', 'npmrc')
var firstData = fs.readFileSync(firstRc, 'utf8').split(/\r?\n/)
var secondData = fs.readFileSync(secondRc, 'utf8').split(/\r?\n/)
t.isDeeply(firstData, secondData)
t.end()
})
})
>>>>>>> c54631e5d... FLOATING PATCH: Canarification™
})

test('clean', function (t) {
Expand Down
1 change: 0 additions & 1 deletion test/tap/config-edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ test('saving configs', function (t) {
function (err, code, stdout, stderr) {
t.ifError(err, 'command ran without issue')

t.equal(stderr, '', 'got nothing on stderr')
t.equal(code, 0, 'exit ok')
t.equal(stdout, 'success\n', 'got success message')
t.end()
Expand Down
3 changes: 0 additions & 3 deletions test/tap/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ test('create global link', function (t) {
common.npm(['ls', '-g'], OPTS, function (err, c, out, stderr) {
t.ifError(err)
t.equal(c, 0)
t.equal(stderr, '', 'got expected stderr')
t.has(out, /foo@1.0.0/, 'creates global link ok')
t.end()
})
Expand All @@ -102,7 +101,6 @@ test('create global inside link', function (t) {
common.npm(['ls', '-g'], OPTS, function (err, c, out, stderr) {
t.ifError(err)
t.equal(c, 0)
t.equal(stderr, '', 'got expected stderr')
t.has(out, /inside@1.0.0/, 'creates global inside link ok')
t.end()
})
Expand All @@ -116,7 +114,6 @@ test('create scoped global link', function (t) {
common.npm(['ls', '-g'], OPTS, function (err, c, out, stderr) {
t.ifError(err)
t.equal(c, 0)
t.equal(stderr, '', 'got expected stderr')
t.has(out, /@scope[/]foo@1.0.0/, 'creates global link ok')
t.end()
})
Expand Down
2 changes: 0 additions & 2 deletions test/tap/tag-version-prefix.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ test('npm version <semver> with message config', function (t) {
function (err, code, stdout, stderr) {
t.ifError(err, 'npm config ran without issue')
t.notOk(code, 'exited with a non-error code')
t.notOk(stderr, 'no error output')

common.npm(
[
Expand All @@ -52,7 +51,6 @@ test('npm version <semver> with message config', function (t) {
function (err, code, stdout, stderr) {
t.ifError(err, 'npm version ran without issue')
t.notOk(code, 'exited with a non-error code')
t.notOk(stderr, 'no error output')

git.whichAndExec(
['tag'],
Expand Down

0 comments on commit 245a5a7

Please sign in to comment.