[Pkg-javascript-commits] [Git][js-team/node-rimraf][upstream] New upstream version 2.6.3
Xavier Guimard
gitlab at salsa.debian.org
Mon Mar 9 13:39:31 GMT 2020
Xavier Guimard pushed to branch upstream at Debian JavaScript Maintainers / node-rimraf
Commits:
e983ac54 by Xavier Guimard at 2020-03-09T14:35:10+01:00
New upstream version 2.6.3
- - - - -
4 changed files:
- .travis.yml
- + package-lock.json
- package.json
- + test/bin.js
Changes:
=====================================
.travis.yml
=====================================
@@ -1,8 +1,6 @@
sudo: false
language: node_js
node_js:
- - '0.10'
- - '0.12'
- - '4'
- - '5'
- '6'
+ - '8'
+ - '10'
=====================================
package-lock.json
=====================================
The diff for this file was not included because it is too large.
=====================================
package.json
=====================================
@@ -1,17 +1,20 @@
{
"name": "rimraf",
- "version": "2.6.2",
+ "version": "2.6.3",
"main": "rimraf.js",
"description": "A deep deletion module for node (like `rm -rf`)",
"author": "Isaac Z. Schlueter <i at izs.me> (http://blog.izs.me/)",
"license": "ISC",
"repository": "git://github.com/isaacs/rimraf.git",
"scripts": {
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "postpublish": "git push origin --all; git push origin --tags",
"test": "tap test/*.js"
},
"bin": "./bin.js",
"dependencies": {
- "glob": "^7.0.5"
+ "glob": "^7.1.3"
},
"files": [
"LICENSE",
@@ -21,6 +24,6 @@
],
"devDependencies": {
"mkdirp": "^0.5.1",
- "tap": "^10.1.2"
+ "tap": "^12.1.1"
}
}
=====================================
test/bin.js
=====================================
@@ -0,0 +1,110 @@
+var bin = require.resolve('../bin.js')
+var t = require('tap')
+var mkdirp = require('mkdirp')
+var fs = require('fs')
+var spawn = require('child_process').spawn
+var node = process.execPath
+var rimraf = require('../')
+
+t.test('setup', function (t) {
+ rimraf.sync(__dirname + '/bintest')
+ mkdirp.sync(__dirname + '/bintest')
+ process.chdir(__dirname + '/bintest')
+ mkdirp.sync('a/b/c')
+ mkdirp.sync('x/y/z')
+ fs.writeFileSync('a/1.txt', '\n')
+ fs.writeFileSync('a/2.txt', '\n')
+ fs.writeFileSync('a/3.txt', '\n')
+ fs.writeFileSync('a/*.txt', '\n')
+ fs.writeFileSync('a/b/1.txt', '\n')
+ fs.writeFileSync('a/b/2.txt', '\n')
+ fs.writeFileSync('a/b/3.txt', '\n')
+ fs.writeFileSync('a/b/*.txt', '\n')
+ fs.writeFileSync('a/b/c/1.txt', '\n')
+ fs.writeFileSync('a/b/c/2.txt', '\n')
+ fs.writeFileSync('a/b/c/3.txt', '\n')
+ fs.writeFileSync('a/b/c/*.txt', '\n')
+ fs.writeFileSync('x/1.txt', '\n')
+ fs.writeFileSync('x/2.txt', '\n')
+ fs.writeFileSync('x/3.txt', '\n')
+ fs.writeFileSync('x/*.txt', '\n')
+ fs.writeFileSync('x/y/1.txt', '\n')
+ fs.writeFileSync('x/y/2.txt', '\n')
+ fs.writeFileSync('x/y/3.txt', '\n')
+ fs.writeFileSync('x/y/*.txt', '\n')
+ fs.writeFileSync('x/y/z/1.txt', '\n')
+ fs.writeFileSync('x/y/z/2.txt', '\n')
+ fs.writeFileSync('x/y/z/3.txt', '\n')
+ fs.writeFileSync('x/y/z/*.txt', '\n')
+ t.end()
+})
+
+t.test('help', function (t) {
+ var helps = ['-help', '-h', '--help', '--?']
+ t.plan(helps.length)
+ helps.forEach(function (h) {
+ t.test(h, test.bind(null, h))
+ })
+
+ function test (h, t) {
+ var child = spawn(node, [bin, h])
+ var out = ''
+ child.stdout.on('data', function (c) { out += c })
+ child.on('close', function (code, signal) {
+ t.equal(code, 0)
+ t.equal(signal, null)
+ t.match(out, /^Usage: rimraf <path> \[<path> \.\.\.\]/)
+ t.end()
+ })
+ }
+})
+
+t.test('glob, but matches', function (t) {
+ var child = spawn(node, [bin, 'x/y/*.txt'])
+ child.on('exit', function (code) {
+ t.equal(code, 0)
+ t.throws(fs.statSync.bind(fs, 'x/y/*.txt'))
+ t.doesNotThrow(fs.statSync.bind(fs, 'x/y/1.txt'))
+ t.end()
+ })
+})
+
+t.test('--no-glob', function (t) {
+ t.plan(2)
+ t.test('no glob with *.txt', function (t) {
+ var child = spawn(node, [bin, 'x/y/*.txt', '-G'])
+ child.on('exit', function (code) {
+ t.equal(code, 0)
+ t.throws(fs.statSync.bind(fs, 'x/y/*.txt'))
+ t.doesNotThrow(fs.statSync.bind(fs, 'x/y/1.txt'))
+ t.end()
+ })
+ })
+ t.test('no glob with dir star', function (t) {
+ var child = spawn(node, [bin, '**/*.txt', '-G'])
+ child.on('exit', function (code) {
+ t.equal(code, 0)
+ t.throws(fs.statSync.bind(fs, 'x/y/*.txt'))
+ t.doesNotThrow(fs.statSync.bind(fs, 'x/y/1.txt'))
+ t.end()
+ })
+ })
+})
+
+t.test('glob, but no exact match', function (t) {
+ var child = spawn(node, [bin, 'x/y/*.txt'])
+ child.on('exit', function (code) {
+ t.equal(code, 0)
+ t.throws(fs.statSync.bind(fs, 'x/y/1.txt'))
+ t.throws(fs.statSync.bind(fs, 'x/y/2.txt'))
+ t.throws(fs.statSync.bind(fs, 'x/y/3.txt'))
+ t.throws(fs.statSync.bind(fs, 'x/y/*.txt'))
+ t.end()
+ })
+})
+
+
+t.test('cleanup', function (t) {
+ rimraf.sync(__dirname + '/bintest')
+ t.end()
+})
View it on GitLab: https://salsa.debian.org/js-team/node-rimraf/-/commit/e983ac5431537264503368e089808f344c0e162d
--
View it on GitLab: https://salsa.debian.org/js-team/node-rimraf/-/commit/e983ac5431537264503368e089808f344c0e162d
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-commits/attachments/20200309/baee04a1/attachment-0001.html>
More information about the Pkg-javascript-commits
mailing list