From f8e02ed05e6ff894e315c9687aede1442880beb0 Mon Sep 17 00:00:00 2001 From: tmhglnd Date: Sun, 28 Nov 2021 14:57:15 +0100 Subject: [PATCH] removed unecessary package --- node_modules/path-parse/.travis.yml | 9 ---- node_modules/path-parse/index.js | 52 ++++++------------- node_modules/path-parse/package.json | 32 +++++++----- node_modules/path-parse/test.js | 77 ---------------------------- package-lock.json | 11 ++-- package.json | 3 +- 6 files changed, 42 insertions(+), 142 deletions(-) delete mode 100644 node_modules/path-parse/.travis.yml delete mode 100644 node_modules/path-parse/test.js diff --git a/node_modules/path-parse/.travis.yml b/node_modules/path-parse/.travis.yml deleted file mode 100644 index dae31da9..00000000 --- a/node_modules/path-parse/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: node_js -node_js: - - "0.12" - - "0.11" - - "0.10" - - "0.10.12" - - "0.8" - - "0.6" - - "iojs" diff --git a/node_modules/path-parse/index.js b/node_modules/path-parse/index.js index 3b7601fe..f062d0a2 100644 --- a/node_modules/path-parse/index.js +++ b/node_modules/path-parse/index.js @@ -2,29 +2,14 @@ var isWindows = process.platform === 'win32'; -// Regex to split a windows path into three parts: [*, device, slash, -// tail] windows-only -var splitDeviceRe = - /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - -// Regex to split the tail part of the above into [*, dir, basename, ext] -var splitTailRe = - /^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/; +// Regex to split a windows path into into [dir, root, basename, name, ext] +var splitWindowsRe = + /^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/; var win32 = {}; -// Function to split a filename into [root, dir, basename, ext] function win32SplitPath(filename) { - // Separate device+slash from tail - var result = splitDeviceRe.exec(filename), - device = (result[1] || '') + (result[2] || ''), - tail = result[3] || ''; - // Split the tail into dir, basename and extension - var result2 = splitTailRe.exec(tail), - dir = result2[1], - basename = result2[2], - ext = result2[3]; - return [device, dir, basename, ext]; + return splitWindowsRe.exec(filename).slice(1); } win32.parse = function(pathString) { @@ -34,24 +19,24 @@ win32.parse = function(pathString) { ); } var allParts = win32SplitPath(pathString); - if (!allParts || allParts.length !== 4) { + if (!allParts || allParts.length !== 5) { throw new TypeError("Invalid path '" + pathString + "'"); } return { - root: allParts[0], - dir: allParts[0] + allParts[1].slice(0, -1), + root: allParts[1], + dir: allParts[0] === allParts[1] ? allParts[0] : allParts[0].slice(0, -1), base: allParts[2], - ext: allParts[3], - name: allParts[2].slice(0, allParts[2].length - allParts[3].length) + ext: allParts[4], + name: allParts[3] }; }; -// Split a filename into [root, dir, basename, ext], unix version +// Split a filename into [dir, root, basename, name, ext], unix version // 'root' is just a slash, or nothing. var splitPathRe = - /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; + /^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/; var posix = {}; @@ -67,19 +52,16 @@ posix.parse = function(pathString) { ); } var allParts = posixSplitPath(pathString); - if (!allParts || allParts.length !== 4) { + if (!allParts || allParts.length !== 5) { throw new TypeError("Invalid path '" + pathString + "'"); } - allParts[1] = allParts[1] || ''; - allParts[2] = allParts[2] || ''; - allParts[3] = allParts[3] || ''; - + return { - root: allParts[0], - dir: allParts[0] + allParts[1].slice(0, -1), + root: allParts[1], + dir: allParts[0].slice(0, -1), base: allParts[2], - ext: allParts[3], - name: allParts[2].slice(0, allParts[2].length - allParts[3].length) + ext: allParts[4], + name: allParts[3], }; }; diff --git a/node_modules/path-parse/package.json b/node_modules/path-parse/package.json index d329367f..5dd39e5e 100644 --- a/node_modules/path-parse/package.json +++ b/node_modules/path-parse/package.json @@ -1,27 +1,33 @@ { - "_from": "path-parse@^1.0.6", - "_id": "path-parse@1.0.6", + "_args": [ + [ + "path-parse@1.0.7", + "/Users/timohoogland/Drive/work/code/js/total-serialism" + ] + ], + "_development": true, + "_from": "path-parse@1.0.7", + "_id": "path-parse@1.0.7", "_inBundle": false, - "_integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "_integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "_location": "/path-parse", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "path-parse@^1.0.6", + "raw": "path-parse@1.0.7", "name": "path-parse", "escapedName": "path-parse", - "rawSpec": "^1.0.6", + "rawSpec": "1.0.7", "saveSpec": null, - "fetchSpec": "^1.0.6" + "fetchSpec": "1.0.7" }, "_requiredBy": [ "/resolve" ], - "_resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "_shasum": "d62dbb5679405d72c4737ec58600e9ddcf06d24c", - "_spec": "path-parse@^1.0.6", - "_where": "/Users/timohoogland/Drive/work/code/js/total-serialism/node_modules/resolve", + "_resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "_spec": "1.0.7", + "_where": "/Users/timohoogland/Drive/work/code/js/total-serialism", "author": { "name": "Javier Blanco", "email": "http://jbgutierrez.info" @@ -29,8 +35,6 @@ "bugs": { "url": "https://github.com/jbgutierrez/path-parse/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "Node.js path.parse() ponyfill", "homepage": "https://github.com/jbgutierrez/path-parse#readme", "keywords": [ @@ -57,5 +61,5 @@ "scripts": { "test": "node test.js" }, - "version": "1.0.6" + "version": "1.0.7" } diff --git a/node_modules/path-parse/test.js b/node_modules/path-parse/test.js deleted file mode 100644 index 0b30c123..00000000 --- a/node_modules/path-parse/test.js +++ /dev/null @@ -1,77 +0,0 @@ -var assert = require('assert'); -var pathParse = require('./index'); - -var winParseTests = [ - [{ root: 'C:\\', dir: 'C:\\path\\dir', base: 'index.html', ext: '.html', name: 'index' }, 'C:\\path\\dir\\index.html'], - [{ root: 'C:\\', dir: 'C:\\another_path\\DIR\\1\\2\\33', base: 'index', ext: '', name: 'index' }, 'C:\\another_path\\DIR\\1\\2\\33\\index'], - [{ root: '', dir: 'another_path\\DIR with spaces\\1\\2\\33', base: 'index', ext: '', name: 'index' }, 'another_path\\DIR with spaces\\1\\2\\33\\index'], - [{ root: '\\', dir: '\\foo', base: 'C:', ext: '', name: 'C:' }, '\\foo\\C:'], - [{ root: '', dir: '', base: 'file', ext: '', name: 'file' }, 'file'], - [{ root: '', dir: '.', base: 'file', ext: '', name: 'file' }, '.\\file'], - - // unc - [{ root: '\\\\server\\share\\', dir: '\\\\server\\share\\', base: 'file_path', ext: '', name: 'file_path' }, '\\\\server\\share\\file_path'], - [{ root: '\\\\server two\\shared folder\\', dir: '\\\\server two\\shared folder\\', base: 'file path.zip', ext: '.zip', name: 'file path' }, '\\\\server two\\shared folder\\file path.zip'], - [{ root: '\\\\teela\\admin$\\', dir: '\\\\teela\\admin$\\', base: 'system32', ext: '', name: 'system32' }, '\\\\teela\\admin$\\system32'], - [{ root: '\\\\?\\UNC\\', dir: '\\\\?\\UNC\\server', base: 'share', ext: '', name: 'share' }, '\\\\?\\UNC\\server\\share'] -]; - -var winSpecialCaseFormatTests = [ - [{dir: 'some\\dir'}, 'some\\dir\\'], - [{base: 'index.html'}, 'index.html'], - [{}, ''] -]; - -var unixParseTests = [ - [{ root: '/', dir: '/home/user/dir', base: 'file.txt', ext: '.txt', name: 'file' }, '/home/user/dir/file.txt'], - [{ root: '/', dir: '/home/user/a dir', base: 'another File.zip', ext: '.zip', name: 'another File' }, '/home/user/a dir/another File.zip'], - [{ root: '/', dir: '/home/user/a dir/', base: 'another&File.', ext: '.', name: 'another&File' }, '/home/user/a dir//another&File.'], - [{ root: '/', dir: '/home/user/a$$$dir/', base: 'another File.zip', ext: '.zip', name: 'another File' }, '/home/user/a$$$dir//another File.zip'], - [{ root: '', dir: 'user/dir', base: 'another File.zip', ext: '.zip', name: 'another File' }, 'user/dir/another File.zip'], - [{ root: '', dir: '', base: 'file', ext: '', name: 'file' }, 'file'], - [{ root: '', dir: '', base: '.\\file', ext: '', name: '.\\file' }, '.\\file'], - [{ root: '', dir: '.', base: 'file', ext: '', name: 'file' }, './file'], - [{ root: '', dir: '', base: 'C:\\foo', ext: '', name: 'C:\\foo' }, 'C:\\foo'] -]; - -var unixSpecialCaseFormatTests = [ - [{dir: 'some/dir'}, 'some/dir/'], - [{base: 'index.html'}, 'index.html'], - [{}, ''] -]; - -var errors = [ - {input: null, message: /Parameter 'pathString' must be a string, not/}, - {input: {}, message: /Parameter 'pathString' must be a string, not object/}, - {input: true, message: /Parameter 'pathString' must be a string, not boolean/}, - {input: 1, message: /Parameter 'pathString' must be a string, not number/}, - {input: undefined, message: /Parameter 'pathString' must be a string, not undefined/}, -]; - -checkParseFormat(pathParse.win32, winParseTests); -checkParseFormat(pathParse.posix, unixParseTests); -checkErrors(pathParse.win32); -checkErrors(pathParse.posix); - -function checkErrors(parse) { - errors.forEach(function(errorCase) { - try { - parse(errorCase.input); - } catch(err) { - assert.ok(err instanceof TypeError); - assert.ok( - errorCase.message.test(err.message), - 'expected ' + errorCase.message + ' to match ' + err.message - ); - return; - } - - assert.fail('should have thrown'); - }); -} - -function checkParseFormat(parse, testCases) { - testCases.forEach(function(testCase) { - assert.deepEqual(parse(testCase[1]), testCase[0]); - }); -} diff --git a/package-lock.json b/package-lock.json index e6473be1..161d5161 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1946,6 +1946,12 @@ "integrity": "sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA==", "dev": true }, + "caniuse-lite": { + "version": "1.0.30001283", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001283.tgz", + "integrity": "sha512-9RoKo841j1GQFSJz/nCXOj0sD7tHBtlowjYlrqIUS812x9/emfBLBt6IyMz1zIaYc/eRL8Cs6HPUVi2Hzq4sIg==", + "dev": true + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -3608,11 +3614,6 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, - "save-dev": { - "version": "0.0.1-security", - "resolved": "https://registry.npmjs.org/save-dev/-/save-dev-0.0.1-security.tgz", - "integrity": "sha512-k6knZTDNK8PKKbIqnvxiOveJinuw2LcQjqDoaorZWP9M5AR2EPsnpDeSbeoZZ0pHr5ze1uoaKdK8NBGQrJ34Uw==" - }, "seedrandom": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz", diff --git a/package.json b/package.json index aaf80e0b..b10ddeb8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "total-serialism", - "version": "2.0.0", + "version": "2.0.1", "description": "A set of methods for the generation and transformation of number sequences useful in algorithmic composition", "main": "index.js", "scripts": { @@ -59,7 +59,6 @@ "@tonaljs/tonal": "^3.7.5", "asciichart": "^1.5.25", "bignumber.js": "^9.0.1", - "save-dev": "0.0.1-security", "seedrandom": "^3.0.5" }, "devDependencies": {