You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add dryRun option to packDirectory. This makes it possible to run postscript after the archive has been written to cwd.
Fixes: https://npm.community/t/592
PR-URL: #47
Credit: @larsgw
Reviewed-By: @zkat
Copy file name to clipboardExpand all lines: test/tap/pack.js
+32
Original file line number
Diff line number
Diff line change
@@ -165,3 +165,35 @@ test('pack --json', (t) => {
165
165
})
166
166
.then(()=>rimraf(testDir))
167
167
})
168
+
169
+
test('postpack',(t)=>{
170
+
constfixture=newTacks(newDir({
171
+
'package.json': newFile({
172
+
name: 'generic-package',
173
+
version: '90000.100001.5',
174
+
scripts: {
175
+
postpack: 'node -e "var fs = require(\'fs\'); fs.openSync(\'postpack-step\', \'w+\'); if (!fs.existsSync(\'generic-package-90000.100001.5.tgz\')) { throw new Error(\'tar archive does not exist on postpack\') }"'
0 commit comments