Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/install/action/prepare.js4
-rw-r--r--lib/pack.js4
-rw-r--r--test/tap/prepublish.js2
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/install/action/prepare.js b/lib/install/action/prepare.js
index 771a2a939..5e4333a5b 100644
--- a/lib/install/action/prepare.js
+++ b/lib/install/action/prepare.js
@@ -11,8 +11,8 @@ module.exports = function (staging, pkg, log, next) {
// see https://github.com/npm/npm/issues/10074 for details
if (pkg.package && pkg.package.scripts && pkg.package.scripts.prepublish) {
prepublishWarning([
- 'As of npm@5, `prepublish` scripts will run only for `npm publish`.',
- '(In npm@4 and previous versions, it also runs for `npm install`.)',
+ 'As of npm@5, `prepublish` scripts are deprecated.',
+ 'Use `prepare` for build steps and `prepublishOnly` for upload-only.',
'See the deprecation note in `npm help scripts` for more information.'
])
}
diff --git a/lib/pack.js b/lib/pack.js
index 075a672d6..4552bbc49 100644
--- a/lib/pack.js
+++ b/lib/pack.js
@@ -92,8 +92,8 @@ function prepareDirectory (dir) {
if (pkg.scripts && pkg.scripts.prepublish) {
prepublishWarning([
'As of npm@5, `prepublish` scripts are deprecated.',
- 'Use `prepare` for build steps and `prepublishOnly` for upload-only',
- 'See the deprecation note in `npm help scripts` for more information'
+ 'Use `prepare` for build steps and `prepublishOnly` for upload-only.',
+ 'See the deprecation note in `npm help scripts` for more information.'
])
}
if (npm.config.get('ignore-prepublish')) {
diff --git a/test/tap/prepublish.js b/test/tap/prepublish.js
index 18bfe5f22..c71455a24 100644
--- a/test/tap/prepublish.js
+++ b/test/tap/prepublish.js
@@ -94,7 +94,7 @@ test('prepublish deprecation warning on `npm install`', function (t) {
t.equal(code, 0, 'pack finished successfully')
t.ifErr(err, 'pack finished successfully')
- t.match(stderr, /`prepublish` scripts will run only for `npm publish`/)
+ t.match(stderr, /`prepublish` scripts are deprecated/)
var c = stdout.trim()
var regex = new RegExp('' +
'> npm-test-prepublish@1.2.5 prepublish [^\\r\\n]+\\r?\\n' +