diff --git a/dictionary/bcrypt.js b/dictionary/bcrypt.js new file mode 100644 index 000000000..8eb077ad7 --- /dev/null +++ b/dictionary/bcrypt.js @@ -0,0 +1,4 @@ +'use strict'; + +module.exports = { +}; diff --git a/dictionary/newrelic.js b/dictionary/newrelic.js new file mode 100644 index 000000000..8eb077ad7 --- /dev/null +++ b/dictionary/newrelic.js @@ -0,0 +1,4 @@ +'use strict'; + +module.exports = { +}; diff --git a/dictionary/nib.js b/dictionary/nib.js new file mode 100644 index 000000000..8eb077ad7 --- /dev/null +++ b/dictionary/nib.js @@ -0,0 +1,4 @@ +'use strict'; + +module.exports = { +}; diff --git a/dictionary/raven.js b/dictionary/raven.js new file mode 100644 index 000000000..8eb077ad7 --- /dev/null +++ b/dictionary/raven.js @@ -0,0 +1,4 @@ +'use strict'; + +module.exports = { +}; diff --git a/dictionary/sharp.js b/dictionary/sharp.js new file mode 100644 index 000000000..0cd450d3d --- /dev/null +++ b/dictionary/sharp.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = { + pkg: { + scripts: [ + 'lib/*.js' + ] + } +}; diff --git a/dictionary/stylus.js b/dictionary/stylus.js new file mode 100644 index 000000000..e030d15dc --- /dev/null +++ b/dictionary/stylus.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = { + pkg: { + assets: [ + 'lib/**/*.styl' + ] + } +}; diff --git a/test/test-79-npm/bcrypt/bcrypt.js b/test/test-79-npm/bcrypt/bcrypt.js new file mode 100644 index 000000000..a8ae0ce95 --- /dev/null +++ b/test/test-79-npm/bcrypt/bcrypt.js @@ -0,0 +1,14 @@ +'use strict'; + +var bcrypt = require('bcrypt'); +const saltRounds = 10; +const myPlaintextPassword = 'P4$$w0rD'; +bcrypt.genSalt(saltRounds, function (error, salt) { + if (error) return; + bcrypt.hash(myPlaintextPassword, salt, function (error2, hash) { + if (error2) return; + if (typeof hash === 'string') { + console.log('ok'); + } + }); +}); diff --git a/test/test-79-npm/bcrypt/package.json b/test/test-79-npm/bcrypt/package.json new file mode 100644 index 000000000..101d327bd --- /dev/null +++ b/test/test-79-npm/bcrypt/package.json @@ -0,0 +1 @@ +{ "private": true } diff --git a/test/test-79-npm/newrelic/newrelic.js b/test/test-79-npm/newrelic/newrelic.js new file mode 100644 index 000000000..d57e9559d --- /dev/null +++ b/test/test-79-npm/newrelic/newrelic.js @@ -0,0 +1,13 @@ +'use strict'; + +var fs = require('fs'); +process.env.NEW_RELIC_APP_NAME = 'pkg-test'; +process.env.NEW_RELIC_NO_CONFIG_FILE = true; +var Agent = require('newrelic/lib/agent.js'); +Agent.prototype.start = function () { + console.log('ok'); + fs.unlinkSync('newrelic_agent.log'); + process.exit(); +}; + +require('newrelic'); diff --git a/test/test-79-npm/newrelic/package.json b/test/test-79-npm/newrelic/package.json new file mode 100644 index 000000000..101d327bd --- /dev/null +++ b/test/test-79-npm/newrelic/package.json @@ -0,0 +1 @@ +{ "private": true } diff --git a/test/test-79-npm/nib/nib.js b/test/test-79-npm/nib/nib.js new file mode 100644 index 000000000..ff3f16e4f --- /dev/null +++ b/test/test-79-npm/nib/nib.js @@ -0,0 +1,6 @@ +'use strict'; + +var nib = require('nib'); +if (typeof nib.version === 'string') { + console.log('ok'); +} diff --git a/test/test-79-npm/nib/package.json b/test/test-79-npm/nib/package.json new file mode 100644 index 000000000..101d327bd --- /dev/null +++ b/test/test-79-npm/nib/package.json @@ -0,0 +1 @@ +{ "private": true } diff --git a/test/test-79-npm/raven/package.json b/test/test-79-npm/raven/package.json new file mode 100644 index 000000000..101d327bd --- /dev/null +++ b/test/test-79-npm/raven/package.json @@ -0,0 +1 @@ +{ "private": true } diff --git a/test/test-79-npm/raven/raven.js b/test/test-79-npm/raven/raven.js new file mode 100644 index 000000000..3a21bcc0c --- /dev/null +++ b/test/test-79-npm/raven/raven.js @@ -0,0 +1,4 @@ +'use strict'; + +require('raven'); +console.log('ok'); diff --git a/test/test-79-npm/sharp/package.json b/test/test-79-npm/sharp/package.json new file mode 100644 index 000000000..101d327bd --- /dev/null +++ b/test/test-79-npm/sharp/package.json @@ -0,0 +1 @@ +{ "private": true } diff --git a/test/test-79-npm/sharp/sharp.js b/test/test-79-npm/sharp/sharp.js new file mode 100644 index 000000000..5bec5cde6 --- /dev/null +++ b/test/test-79-npm/sharp/sharp.js @@ -0,0 +1,13 @@ +'use strict'; + +var sharp = require('sharp'); + +var source = Buffer.from( + '' +); + +sharp(source).rotate().toBuffer().then(function (output) { + if (output.slice(1, 4).toString() === 'PNG') { + console.log('ok'); + } +}); diff --git a/test/test-79-npm/stylus/external.css b/test/test-79-npm/stylus/external.css new file mode 100644 index 000000000..e922ff4b7 --- /dev/null +++ b/test/test-79-npm/stylus/external.css @@ -0,0 +1,3 @@ +.foo .bar { + width: 10px; +} diff --git a/test/test-79-npm/stylus/package.json b/test/test-79-npm/stylus/package.json new file mode 100644 index 000000000..101d327bd --- /dev/null +++ b/test/test-79-npm/stylus/package.json @@ -0,0 +1 @@ +{ "private": true } diff --git a/test/test-79-npm/stylus/stylus.config.json b/test/test-79-npm/stylus/stylus.config.json new file mode 100644 index 000000000..233cdc9e0 --- /dev/null +++ b/test/test-79-npm/stylus/stylus.config.json @@ -0,0 +1,8 @@ +{ + "bin": "stylus.js", + "pkg": { + "assets": [ + "external.css" + ] + } +} diff --git a/test/test-79-npm/stylus/stylus.js b/test/test-79-npm/stylus/stylus.js new file mode 100644 index 000000000..3b7a157c3 --- /dev/null +++ b/test/test-79-npm/stylus/stylus.js @@ -0,0 +1,15 @@ +'use strict'; + +var path = require('path'); +var stylus = require('stylus'); +var s = '@require "external.css"'; +var opts = { filename: 'index.css', paths: [ __dirname ] }; +var dep = stylus(s, opts).deps()[0]; +if (path.basename(dep) === 'external.css') { + stylus.render(s, opts, function (error, css) { + if (error) return; + if (css === '@import "external.css";\n') { + console.log('ok'); + } + }); +}