From 30782e007630c428da211c2d558b7408e9ea7999 Mon Sep 17 00:00:00 2001 From: Andreas Hippler Date: Wed, 3 Aug 2022 19:57:47 +0200 Subject: [PATCH 01/31] fix: TypeError: Cannot convert to a BigInt --- lib/binding.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/binding.js b/lib/binding.js index 5fcde9a..6801f95 100644 --- a/lib/binding.js +++ b/lib/binding.js @@ -273,8 +273,8 @@ Binding.prototype.realpath = function (filepath, encoding, callback, ctx) { }); }; -function fillStats(stats) { - const target = stats instanceof Float64Array ? statValues : bigintStatValues; +function fillStats(stats, bigint) { + const target = bigint ? bigintStatValues : statValues; for (let i = 0; i < 36; i++) { target[i] = stats[i]; } @@ -303,7 +303,7 @@ Binding.prototype.stat = function (filepath, bigint, callback, ctx) { throw new FSError('ENOENT', filepath); } const stats = item.getStats(bigint); - fillStats(stats); + fillStats(stats, bigint); return stats; }); }; @@ -323,7 +323,7 @@ Binding.prototype.fstat = function (fd, bigint, callback, ctx) { const descriptor = this.getDescriptorById(fd); const item = descriptor.getItem(); const stats = item.getStats(bigint); - fillStats(stats); + fillStats(stats, bigint); return stats; }); }; @@ -1252,7 +1252,7 @@ Binding.prototype.lstat = function (filepath, bigint, callback, ctx) { throw new FSError('ENOENT', filepath); } const stats = item.getStats(bigint); - fillStats(stats); + fillStats(stats, bigint); return stats; }); }; From bed1499fbe06272ed20f6d2ad08cf68903655165 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Wed, 3 Aug 2022 21:13:25 -0600 Subject: [PATCH 02/31] Remove publish job --- .github/workflows/publish.yml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 29a7039..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Publish - -on: - push: - branches: - - main - -jobs: - publish-npm: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: '16' - registry-url: 'https://registry.npmjs.org' - - name: Install dependencies - run: npm ci - - name: Publish - run: | - VERSION=$(node tasks/next-dev-version.js) - npm --no-git-tag-version version ${VERSION} - npm publish --tag dev - env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} From 39bdc3f0a743c71cad8a9257f997f29767259385 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Wed, 3 Aug 2022 21:14:53 -0600 Subject: [PATCH 03/31] Changes for 5.1.4 --- changelog.md | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 0b4ec5f..de64b62 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ # Change Log +## 5.1.4 + + * Fix for BigInt stats in Node 16.7 (thanks @ahippler, see [#363][#363]) + ## 5.1.3 * Fix for BigInt stats in Node 18.7 (thanks @3cp, see [#361][#361]) @@ -339,3 +343,4 @@ Detailed changes: [#337]: https://github.com/tschaub/mock-fs/pull/337 [#342]: https://github.com/tschaub/mock-fs/pull/342 [#361]: https://github.com/tschaub/mock-fs/pull/361 +[#363]: https://github.com/tschaub/mock-fs/pull/363 diff --git a/package.json b/package.json index 29ae60e..0b1c43d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "mock-fs", "description": "A configurable mock file system. You know, for testing.", - "version": "5.1.3", + "version": "5.1.4", "main": "lib/index.js", "homepage": "https://github.com/tschaub/mock-fs", "author": { From d466ab69f8c66344d288f55a319dc9cecf6a7a0c Mon Sep 17 00:00:00 2001 From: Chunpeng Huo Date: Wed, 7 Sep 2022 20:02:18 +1000 Subject: [PATCH 04/31] fix: fix bug on utimes, futimes, add support of lutimes lutimes is available on Nodejs v14.5.0+ and v12.19.0, our CI matrix covers both versions. closes #365 --- lib/binding.js | 53 ++- lib/filesystem.js | 48 ++- lib/index.js | 4 +- test/lib/filesystem.spec.js | 11 +- test/lib/fs.utimes-futimes.spec.js | 196 ---------- test/lib/fs.utimes-lutimes-futimes.spec.js | 435 +++++++++++++++++++++ 6 files changed, 535 insertions(+), 212 deletions(-) delete mode 100644 test/lib/fs.utimes-futimes.spec.js create mode 100644 test/lib/fs.utimes-lutimes-futimes.spec.js diff --git a/lib/binding.js b/lib/binding.js index 6801f95..cea5405 100644 --- a/lib/binding.js +++ b/lib/binding.js @@ -7,7 +7,7 @@ const Directory = require('./directory.js'); const SymbolicLink = require('./symlink.js'); const {FSError} = require('./error.js'); const constants = require('constants'); -const getPathParts = require('./filesystem.js').getPathParts; +const {getPathParts, getRealPath} = require('./filesystem.js'); const MODE_TO_KTYPE = { [constants.S_IFREG]: constants.UV_DIRENT_FILE, @@ -260,10 +260,8 @@ Binding.prototype.realpath = function (filepath, encoding, callback, ctx) { throw new FSError('ENOENT', filepath); } - if (process.platform === 'win32' && realPath.startsWith('\\\\?\\')) { - // Remove win32 file namespace prefix \\?\ - realPath = realPath.slice(4); - } + // Remove win32 file namespace prefix \\?\ + realPath = getRealPath(realPath); if (encoding === 'buffer') { realPath = Buffer.from(realPath); @@ -1073,12 +1071,45 @@ Binding.prototype.unlink = function (pathname, callback, ctx) { Binding.prototype.utimes = function (pathname, atime, mtime, callback, ctx) { markSyscall(ctx, 'utimes'); + return maybeCallback(normalizeCallback(callback), ctx, this, function () { + let filepath = deBuffer(pathname); + let item = this._system.getItem(filepath); + let links = 0; + while (item instanceof SymbolicLink) { + if (links > MAX_LINKS) { + throw new FSError('ELOOP', filepath); + } + filepath = path.resolve(path.dirname(filepath), item.getPath()); + item = this._system.getItem(filepath); + ++links; + } + if (!item) { + throw new FSError('ENOENT', pathname); + } + item.setATime(new Date(atime * 1000)); + item.setMTime(new Date(mtime * 1000)); + }); +}; + +/** + * Update timestamps. + * @param {string} pathname Path to item. + * @param {number} atime Access time (in seconds). + * @param {number} mtime Modification time (in seconds). + * @param {function(Error)} callback Optional callback. + * @param {object} ctx Context object (optional), only for nodejs v10+. + * @return {*} The return if no callback is provided. + */ +Binding.prototype.lutimes = function (pathname, atime, mtime, callback, ctx) { + markSyscall(ctx, 'utimes'); + return maybeCallback(normalizeCallback(callback), ctx, this, function () { pathname = deBuffer(pathname); const item = this._system.getItem(pathname); if (!item) { throw new FSError('ENOENT', pathname); } + // lutimes doesn't follow symlink item.setATime(new Date(atime * 1000)); item.setMTime(new Date(mtime * 1000)); }); @@ -1098,7 +1129,17 @@ Binding.prototype.futimes = function (fd, atime, mtime, callback, ctx) { return maybeCallback(normalizeCallback(callback), ctx, this, function () { const descriptor = this.getDescriptorById(fd); - const item = descriptor.getItem(); + let item = descriptor.getItem(); + let filepath = this._system.getFilepath(item); + let links = 0; + while (item instanceof SymbolicLink) { + if (links > MAX_LINKS) { + throw new FSError('ELOOP', filepath); + } + filepath = path.resolve(path.dirname(filepath), item.getPath()); + item = this._system.getItem(filepath); + ++links; + } item.setATime(new Date(atime * 1000)); item.setMTime(new Date(mtime * 1000)); }); diff --git a/lib/filesystem.js b/lib/filesystem.js index 95d7c0e..dd0b431 100644 --- a/lib/filesystem.js +++ b/lib/filesystem.js @@ -9,19 +9,26 @@ const SymbolicLink = require('./symlink.js'); const isWindows = process.platform === 'win32'; -function toNamespacedPath(filePath) { - return path.toNamespacedPath - ? path.toNamespacedPath(filePath) - : path._makeLong(filePath); +// on Win32, change filepath from \\?\c:\a\b to C:\a\b +function getRealPath(filepath) { + if (isWindows && filepath.startsWith('\\\\?\\')) { + // Remove win32 file namespace prefix \\?\ + return filepath[4].toUpperCase() + filepath.slice(5); + } + return filepath; } function getPathParts(filepath) { - const parts = toNamespacedPath(path.resolve(filepath)).split(path.sep); + // path.toNamespacedPath is only for Win32 system. + // on other platform, it returns the path unmodified. + const parts = path.toNamespacedPath(path.resolve(filepath)).split(path.sep); parts.shift(); if (isWindows) { // parts currently looks like ['', '?', 'c:', ...] parts.shift(); const q = parts.shift(); // should be '?' + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file?redirectedfrom=MSDN#win32-file-namespaces + // Win32 File Namespaces prefix \\?\ const base = '\\\\' + q + '\\' + parts.shift().toLowerCase(); parts.unshift(base); } @@ -130,6 +137,35 @@ FileSystem.prototype.getItem = function (filepath) { return item; }; +function _getFilepath(item, itemPath, wanted) { + if (item === wanted) { + return itemPath; + } + if (item instanceof Directory) { + for (const name of item.list()) { + const got = _getFilepath( + item.getItem(name), + path.join(itemPath, name), + wanted + ); + if (got) { + return got; + } + } + } + return null; +} + +/** + * Get file path from a file system item. + * @param {Item} item a file system item. + * @return {string} file path for the item (or null if not found). + */ +FileSystem.prototype.getFilepath = function (item) { + const namespacedPath = _getFilepath(this._root, isWindows ? '' : '/', item); + return getRealPath(namespacedPath); +}; + /** * Populate a directory with an item. * @param {Directory} directory The directory to populate. @@ -329,4 +365,4 @@ FileSystem.directory = function (config) { module.exports = FileSystem; exports = module.exports; exports.getPathParts = getPathParts; -exports.toNamespacedPath = toNamespacedPath; +exports.getRealPath = getRealPath; diff --git a/lib/index.js b/lib/index.js index 68e92b3..fa3fca8 100644 --- a/lib/index.js +++ b/lib/index.js @@ -13,8 +13,6 @@ const { } = require('./readfilecontext.js'); const fs = require('fs'); -const toNamespacedPath = FileSystem.toNamespacedPath; - const realProcessProps = { cwd: process.cwd, chdir: process.chdir, @@ -153,7 +151,7 @@ module.exports = function mock(config, options = {}) { }, function chdir(directory) { if (realBinding._mockedBinding) { - if (!fs.statSync(toNamespacedPath(directory)).isDirectory()) { + if (!fs.statSync(path.toNamespacedPath(directory)).isDirectory()) { throw new FSError('ENOTDIR'); } currentPath = path.resolve(currentPath, directory); diff --git a/test/lib/filesystem.spec.js b/test/lib/filesystem.spec.js index 66cfa49..837057d 100644 --- a/test/lib/filesystem.spec.js +++ b/test/lib/filesystem.spec.js @@ -40,7 +40,7 @@ describe('FileSystem', function () { }); }); - describe('#getItem()', function () { + describe('#getItem() #getFilepath()', function () { it('gets an item', function () { const system = FileSystem.create({ 'one/two/three.js': 'contents', @@ -49,6 +49,7 @@ describe('FileSystem', function () { const filepath = path.join('one', 'two', 'three.js'); const item = system.getItem(filepath); assert.instanceOf(item, File); + assert.equal(system.getFilepath(item), path.resolve(filepath)); }); it('returns null if not found', function () { @@ -79,10 +80,18 @@ describe('FileSystem', function () { }); const file = system.getItem(path.join('dir-link', 'a')); assert.instanceOf(file, File); + assert.equal( + system.getFilepath(file), + path.resolve(path.join('b', 'c', 'dir', 'a')) + ); const dir = system.getItem(path.join('dir-link', 'b')); assert.instanceOf(dir, Directory); assert.deepEqual(dir.list().sort(), ['c', 'd']); + assert.equal( + system.getFilepath(dir), + path.resolve(path.join('b', 'c', 'dir', 'b')) + ); }); }); }); diff --git a/test/lib/fs.utimes-futimes.spec.js b/test/lib/fs.utimes-futimes.spec.js deleted file mode 100644 index 464fce6..0000000 --- a/test/lib/fs.utimes-futimes.spec.js +++ /dev/null @@ -1,196 +0,0 @@ -'use strict'; - -const helper = require('../helper.js'); -const fs = require('fs'); -const mock = require('../../lib/index.js'); - -const assert = helper.assert; - -describe('fs.utimes(path, atime, mtime, callback)', function () { - beforeEach(function () { - mock({ - dir: {}, - 'file.txt': 'content', - }); - }); - afterEach(mock.restore); - - it('updates timestamps for a file', function (done) { - fs.utimes('file.txt', new Date(100), new Date(200), function (err) { - if (err) { - return done(err); - } - const stats = fs.statSync('file.txt'); - assert.equal(stats.atime.getTime(), 100); - assert.equal(stats.mtime.getTime(), 200); - done(); - }); - }); - - it('supports Buffer input', function (done) { - fs.utimes( - Buffer.from('file.txt'), - new Date(100), - new Date(200), - function (err) { - if (err) { - return done(err); - } - const stats = fs.statSync('file.txt'); - assert.equal(stats.atime.getTime(), 100); - assert.equal(stats.mtime.getTime(), 200); - done(); - } - ); - }); - - it('promise updates timestamps for a file', function (done) { - fs.promises - .utimes('file.txt', new Date(100), new Date(200)) - .then(function () { - const stats = fs.statSync('file.txt'); - assert.equal(stats.atime.getTime(), 100); - assert.equal(stats.mtime.getTime(), 200); - done(); - }, done); - }); - - it('updates timestamps for a directory', function (done) { - fs.utimes('dir', new Date(300), new Date(400), function (err) { - if (err) { - return done(err); - } - const stats = fs.statSync('dir'); - assert.equal(stats.atime.getTime(), 300); - assert.equal(stats.mtime.getTime(), 400); - done(); - }); - }); - - it('promise updates timestamps for a directory', function (done) { - fs.promises.utimes('dir', new Date(300), new Date(400)).then(function () { - const stats = fs.statSync('dir'); - assert.equal(stats.atime.getTime(), 300); - assert.equal(stats.mtime.getTime(), 400); - done(); - }, done); - }); - - it('fails for a bogus path', function (done) { - fs.utimes('bogus.txt', new Date(100), new Date(200), function (err) { - assert.instanceOf(err, Error); - assert.equal(err.code, 'ENOENT'); - done(); - }); - }); - - it('promise fails for a bogus path', function (done) { - fs.promises.utimes('bogus.txt', new Date(100), new Date(200)).then( - function () { - done(new Error('should not succeed.')); - }, - function (err) { - assert.instanceOf(err, Error); - assert.equal(err.code, 'ENOENT'); - done(); - } - ); - }); -}); - -describe('fs.utimesSync(path, atime, mtime)', function () { - beforeEach(function () { - mock({ - 'file.txt': 'content', - }); - }); - afterEach(mock.restore); - - it('updates timestamps for a file', function () { - fs.utimesSync('file.txt', new Date(100), new Date(200)); - const stats = fs.statSync('file.txt'); - assert.equal(stats.atime.getTime(), 100); - assert.equal(stats.mtime.getTime(), 200); - }); -}); - -describe('fs.futimes(fd, atime, mtime, callback)', function () { - beforeEach(function () { - mock({ - dir: {}, - 'file.txt': 'content', - }); - }); - afterEach(mock.restore); - - it('updates timestamps for a file', function (done) { - const fd = fs.openSync('file.txt', 'r'); - fs.futimes(fd, new Date(100), new Date(200), function (err) { - if (err) { - return done(err); - } - const stats = fs.statSync('file.txt'); - assert.equal(stats.atime.getTime(), 100); - assert.equal(stats.mtime.getTime(), 200); - done(); - }); - }); - - it('promise updates timestamps for a file', function (done) { - fs.promises - .open('file.txt', 'r') - .then(function (fd) { - return fd.utimes(new Date(100), new Date(200)); - }) - .then(function () { - const stats = fs.statSync('file.txt'); - assert.equal(stats.atime.getTime(), 100); - assert.equal(stats.mtime.getTime(), 200); - done(); - }, done); - }); - - it('updates timestamps for a directory', function (done) { - const fd = fs.openSync('dir', 'r'); - fs.futimes(fd, new Date(300), new Date(400), function (err) { - if (err) { - return done(err); - } - const stats = fs.statSync('dir'); - assert.equal(stats.atime.getTime(), 300); - assert.equal(stats.mtime.getTime(), 400); - done(); - }); - }); - - it('promise updates timestamps for a directory', function (done) { - fs.promises - .open('dir', 'r') - .then(function (fd) { - return fd.utimes(new Date(300), new Date(400)); - }) - .then(function () { - const stats = fs.statSync('dir'); - assert.equal(stats.atime.getTime(), 300); - assert.equal(stats.mtime.getTime(), 400); - done(); - }, done); - }); -}); - -describe('fs.futimesSync(path, atime, mtime)', function () { - beforeEach(function () { - mock({ - 'file.txt': 'content', - }); - }); - afterEach(mock.restore); - - it('updates timestamps for a file', function () { - const fd = fs.openSync('file.txt', 'r'); - fs.futimesSync(fd, new Date(100), new Date(200)); - const stats = fs.statSync('file.txt'); - assert.equal(stats.atime.getTime(), 100); - assert.equal(stats.mtime.getTime(), 200); - }); -}); diff --git a/test/lib/fs.utimes-lutimes-futimes.spec.js b/test/lib/fs.utimes-lutimes-futimes.spec.js new file mode 100644 index 0000000..0168bc4 --- /dev/null +++ b/test/lib/fs.utimes-lutimes-futimes.spec.js @@ -0,0 +1,435 @@ +'use strict'; + +const helper = require('../helper.js'); +const fs = require('fs'); +const mock = require('../../lib/index.js'); + +const assert = helper.assert; + +describe('fs.utimes(path, atime, mtime, callback)', function () { + beforeEach(function () { + mock({ + dir: {}, + 'file.txt': mock.file({ + content: 'content', + atime: new Date(1), + mtime: new Date(1), + }), + link: mock.symlink({ + path: './file.txt', + atime: new Date(2), + mtime: new Date(2), + }), + }); + }); + afterEach(mock.restore); + + it('updates timestamps for a file', function (done) { + fs.utimes('file.txt', new Date(100), new Date(200), function (err) { + if (err) { + return done(err); + } + const stats = fs.statSync('file.txt'); + assert.equal(stats.atime.getTime(), 100); + assert.equal(stats.mtime.getTime(), 200); + done(); + }); + }); + + it('updates timestamps for a file following symlink', function (done) { + fs.utimes('link', new Date(100), new Date(200), function (err) { + if (err) { + return done(err); + } + const stats = fs.lstatSync('file.txt'); + assert.equal(stats.atime.getTime(), 100); + assert.equal(stats.mtime.getTime(), 200); + const stats2 = fs.lstatSync('link'); + assert.equal(stats2.atime.getTime(), 2); + assert.equal(stats2.mtime.getTime(), 2); + done(); + }); + }); + + it('supports Buffer input', function (done) { + fs.utimes( + Buffer.from('file.txt'), + new Date(100), + new Date(200), + function (err) { + if (err) { + return done(err); + } + const stats = fs.statSync('file.txt'); + assert.equal(stats.atime.getTime(), 100); + assert.equal(stats.mtime.getTime(), 200); + done(); + } + ); + }); + + it('promise updates timestamps for a file', function (done) { + fs.promises + .utimes('file.txt', new Date(100), new Date(200)) + .then(function () { + const stats = fs.statSync('file.txt'); + assert.equal(stats.atime.getTime(), 100); + assert.equal(stats.mtime.getTime(), 200); + done(); + }, done); + }); + + it('updates timestamps for a directory', function (done) { + fs.utimes('dir', new Date(300), new Date(400), function (err) { + if (err) { + return done(err); + } + const stats = fs.statSync('dir'); + assert.equal(stats.atime.getTime(), 300); + assert.equal(stats.mtime.getTime(), 400); + done(); + }); + }); + + it('promise updates timestamps for a directory', function (done) { + fs.promises.utimes('dir', new Date(300), new Date(400)).then(function () { + const stats = fs.statSync('dir'); + assert.equal(stats.atime.getTime(), 300); + assert.equal(stats.mtime.getTime(), 400); + done(); + }, done); + }); + + it('fails for a bogus path', function (done) { + fs.utimes('bogus.txt', new Date(100), new Date(200), function (err) { + assert.instanceOf(err, Error); + assert.equal(err.code, 'ENOENT'); + done(); + }); + }); + + it('promise fails for a bogus path', function (done) { + fs.promises.utimes('bogus.txt', new Date(100), new Date(200)).then( + function () { + done(new Error('should not succeed.')); + }, + function (err) { + assert.instanceOf(err, Error); + assert.equal(err.code, 'ENOENT'); + done(); + } + ); + }); +}); + +describe('fs.lutimes(path, atime, mtime, callback)', function () { + beforeEach(function () { + mock({ + dir: {}, + 'file.txt': mock.file({ + content: 'content', + atime: new Date(1), + mtime: new Date(1), + }), + link: mock.symlink({ + path: './file.txt', + atime: new Date(2), + mtime: new Date(2), + }), + }); + }); + afterEach(mock.restore); + + it('updates timestamps for a file', function (done) { + fs.lutimes('file.txt', new Date(100), new Date(200), function (err) { + if (err) { + return done(err); + } + const stats = fs.statSync('file.txt'); + assert.equal(stats.atime.getTime(), 100); + assert.equal(stats.mtime.getTime(), 200); + done(); + }); + }); + + it('updates timestamps for a file but not following symlink', function (done) { + fs.lutimes('link', new Date(100), new Date(200), function (err) { + if (err) { + return done(err); + } + const stats = fs.lstatSync('file.txt'); + assert.equal(stats.atime.getTime(), 1); + assert.equal(stats.mtime.getTime(), 1); + const stats2 = fs.lstatSync('link'); + assert.equal(stats2.atime.getTime(), 100); + assert.equal(stats2.mtime.getTime(), 200); + done(); + }); + }); + + it('supports Buffer input', function (done) { + fs.lutimes( + Buffer.from('file.txt'), + new Date(100), + new Date(200), + function (err) { + if (err) { + return done(err); + } + const stats = fs.statSync('file.txt'); + assert.equal(stats.atime.getTime(), 100); + assert.equal(stats.mtime.getTime(), 200); + done(); + } + ); + }); + + it('promise updates timestamps for a file', function (done) { + fs.promises + .lutimes('file.txt', new Date(100), new Date(200)) + .then(function () { + const stats = fs.statSync('file.txt'); + assert.equal(stats.atime.getTime(), 100); + assert.equal(stats.mtime.getTime(), 200); + done(); + }, done); + }); + + it('updates timestamps for a directory', function (done) { + fs.lutimes('dir', new Date(300), new Date(400), function (err) { + if (err) { + return done(err); + } + const stats = fs.statSync('dir'); + assert.equal(stats.atime.getTime(), 300); + assert.equal(stats.mtime.getTime(), 400); + done(); + }); + }); + + it('promise updates timestamps for a directory', function (done) { + fs.promises.lutimes('dir', new Date(300), new Date(400)).then(function () { + const stats = fs.statSync('dir'); + assert.equal(stats.atime.getTime(), 300); + assert.equal(stats.mtime.getTime(), 400); + done(); + }, done); + }); + + it('fails for a bogus path', function (done) { + fs.lutimes('bogus.txt', new Date(100), new Date(200), function (err) { + assert.instanceOf(err, Error); + assert.equal(err.code, 'ENOENT'); + done(); + }); + }); + + it('promise fails for a bogus path', function (done) { + fs.promises.lutimes('bogus.txt', new Date(100), new Date(200)).then( + function () { + done(new Error('should not succeed.')); + }, + function (err) { + assert.instanceOf(err, Error); + assert.equal(err.code, 'ENOENT'); + done(); + } + ); + }); +}); + +describe('fs.utimesSync(path, atime, mtime)', function () { + beforeEach(function () { + mock({ + 'file.txt': mock.file({ + content: 'content', + atime: new Date(1), + mtime: new Date(1), + }), + link: mock.symlink({ + path: './file.txt', + atime: new Date(2), + mtime: new Date(2), + }), + }); + }); + afterEach(mock.restore); + + it('updates timestamps for a file', function () { + fs.utimesSync('file.txt', new Date(100), new Date(200)); + const stats = fs.statSync('file.txt'); + assert.equal(stats.atime.getTime(), 100); + assert.equal(stats.mtime.getTime(), 200); + }); + + it('updates timestamps for a file following symlink', function () { + fs.utimesSync('link', new Date(100), new Date(200)); + const stats = fs.lstatSync('file.txt'); + assert.equal(stats.atime.getTime(), 100); + assert.equal(stats.mtime.getTime(), 200); + const stats2 = fs.lstatSync('link'); + assert.equal(stats2.atime.getTime(), 2); + assert.equal(stats2.mtime.getTime(), 2); + }); +}); + +describe('fs.lutimesSync(path, atime, mtime)', function () { + beforeEach(function () { + mock({ + 'file.txt': mock.file({ + content: 'content', + atime: new Date(1), + mtime: new Date(1), + }), + link: mock.symlink({ + path: './file.txt', + atime: new Date(2), + mtime: new Date(2), + }), + }); + }); + afterEach(mock.restore); + + it('updates timestamps for a file', function () { + fs.lutimesSync('file.txt', new Date(100), new Date(200)); + const stats = fs.statSync('file.txt'); + assert.equal(stats.atime.getTime(), 100); + assert.equal(stats.mtime.getTime(), 200); + }); + + it('updates timestamps for a file but not following symlink', function () { + fs.lutimesSync('link', new Date(100), new Date(200)); + const stats = fs.lstatSync('file.txt'); + assert.equal(stats.atime.getTime(), 1); + assert.equal(stats.mtime.getTime(), 1); + const stats2 = fs.lstatSync('link'); + assert.equal(stats2.atime.getTime(), 100); + assert.equal(stats2.mtime.getTime(), 200); + }); +}); + +describe('fs.futimes(fd, atime, mtime, callback)', function () { + beforeEach(function () { + mock({ + dir: {}, + 'file.txt': mock.file({ + content: 'content', + atime: new Date(1), + mtime: new Date(1), + }), + link: mock.symlink({ + path: './file.txt', + atime: new Date(2), + mtime: new Date(2), + }), + }); + }); + afterEach(mock.restore); + + it('updates timestamps for a file', function (done) { + const fd = fs.openSync('file.txt', 'r'); + fs.futimes(fd, new Date(100), new Date(200), function (err) { + if (err) { + return done(err); + } + const stats = fs.statSync('file.txt'); + assert.equal(stats.atime.getTime(), 100); + assert.equal(stats.mtime.getTime(), 200); + done(); + }); + }); + + it('updates timestamps for a file following symlink', function (done) { + const fd = fs.openSync('link', 'r'); + fs.futimes(fd, new Date(100), new Date(200), function (err) { + if (err) { + return done(err); + } + const stats = fs.lstatSync('file.txt'); + assert.equal(stats.atime.getTime(), 100); + assert.equal(stats.mtime.getTime(), 200); + const stats2 = fs.lstatSync('link'); + assert.equal(stats2.atime.getTime(), 2); + assert.equal(stats2.mtime.getTime(), 2); + done(); + }); + }); + + it('promise updates timestamps for a file', function (done) { + fs.promises + .open('file.txt', 'r') + .then(function (fd) { + return fd.utimes(new Date(100), new Date(200)); + }) + .then(function () { + const stats = fs.statSync('file.txt'); + assert.equal(stats.atime.getTime(), 100); + assert.equal(stats.mtime.getTime(), 200); + done(); + }, done); + }); + + it('updates timestamps for a directory', function (done) { + const fd = fs.openSync('dir', 'r'); + fs.futimes(fd, new Date(300), new Date(400), function (err) { + if (err) { + return done(err); + } + const stats = fs.statSync('dir'); + assert.equal(stats.atime.getTime(), 300); + assert.equal(stats.mtime.getTime(), 400); + done(); + }); + }); + + it('promise updates timestamps for a directory', function (done) { + fs.promises + .open('dir', 'r') + .then(function (fd) { + return fd.utimes(new Date(300), new Date(400)); + }) + .then(function () { + const stats = fs.statSync('dir'); + assert.equal(stats.atime.getTime(), 300); + assert.equal(stats.mtime.getTime(), 400); + done(); + }, done); + }); +}); + +describe('fs.futimesSync(path, atime, mtime)', function () { + beforeEach(function () { + mock({ + 'file.txt': mock.file({ + content: 'content', + atime: new Date(1), + mtime: new Date(1), + }), + link: mock.symlink({ + path: './file.txt', + atime: new Date(2), + mtime: new Date(2), + }), + }); + }); + afterEach(mock.restore); + + it('updates timestamps for a file', function () { + const fd = fs.openSync('file.txt', 'r'); + fs.futimesSync(fd, new Date(100), new Date(200)); + const stats = fs.statSync('file.txt'); + assert.equal(stats.atime.getTime(), 100); + assert.equal(stats.mtime.getTime(), 200); + }); + + it('updates timestamps for a file following symlink', function () { + const fd = fs.openSync('link', 'r'); + fs.futimesSync(fd, new Date(100), new Date(200)); + const stats = fs.lstatSync('file.txt'); + assert.equal(stats.atime.getTime(), 100); + assert.equal(stats.mtime.getTime(), 200); + const stats2 = fs.lstatSync('link'); + assert.equal(stats2.atime.getTime(), 2); + assert.equal(stats2.mtime.getTime(), 2); + }); +}); From c50954dc62c45e09b65a2ba99c6a2d3f107ed989 Mon Sep 17 00:00:00 2001 From: Daniel Katz Date: Thu, 27 Oct 2022 15:32:50 +0300 Subject: [PATCH 05/31] fix: fix EACCES error on access by root user --- lib/binding.js | 21 ++++++++------------- test/lib/binding.spec.js | 20 +++++++++++++++++++- test/lib/item.spec.js | 32 ++++++++++++++++++++++++++++++-- 3 files changed, 57 insertions(+), 16 deletions(-) diff --git a/lib/binding.js b/lib/binding.js index cea5405..a4a3e6c 100644 --- a/lib/binding.js +++ b/lib/binding.js @@ -1325,19 +1325,14 @@ Binding.prototype.access = function (filepath, mode, callback, ctx) { throw new FSError('ENOENT', filepath); } if (mode && process.getuid && process.getgid) { - const itemMode = item.getMode(); - if (item.getUid() === process.getuid()) { - if ((itemMode & (mode * 64)) !== mode * 64) { - throw new FSError('EACCES', filepath); - } - } else if (item.getGid() === process.getgid()) { - if ((itemMode & (mode * 8)) !== mode * 8) { - throw new FSError('EACCES', filepath); - } - } else { - if ((itemMode & mode) !== mode) { - throw new FSError('EACCES', filepath); - } + if (mode & constants.R_OK && !item.canRead()) { + throw new FSError('EACCES', filepath); + } + if (mode & constants.W_OK && !item.canWrite()) { + throw new FSError('EACCES', filepath); + } + if (mode & constants.X_OK && !item.canExecute()) { + throw new FSError('EACCES', filepath); } } }); diff --git a/test/lib/binding.spec.js b/test/lib/binding.spec.js index f2b55fa..d00b5f3 100644 --- a/test/lib/binding.spec.js +++ b/test/lib/binding.spec.js @@ -1625,6 +1625,14 @@ describe('Binding', function () { }); describe('#access()', function () { + const originalGetuid = process.getuid; + const originalGetgid = process.getgid; + + beforeEach(function () { + process.getuid = originalGetuid; + process.getgid = originalGetgid; + }); + it('works if file exists', function () { const binding = new Binding(system); const pathname = path.join('mock-dir', 'one-link.txt'); @@ -1639,7 +1647,7 @@ describe('Binding', function () { }, /ENOENT/); }); - if (process.getuid && process.getgid) { + if (originalGetuid && originalGetgid) { it('fails in case of insufficient user permissions', function () { const binding = new Binding(system); const item = system.getItem(path.join('mock-dir', 'one.txt')); @@ -1669,6 +1677,16 @@ describe('Binding', function () { binding.access(path.join('mock-dir', 'one.txt'), 5); }, /EACCES/); }); + + it('sould not throw if process runs as root', function () { + const binding = new Binding(system); + const item = system.getItem(path.join('mock-dir', 'one.txt')); + item.setUid(42); + item.setGid(42); + item.setMode(parseInt('0000', 8)); + process.getuid = () => 0; + binding.access(path.join('mock-dir', 'one.txt'), 5); + }); } it('fails for bogus paths', function () { diff --git a/test/lib/item.spec.js b/test/lib/item.spec.js index 80dd5a7..b1d4204 100644 --- a/test/lib/item.spec.js +++ b/test/lib/item.spec.js @@ -139,11 +139,15 @@ describe('Item', function () { }); if (process.getgid && process.getuid) { - const uid = process.getuid(); - const gid = process.getgid(); + const originalGetuid = process.getuid; + const originalGetgid = process.getgid; + const uid = originalGetuid(); + const gid = originalGetgid(); let item; beforeEach(function () { + process.getuid = originalGetuid; + process.getgid = originalGetgid; item = new Item(); }); @@ -220,6 +224,14 @@ describe('Item', function () { item.setMode(parseInt('0777', 8)); assert.isTrue(item.canRead()); }); + + it('always returns true if process runs as root', function () { + process.getuid = () => 0; + item.setUid(42); + item.setGid(42); + item.setMode(parseInt('0000', 8)); + assert.isTrue(item.canRead()); + }); }); describe('#canWrite()', function () { @@ -295,6 +307,14 @@ describe('Item', function () { item.setMode(parseInt('0777', 8)); assert.isTrue(item.canWrite()); }); + + it('always returns true if process runs as root', function () { + process.getuid = () => 0; + item.setUid(42); + item.setGid(42); + item.setMode(parseInt('0000', 8)); + assert.isTrue(item.canWrite()); + }); }); describe('#canExecute()', function () { @@ -370,6 +390,14 @@ describe('Item', function () { item.setMode(parseInt('0777', 8)); assert.isTrue(item.canExecute()); }); + + it('always returns true if process runs as root', function () { + process.getuid = () => 0; + item.setUid(42); + item.setGid(42); + item.setMode(parseInt('0000', 8)); + assert.isTrue(item.canExecute()); + }); }); } }); From 8de06d8c7875ceb4e81f2cbf86514f665cb0cc85 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Fri, 28 Oct 2022 12:03:19 -0600 Subject: [PATCH 06/31] Log changes --- changelog.md | 7 +++++++ package-lock.json | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index de64b62..88a90be 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,10 @@ # Change Log +## 5.2.0 + + * Fix EACCES error on access by root user (thanks @danielkatz, see [#369][#369]) + * Fix bug on utimes and futimes; add support of lutimes (thanks @3cp, see [#366][#366]) + ## 5.1.4 * Fix for BigInt stats in Node 16.7 (thanks @ahippler, see [#363][#363]) @@ -344,3 +349,5 @@ Detailed changes: [#342]: https://github.com/tschaub/mock-fs/pull/342 [#361]: https://github.com/tschaub/mock-fs/pull/361 [#363]: https://github.com/tschaub/mock-fs/pull/363 +[#366]: https://github.com/tschaub/mock-fs/pull/366 +[#369]: https://github.com/tschaub/mock-fs/pull/369 diff --git a/package-lock.json b/package-lock.json index 4ebd189..55e4a28 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mock-fs", - "version": "5.1.2", + "version": "5.1.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "mock-fs", - "version": "5.1.2", + "version": "5.1.4", "license": "MIT", "devDependencies": { "chai": "^4.3.4", From c53dbe7632548af5f154d5e8d1bcbf3dac9b5bba Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Fri, 28 Oct 2022 12:03:26 -0600 Subject: [PATCH 07/31] 5.2.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 55e4a28..50580bc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mock-fs", - "version": "5.1.4", + "version": "5.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "mock-fs", - "version": "5.1.4", + "version": "5.2.0", "license": "MIT", "devDependencies": { "chai": "^4.3.4", diff --git a/package.json b/package.json index 0b1c43d..5701573 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "mock-fs", "description": "A configurable mock file system. You know, for testing.", - "version": "5.1.4", + "version": "5.2.0", "main": "lib/index.js", "homepage": "https://github.com/tschaub/mock-fs", "author": { From 944cbd089243368813f8890ef7b7fd1d00517f69 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 8 Jan 2023 00:14:13 +0000 Subject: [PATCH 08/31] chore(deps): bump json5 from 1.0.1 to 1.0.2 Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2. - [Release notes](https://github.com/json5/json5/releases) - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md) - [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2) --- updated-dependencies: - dependency-name: json5 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 50580bc..05b543c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1813,9 +1813,9 @@ "dev": true }, "node_modules/json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "dependencies": { "minimist": "^1.2.0" @@ -4196,9 +4196,9 @@ "dev": true }, "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "requires": { "minimist": "^1.2.0" From fa4d78c5d8a97b0073396c7307e9ef25de0ec9a4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Jul 2023 02:27:17 +0000 Subject: [PATCH 09/31] chore(deps-dev): bump word-wrap from 1.2.3 to 1.2.4 Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4. - [Release notes](https://github.com/jonschlinkert/word-wrap/releases) - [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4) --- updated-dependencies: - dependency-name: word-wrap dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 05b543c..0deb2a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2769,9 +2769,9 @@ } }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", + "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", "dev": true, "engines": { "node": ">=0.10.0" @@ -4860,9 +4860,9 @@ } }, "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", + "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", "dev": true }, "workerpool": { From ef8daa4ed3e93741401cd907f63c036f199ab772 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Sat, 14 Oct 2023 00:47:14 +0800 Subject: [PATCH 10/31] Mock sync methods to support v20.8 --- lib/binding.js | 141 ++++++++++++++++++++++++++++++++++++++++ test/lib/bypass.spec.js | 2 +- 2 files changed, 142 insertions(+), 1 deletion(-) diff --git a/lib/binding.js b/lib/binding.js index a4a3e6c..e9db26b 100644 --- a/lib/binding.js +++ b/lib/binding.js @@ -306,6 +306,17 @@ Binding.prototype.stat = function (filepath, bigint, callback, ctx) { }); }; +/** + * Stat an item. + * @param {string} filepath Path. + * @param {boolean} bigint Use BigInt. + * @param {object} ctx Context object (optional), only for nodejs v10+. + * @return {Float64Array|BigUint64Array|undefined} Stats or undefined if sync. + */ +Binding.prototype.statSync = function (filepath, bigint, ctx) { + return this.stat(filepath, bigint, undefined, ctx); +}; + /** * Stat an item. * @param {number} fd File descriptor. @@ -341,6 +352,16 @@ Binding.prototype.close = function (fd, callback, ctx) { }); }; +/** + * Close a file descriptor. + * @param {number} fd File descriptor. + * @param {object} ctx Context object (optional), only for nodejs v10+. + * @return {*} The return. + */ +Binding.prototype.closeSync = function (fd, ctx) { + return this.close(fd, undefined, ctx); +}; + /** * Open and possibly create a file. * @param {string} pathname File path. @@ -410,6 +431,18 @@ Binding.prototype.open = function (pathname, flags, mode, callback, ctx) { }); }; +/** + * Open and possibly create a file. + * @param {string} pathname File path. + * @param {number} flags Flags. + * @param {number} mode Mode. + * @param {object} ctx Context object (optional), only for nodejs v10+. + * @return {string} File descriptor. + */ +Binding.prototype.openSync = function (pathname, flags, mode, ctx) { + return this.open(pathname, flags, mode, undefined, ctx); +}; + /** * Open a file handler. A new api in nodejs v10+ for fs.promises * @param {string} pathname File path. @@ -531,6 +564,18 @@ Binding.prototype.copyFile = function (src, dest, flags, callback, ctx) { }); }; +/** + * Write to a file descriptor given a buffer. + * @param {string} src Source file. + * @param {string} dest Destination file. + * @param {number} flags Modifiers for copy operation. + * @param {object} ctx Context object (optional), only for nodejs v10+. + * @return {*} The return if no callback is provided. + */ +Binding.prototype.copyFileSync = function (src, dest, flags, ctx) { + return this.copyFile(src, dest, flags, undefined, ctx); +}; + /** * Write to a file descriptor given a buffer. * @param {string} fd File descriptor. @@ -722,6 +767,17 @@ Binding.prototype.rename = function (oldPath, newPath, callback, ctx) { }); }; +/** + * Rename a file. + * @param {string} oldPath Old pathname. + * @param {string} newPath New pathname. + * @param {object} ctx Context object (optional), only for nodejs v10+. + * @return {undefined} + */ +Binding.prototype.renameSync = function (oldPath, newPath, ctx) { + return this.rename(oldPath, newPath, undefined, ctx); +}; + /** * Read a directory. * @param {string} dirpath Path to directory. @@ -779,6 +835,24 @@ Binding.prototype.readdir = function ( }); }; +Binding.prototype.readFile = function (filepath, options, callback, ctx) { + markSyscall(ctx, 'readFile'); + + return maybeCallback(normalizeCallback(callback), ctx, this, function () { + filepath = deBuffer(filepath); + const item = this._system.getItem(filepath); + + return item.getContent(); + }); +}; + +Binding.prototype.readFileSync = function (filepath, options, ctx) { + return this.readFile(filepath, options, undefined, ctx); +}; +Binding.prototype.readFileUtf8 = function (filepath, options, ctx) { + return this.readFile(filepath, options, undefined, ctx).toString('utf-8'); +}; + /** * Create a directory. * @param {string} pathname Path to new directory. @@ -1059,6 +1133,16 @@ Binding.prototype.unlink = function (pathname, callback, ctx) { }); }; +/** + * Delete a named item. + * @param {string} pathname Path to item. + * @param {object} ctx Context object (optional), only for nodejs v10+. + * @return {*} The return if no callback is provided. + */ +Binding.prototype.unlinkSync = function (pathname, ctx) { + return this.unlink(pathname, undefined, ctx); +}; + /** * Update timestamps. * @param {string} pathname Path to item. @@ -1241,6 +1325,18 @@ Binding.prototype.symlink = function (srcPath, destPath, type, callback, ctx) { }); }; +/** + * Create a symbolic link. + * @param {string} srcPath Path from link to the source file. + * @param {string} destPath Path for the generated link. + * @param {string} type Ignored (used for Windows only). + * @param {object} ctx Context object (optional), only for nodejs v10+. + * @return {*} The return if no callback is provided. + */ +Binding.prototype.symlinkSync = function (srcPath, destPath, type, ctx) { + return this.symlink(srcPath, destPath, type, undefined, ctx); +}; + /** * Read the contents of a symbolic link. * @param {string} pathname Path to symbolic link. @@ -1338,6 +1434,51 @@ Binding.prototype.access = function (filepath, mode, callback, ctx) { }); }; +/** + * Tests user permissions. + * @param {string} filepath Path. + * @param {number} mode Mode. + * @param {object} ctx Context object (optional), only for nodejs v10+. + * @return {*} The return if no callback is provided. + */ +Binding.prototype.accessSync = function (filepath, mode, ctx) { + return this.access(filepath, mode, undefined, ctx); +}; + +/** + * Tests whether or not the given path exists. + * @param {string} filepath Path. + * @param {function(Error)} callback Callback (optional). + * @param {object} ctx Context object (optional), only for nodejs v10+. + * @return {*} The return if no callback is provided. + */ +Binding.prototype.exists = function (filepath, callback, ctx) { + markSyscall(ctx, 'exists'); + + return maybeCallback(normalizeCallback(callback), ctx, this, function () { + filepath = deBuffer(filepath); + const item = this._system.getItem(filepath); + + if (item) { + if (item instanceof SymbolicLink) { + return this.exists(item.getPath(), callback, ctx); + } + return true; + } + return false; + }); +}; + +/** + * Tests whether or not the given path exists. + * @param {string} filepath Path. + * @param {object} ctx Context object (optional), only for nodejs v10+. + * @return {*} The return if no callback is provided. + */ +Binding.prototype.existsSync = function (filepath, ctx) { + return this.exists(filepath, undefined, ctx); +}; + /** * Not yet implemented. * @type {function()} diff --git a/test/lib/bypass.spec.js b/test/lib/bypass.spec.js index 23bbc49..078cf81 100644 --- a/test/lib/bypass.spec.js +++ b/test/lib/bypass.spec.js @@ -13,7 +13,7 @@ describe('mock.bypass()', () => { it('runs a synchronous function using the real filesystem', () => { mock({'/path/to/file': 'content'}); - assert.equal(fs.readFileSync('/path/to/file', 'utf8'), 'content'); + assert.equal(fs.readFileSync('/path/to/file', 'utf-8'), 'content'); assert.isNotOk(fs.existsSync(__filename)); assert.isOk(mock.bypass(() => fs.existsSync(__filename))); From ce4aea62c648f7f922cb122f3d0411472518048b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caleb=20=E3=83=84=20Everett?= Date: Wed, 25 Sep 2024 13:22:36 -0700 Subject: [PATCH 11/31] fix FileHandle write on node 20 Both `fs.promises.open().then(fh => fh.write()` and `fs.openSync().write()` call write without a callback, but fs.promises must return a Promise, while openSync must not. I added _isPromise to the descriptor so we can return the right type for the handle open was called with. This doesn't feel right, but I couldn't figure out a different way to call it. --- lib/binding.js | 19 ++++++++++++++++--- lib/descriptor.js | 13 ++++++++++++- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/lib/binding.js b/lib/binding.js index e9db26b..d259599 100644 --- a/lib/binding.js +++ b/lib/binding.js @@ -44,7 +44,7 @@ function maybeCallback(callback, ctx, thisArg, func) { let err = null; let val; - if (kUsePromises && callback === kUsePromises) { + if (usePromises(callback)) { // support nodejs v10+ fs.promises try { val = func.call(thisArg); @@ -86,6 +86,10 @@ function maybeCallback(callback, ctx, thisArg, func) { } } +function usePromises(callback) { + return kUsePromises && callback === kUsePromises; +} + /** * set syscall property on context object, only for nodejs v10+. * @param {object} ctx Context object (optional), only for nodejs v10+. @@ -376,7 +380,7 @@ Binding.prototype.open = function (pathname, flags, mode, callback, ctx) { return maybeCallback(normalizeCallback(callback), ctx, this, function () { pathname = deBuffer(pathname); - const descriptor = new FileDescriptor(flags); + const descriptor = new FileDescriptor(flags, usePromises(callback)); let item = this._system.getItem(pathname); while (item instanceof SymbolicLink) { item = this._system.getItem( @@ -677,7 +681,12 @@ Binding.prototype.writeBuffer = function ( ); file.setContent(content); descriptor.setPosition(newLength); - return written; + // If we're in fs.promises / FileHandle we need to return a promise + // Both fs.promises.open().then(fd => fs.write()) + // and fs.openSync().writeSync() use this function + // without a callback, so we have to check if the descriptor was opened + // with kUsePromises + return descriptor.isPromise() ? Promise.resolve(written) : written; }); }; @@ -853,6 +862,10 @@ Binding.prototype.readFileUtf8 = function (filepath, options, ctx) { return this.readFile(filepath, options, undefined, ctx).toString('utf-8'); }; +Binding.prototype.writeFileUtf8 = function (filepath, data, flags, mode) { + const destFd = this.open(filepath, flags, mode); + this.writeBuffer(destFd, data, 0, data.length); +}; /** * Create a directory. * @param {string} pathname Path to new directory. diff --git a/lib/descriptor.js b/lib/descriptor.js index 107e25c..1ad2095 100644 --- a/lib/descriptor.js +++ b/lib/descriptor.js @@ -5,9 +5,10 @@ const constants = require('constants'); /** * Create a new file descriptor. * @param {number} flags Flags. + * @param {boolean} isPromise descriptor was opened via fs.promises * @class */ -function FileDescriptor(flags) { +function FileDescriptor(flags, isPromise = false) { /** * Flags. * @type {number} @@ -25,6 +26,8 @@ function FileDescriptor(flags) { * @type {number} */ this._position = 0; + + this._isPromise = isPromise; } /** @@ -110,6 +113,14 @@ FileDescriptor.prototype.isExclusive = function () { return (this._flags & constants.O_EXCL) === constants.O_EXCL; }; +/** + * Check if the file descriptor was opened as a promise + * @return {boolean} Opened from fs.promise + */ +FileDescriptor.prototype.isPromise = function () { + return this._isPromise; +}; + /** * Export the constructor. * @type {function()} From a6fbf848d9f68a44b56007b62edb1b11f63162b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caleb=20=E3=83=84=20Everett?= Date: Wed, 25 Sep 2024 13:26:02 -0700 Subject: [PATCH 12/31] fix stats on node 20 Node 20 seems to change changed `atime` ect to be a non enumerable property, so `stats.hasOwnProperty('atime')` is false, and `Object.assign({}, stats)` doesn't copy atime. I updated the file and directory creation to handle either atime, or atimeMs fields, and updated a test to compare either. --- lib/filesystem.js | 24 ++++++++++++++++++++++++ test/lib/index.spec.js | 6 ++++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/lib/filesystem.js b/lib/filesystem.js index dd0b431..aebba26 100644 --- a/lib/filesystem.js +++ b/lib/filesystem.js @@ -264,15 +264,23 @@ FileSystem.file = function (config) { } if (config.hasOwnProperty('atime')) { file.setATime(config.atime); + } else if (config.hasOwnProperty('atimeMs')) { + file.setATime(new Date(config.atimeMs)); } if (config.hasOwnProperty('ctime')) { file.setCTime(config.ctime); + } else if (config.hasOwnProperty('ctimeMs')) { + file.setCTime(new Date(config.ctimeMs)); } if (config.hasOwnProperty('mtime')) { file.setMTime(config.mtime); + } else if (config.hasOwnProperty('mtimeMs')) { + file.setMTime(new Date(config.mtimeMs)); } if (config.hasOwnProperty('birthtime')) { file.setBirthtime(config.birthtime); + } else if (config.hasOwnProperty('birthtimeMs')) { + file.setBirthtime(new Date(config.birthtimeMs)); } return file; }; @@ -305,15 +313,23 @@ FileSystem.symlink = function (config) { } if (config.hasOwnProperty('atime')) { link.setATime(config.atime); + } else if (config.hasOwnProperty('atimeMs')) { + link.setATime(new Date(config.atimeMs)); } if (config.hasOwnProperty('ctime')) { link.setCTime(config.ctime); + } else if (config.hasOwnProperty('ctimeMs')) { + link.setCTime(new Date(config.ctimeMs)); } if (config.hasOwnProperty('mtime')) { link.setMTime(config.mtime); + } else if (config.hasOwnProperty('mtimeMs')) { + link.setMTime(new Date(config.mtimeMs)); } if (config.hasOwnProperty('birthtime')) { link.setBirthtime(config.birthtime); + } else if (config.hasOwnProperty('birthtimeMs')) { + link.setBirthtime(new Date(config.birthtimeMs)); } return link; }; @@ -344,15 +360,23 @@ FileSystem.directory = function (config) { } if (config.hasOwnProperty('atime')) { dir.setATime(config.atime); + } else if (config.hasOwnProperty('atimeMs')) { + dir.setATime(new Date(config.atimeMs)); } if (config.hasOwnProperty('ctime')) { dir.setCTime(config.ctime); + } else if (config.hasOwnProperty('ctimeMs')) { + dir.setCTime(new Date(config.ctimeMs)); } if (config.hasOwnProperty('mtime')) { dir.setMTime(config.mtime); + } else if (config.hasOwnProperty('mtimeMs')) { + dir.setMTime(new Date(config.mtimeMs)); } if (config.hasOwnProperty('birthtime')) { dir.setBirthtime(config.birthtime); + } else if (config.hasOwnProperty('birthtimeMs')) { + dir.setBirthtime(new Date(config.birthtimeMs)); } return dir; }; diff --git a/test/lib/index.spec.js b/test/lib/index.spec.js index 65d2314..c8639ab 100644 --- a/test/lib/index.spec.js +++ b/test/lib/index.spec.js @@ -191,7 +191,6 @@ describe('The API', function () { 'mtime', 'gid', 'uid', - 'mtime', 'mode', ]; const filterStats = (stats) => { @@ -199,12 +198,15 @@ describe('The API', function () { for (const key of statsCompareKeys) { const k = (stats.hasOwnProperty(key) && key) || - (stats.hasOwnProperty(`_${key}`) && `_${key}`); + (stats.hasOwnProperty(`_${key}`) && `_${key}`) || + (stats.hasOwnProperty(`${key}Ms`) && `${key}Ms`); if (k) { res[key] = k === 'mode' && stats.isDirectory() ? fixWin32Permissions(stats[k]) + : k.endsWith('Ms') + ? new Date(stats[k]) : stats[k]; } } From a5eb15b4f3fadad76f7354405349391e102634ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caleb=20=E3=83=84=20Everett?= Date: Wed, 25 Sep 2024 14:01:49 -0700 Subject: [PATCH 13/31] improve readFileUtf8 binding --- lib/binding.js | 45 ++++++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/lib/binding.js b/lib/binding.js index d259599..3870308 100644 --- a/lib/binding.js +++ b/lib/binding.js @@ -844,28 +844,43 @@ Binding.prototype.readdir = function ( }); }; -Binding.prototype.readFile = function (filepath, options, callback, ctx) { - markSyscall(ctx, 'readFile'); - - return maybeCallback(normalizeCallback(callback), ctx, this, function () { - filepath = deBuffer(filepath); - const item = this._system.getItem(filepath); - - return item.getContent(); - }); -}; +/** + * Read file as utf8 string. + * @param {string} name file to write. + * @param {number} flags Flags. + * @return {string} the file content. + */ +Binding.prototype.readFileUtf8 = function (name, flags) { + const fd = this.open(name, flags); + const descriptor = this.getDescriptorById(fd); -Binding.prototype.readFileSync = function (filepath, options, ctx) { - return this.readFile(filepath, options, undefined, ctx); -}; -Binding.prototype.readFileUtf8 = function (filepath, options, ctx) { - return this.readFile(filepath, options, undefined, ctx).toString('utf-8'); + if (!descriptor.isRead()) { + throw new FSError('EBADF'); + } + const file = descriptor.getItem(); + if (file instanceof Directory) { + throw new FSError('EISDIR'); + } + if (!(file instanceof File)) { + // deleted or not a regular file + throw new FSError('EBADF'); + } + const content = file.getContent(); + return content.toString('utf8'); }; +/** + * Write a utf8 string. + * @param {string} filepath file to write. + * @param {string} data data to write to filepath. + * @param {number} flags Flags. + * @param {number} mode Mode. + */ Binding.prototype.writeFileUtf8 = function (filepath, data, flags, mode) { const destFd = this.open(filepath, flags, mode); this.writeBuffer(destFd, data, 0, data.length); }; + /** * Create a directory. * @param {string} pathname Path to new directory. From ea6e334a9b6a2423a5c620989b9778d33a37a1c5 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Wed, 25 Sep 2024 15:56:31 -0600 Subject: [PATCH 14/31] Stop testing on Node 12 and 14 --- .github/workflows/test.yml | 2 -- readme.md | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 850ff72..005acbc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,8 +24,6 @@ jobs: - macos-latest - windows-latest node: - - 12 - - 14 - 16 - 18 diff --git a/readme.md b/readme.md index 66f2cae..5e44c38 100644 --- a/readme.md +++ b/readme.md @@ -270,7 +270,7 @@ When you require `mock-fs`, Node's own `fs` module is patched to allow the bindi Mock file access is controlled based on file mode where `process.getuid()` and `process.getgid()` are available (POSIX systems). On other systems (e.g. Windows) the file mode has no effect. -Tested on Linux, OSX, and Windows using Node 12 through 16. Check the tickets for a list of [known issues](https://github.com/tschaub/mock-fs/issues). +Tested on Linux, OSX, and Windows using Node 16 through 18. Check the tickets for a list of [known issues](https://github.com/tschaub/mock-fs/issues). ### Using with Jest Snapshot Testing From 655b908ab16e8830d0e54090257b52c6b172ac53 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 21:59:52 +0000 Subject: [PATCH 15/31] chore(deps-dev): bump braces from 3.0.2 to 3.0.3 Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3. - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3) --- updated-dependencies: - dependency-name: braces dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0deb2a3..95a4133 100644 --- a/package-lock.json +++ b/package-lock.json @@ -301,12 +301,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -1151,9 +1151,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -3088,12 +3088,12 @@ } }, "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "requires": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" } }, "browser-stdout": { @@ -3736,9 +3736,9 @@ } }, "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "requires": { "to-regex-range": "^5.0.1" From 078360ceb32a75d949c8065926e2430ae1ceb5a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caleb=20=E3=83=84=20Everett?= Date: Wed, 25 Sep 2024 16:21:14 -0700 Subject: [PATCH 16/31] add node 20 and 22 to test workflow --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 850ff72..5a17504 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,6 +28,8 @@ jobs: - 14 - 16 - 18 + - 20 + - 22 steps: - name: Clone repository From c5f5d5fc0923982276c28589d57ce50591e49d76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caleb=20=E3=83=84=20Everett?= Date: Wed, 25 Sep 2024 16:33:44 -0700 Subject: [PATCH 17/31] fix timeout in failing test While working on https://github.com/tschaub/mock-fs/blob/main/changelog.md#400 I noticed that tests would timeout when some assertions failed because done was never called. ``` promise.then(() => { assert(false) done() }, done) ``` The issue is that `then` will only call one of it's two callbacks. The onRejected function is not called when onFulfilled throws an error. Switching to `.catch(done)` guarnatees the a rejected promise chain marks the test as completed. --- test/lib/fs.appendFile.spec.js | 42 +++-- test/lib/fs.chmod-fchmod.spec.js | 16 +- test/lib/fs.copyFile.spec.js | 6 +- test/lib/fs.link-symlink.spec.js | 92 ++++++---- test/lib/fs.lstat.spec.js | 60 +++--- test/lib/fs.mkdir.spec.js | 34 ++-- test/lib/fs.mkdtemp.spec.js | 63 ++++--- test/lib/fs.open-close.spec.js | 17 +- test/lib/fs.read.spec.js | 18 +- test/lib/fs.readFile.spec.js | 13 +- test/lib/fs.readdir.spec.js | 19 +- test/lib/fs.readlink.spec.js | 11 +- test/lib/fs.realpath.spec.js | 22 ++- test/lib/fs.rename.spec.js | 34 ++-- test/lib/fs.rmdir.spec.js | 29 +-- test/lib/fs.stat-fstat.spec.js | 201 ++++++++++++--------- test/lib/fs.unlink.spec.js | 47 +++-- test/lib/fs.utimes-lutimes-futimes.spec.js | 42 +++-- test/lib/fs.write.spec.js | 33 ++-- test/lib/fs.writeFile.spec.js | 35 ++-- 20 files changed, 510 insertions(+), 324 deletions(-) diff --git a/test/lib/fs.appendFile.spec.js b/test/lib/fs.appendFile.spec.js index 72751c4..b4eb91d 100644 --- a/test/lib/fs.appendFile.spec.js +++ b/test/lib/fs.appendFile.spec.js @@ -26,10 +26,13 @@ describe('fs.appendFile(filename, data, [options], callback)', function () { }); it('promise writes a string to a new file', function (done) { - fs.promises.appendFile('foo', 'bar').then(function () { - assert.equal(String(fs.readFileSync('foo')), 'bar'); - done(); - }, done); + fs.promises + .appendFile('foo', 'bar') + .then(function () { + assert.equal(String(fs.readFileSync('foo')), 'bar'); + done(); + }) + .catch(done); }); it('appends a string to an existing file', function (done) { @@ -43,10 +46,16 @@ describe('fs.appendFile(filename, data, [options], callback)', function () { }); it('promise appends a string to an existing file', function (done) { - fs.promises.appendFile('dir/file.txt', ' bar').then(function () { - assert.equal(String(fs.readFileSync('dir/file.txt')), 'file content bar'); - done(); - }, done); + fs.promises + .appendFile('dir/file.txt', ' bar') + .then(function () { + assert.equal( + String(fs.readFileSync('dir/file.txt')), + 'file content bar' + ); + done(); + }) + .catch(done); }); it('appends a buffer to a file', function (done) { @@ -68,7 +77,8 @@ describe('fs.appendFile(filename, data, [options], callback)', function () { 'file content bar' ); done(); - }, done); + }) + .catch(done); }); it('appends via a symbolic link file', function (done) { @@ -82,10 +92,16 @@ describe('fs.appendFile(filename, data, [options], callback)', function () { }); it('promise appends via a symbolic link file', function (done) { - fs.promises.appendFile('link.txt', ' bar').then(function () { - assert.equal(String(fs.readFileSync('dir/file.txt')), 'file content bar'); - done(); - }, done); + fs.promises + .appendFile('link.txt', ' bar') + .then(function () { + assert.equal( + String(fs.readFileSync('dir/file.txt')), + 'file content bar' + ); + done(); + }) + .catch(done); }); it('fails if directory does not exist', function (done) { diff --git a/test/lib/fs.chmod-fchmod.spec.js b/test/lib/fs.chmod-fchmod.spec.js index 68fe133..2d1b23f 100644 --- a/test/lib/fs.chmod-fchmod.spec.js +++ b/test/lib/fs.chmod-fchmod.spec.js @@ -37,11 +37,14 @@ describe('fs.chmod(path, mode, callback)', function () { }); it('promise changes permissions of a file', function (done) { - fs.promises.chmod('file.txt', parseInt('0664', 8)).then(function () { - const stats = fs.statSync('file.txt'); - assert.equal(stats.mode & parseInt('0777', 8), parseInt('0664', 8)); - done(); - }, done); + fs.promises + .chmod('file.txt', parseInt('0664', 8)) + .then(function () { + const stats = fs.statSync('file.txt'); + assert.equal(stats.mode & parseInt('0777', 8), parseInt('0664', 8)); + done(); + }) + .catch(done); }); it('fails if file does not exist', function (done) { @@ -117,7 +120,8 @@ describe('fs.fchmod(fd, mode, callback)', function () { const stats = fs.statSync('file.txt'); assert.equal(stats.mode & parseInt('0777', 8), parseInt('0644', 8)); done(); - }, done); + }) + .catch(done); }); }); diff --git a/test/lib/fs.copyFile.spec.js b/test/lib/fs.copyFile.spec.js index 957a8a8..c74de22 100644 --- a/test/lib/fs.copyFile.spec.js +++ b/test/lib/fs.copyFile.spec.js @@ -52,7 +52,8 @@ if (fs.copyFile && fs.copyFileSync) { 'file content' ); done(); - }, done); + }) + .catch(done); }); it('truncates dest file if it exists', function (done) { @@ -75,7 +76,8 @@ if (fs.copyFile && fs.copyFileSync) { 'file content' ); done(); - }, done); + }) + .catch(done); }); it('throws if dest exists and exclusive', function (done) { diff --git a/test/lib/fs.link-symlink.spec.js b/test/lib/fs.link-symlink.spec.js index 48bf698..53d6c4c 100644 --- a/test/lib/fs.link-symlink.spec.js +++ b/test/lib/fs.link-symlink.spec.js @@ -49,13 +49,16 @@ describe('fs.link(srcpath, dstpath, callback)', function () { it('promise creates a link to a file', function (done) { assert.equal(fs.statSync('file.txt').nlink, 1); - fs.promises.link('file.txt', 'link.txt').then(function () { - assert.isTrue(fs.statSync('link.txt').isFile()); - assert.equal(fs.statSync('link.txt').nlink, 2); - assert.equal(fs.statSync('file.txt').nlink, 2); - assert.equal(String(fs.readFileSync('link.txt')), 'content'); - done(); - }, done); + fs.promises + .link('file.txt', 'link.txt') + .then(function () { + assert.isTrue(fs.statSync('link.txt').isFile()); + assert.equal(fs.statSync('link.txt').nlink, 2); + assert.equal(fs.statSync('file.txt').nlink, 2); + assert.equal(String(fs.readFileSync('link.txt')), 'content'); + done(); + }) + .catch(done); }); it('works if original is renamed', function (done) { @@ -71,12 +74,15 @@ describe('fs.link(srcpath, dstpath, callback)', function () { }); it('promise works if original is renamed', function (done) { - fs.promises.link('file.txt', 'link.txt').then(function () { - fs.renameSync('file.txt', 'renamed.txt'); - assert.isTrue(fs.statSync('link.txt').isFile()); - assert.equal(String(fs.readFileSync('link.txt')), 'content'); - done(); - }, done); + fs.promises + .link('file.txt', 'link.txt') + .then(function () { + fs.renameSync('file.txt', 'renamed.txt'); + assert.isTrue(fs.statSync('link.txt').isFile()); + assert.equal(String(fs.readFileSync('link.txt')), 'content'); + done(); + }) + .catch(done); }); it('works if original is removed', function (done) { @@ -99,15 +105,18 @@ describe('fs.link(srcpath, dstpath, callback)', function () { it('promise works if original is removed', function (done) { assert.equal(fs.statSync('file.txt').nlink, 1); - fs.promises.link('file.txt', 'link.txt').then(function () { - assert.equal(fs.statSync('link.txt').nlink, 2); - assert.equal(fs.statSync('file.txt').nlink, 2); - fs.unlinkSync('file.txt'); - assert.isTrue(fs.statSync('link.txt').isFile()); - assert.equal(fs.statSync('link.txt').nlink, 1); - assert.equal(String(fs.readFileSync('link.txt')), 'content'); - done(); - }, done); + fs.promises + .link('file.txt', 'link.txt') + .then(function () { + assert.equal(fs.statSync('link.txt').nlink, 2); + assert.equal(fs.statSync('file.txt').nlink, 2); + fs.unlinkSync('file.txt'); + assert.isTrue(fs.statSync('link.txt').isFile()); + assert.equal(fs.statSync('link.txt').nlink, 1); + assert.equal(String(fs.readFileSync('link.txt')), 'content'); + done(); + }) + .catch(done); }); it('fails if original is a directory', function (done) { @@ -221,11 +230,14 @@ describe('fs.symlink(srcpath, dstpath, [type], callback)', function () { } it('promise creates a symbolic link to a file', function (done) { - fs.promises.symlink('../file.txt', 'dir/link.txt').then(function () { - assert.isTrue(fs.statSync('dir/link.txt').isFile()); - assert.equal(String(fs.readFileSync('dir/link.txt')), 'content'); - done(); - }, done); + fs.promises + .symlink('../file.txt', 'dir/link.txt') + .then(function () { + assert.isTrue(fs.statSync('dir/link.txt').isFile()); + assert.equal(String(fs.readFileSync('dir/link.txt')), 'content'); + done(); + }) + .catch(done); }); it('breaks if original is renamed', function (done) { @@ -241,12 +253,15 @@ describe('fs.symlink(srcpath, dstpath, [type], callback)', function () { }); it('promise breaks if original is renamed', function (done) { - fs.promises.symlink('file.txt', 'link.txt').then(function () { - assert.isTrue(fs.existsSync('link.txt')); - fs.renameSync('file.txt', 'renamed.txt'); - assert.isFalse(fs.existsSync('link.txt')); - done(); - }, done); + fs.promises + .symlink('file.txt', 'link.txt') + .then(function () { + assert.isTrue(fs.existsSync('link.txt')); + fs.renameSync('file.txt', 'renamed.txt'); + assert.isFalse(fs.existsSync('link.txt')); + done(); + }) + .catch(done); }); it('works if original is a directory', function (done) { @@ -260,10 +275,13 @@ describe('fs.symlink(srcpath, dstpath, [type], callback)', function () { }); it('promise works if original is a directory', function (done) { - fs.promises.symlink('dir', 'link').then(function () { - assert.isTrue(fs.statSync('link').isDirectory()); - done(); - }, done); + fs.promises + .symlink('dir', 'link') + .then(function () { + assert.isTrue(fs.statSync('link').isDirectory()); + done(); + }) + .catch(done); }); }); diff --git a/test/lib/fs.lstat.spec.js b/test/lib/fs.lstat.spec.js index 1482825..3219b5c 100644 --- a/test/lib/fs.lstat.spec.js +++ b/test/lib/fs.lstat.spec.js @@ -70,21 +70,27 @@ describe('fs.lstat(path, options, callback)', function () { }); it('promise stats a symbolic link', function (done) { - fs.promises.lstat('link').then(function (stats) { - assert.isTrue(stats.isSymbolicLink()); - assert.isFalse(stats.isFile()); - assert.equal(stats.mtime.getTime(), 2); - done(); - }, done); + fs.promises + .lstat('link') + .then(function (stats) { + assert.isTrue(stats.isSymbolicLink()); + assert.isFalse(stats.isFile()); + assert.equal(stats.mtime.getTime(), 2); + done(); + }) + .catch(done); }); it('promise stats a symbolic link with bigint', function (done) { - fs.promises.lstat('link', {bigint: true}).then(function (stats) { - assert.isTrue(stats.isSymbolicLink()); - assert.isFalse(stats.isFile()); - assert.equal(typeof stats.mtimeMs, 'bigint'); - done(); - }, done); + fs.promises + .lstat('link', {bigint: true}) + .then(function (stats) { + assert.isTrue(stats.isSymbolicLink()); + assert.isFalse(stats.isFile()); + assert.equal(typeof stats.mtimeMs, 'bigint'); + done(); + }) + .catch(done); }); it('stats a regular file', function (done) { @@ -112,21 +118,27 @@ describe('fs.lstat(path, options, callback)', function () { }); it('promise stats a regular file', function (done) { - fs.promises.lstat('file.txt').then(function (stats) { - assert.isTrue(stats.isFile()); - assert.isFalse(stats.isSymbolicLink()); - assert.equal(stats.mtime.getTime(), 1); - done(); - }, done); + fs.promises + .lstat('file.txt') + .then(function (stats) { + assert.isTrue(stats.isFile()); + assert.isFalse(stats.isSymbolicLink()); + assert.equal(stats.mtime.getTime(), 1); + done(); + }) + .catch(done); }); it('promise stats a regular file with bigint', function (done) { - fs.promises.lstat('file.txt', {bigint: true}).then(function (stats) { - assert.isTrue(stats.isFile()); - assert.isFalse(stats.isSymbolicLink()); - assert.equal(typeof stats.mtimeMs, 'bigint'); - done(); - }, done); + fs.promises + .lstat('file.txt', {bigint: true}) + .then(function (stats) { + assert.isTrue(stats.isFile()); + assert.isFalse(stats.isSymbolicLink()); + assert.equal(typeof stats.mtimeMs, 'bigint'); + done(); + }) + .catch(done); }); it('fails on file not exist', function (done) { diff --git a/test/lib/fs.mkdir.spec.js b/test/lib/fs.mkdir.spec.js index 9673b61..70c8bf6 100644 --- a/test/lib/fs.mkdir.spec.js +++ b/test/lib/fs.mkdir.spec.js @@ -44,11 +44,14 @@ describe('fs.mkdir(path, [mode], callback)', function () { }); it('promise creates a new directory', function (done) { - fs.promises.mkdir('parent/dir').then(function () { - const stats = fs.statSync('parent/dir'); - assert.isTrue(stats.isDirectory()); - done(); - }, done); + fs.promises + .mkdir('parent/dir') + .then(function () { + const stats = fs.statSync('parent/dir'); + assert.isTrue(stats.isDirectory()); + done(); + }) + .catch(done); }); it('creates a new directory recursively', function (done) { @@ -77,7 +80,8 @@ describe('fs.mkdir(path, [mode], callback)', function () { stats = fs.statSync('parent/foo'); assert.isTrue(stats.isDirectory()); done(); - }, done); + }) + .catch(done); }); it('accepts dir mode', function (done) { @@ -93,12 +97,15 @@ describe('fs.mkdir(path, [mode], callback)', function () { }); it('promise accepts dir mode', function (done) { - fs.promises.mkdir('parent/dir', parseInt('0755', 8)).then(function () { - const stats = fs.statSync('parent/dir'); - assert.isTrue(stats.isDirectory()); - assert.equal(stats.mode & parseInt('0777', 8), parseInt('0755', 8)); - done(); - }, done); + fs.promises + .mkdir('parent/dir', parseInt('0755', 8)) + .then(function () { + const stats = fs.statSync('parent/dir'); + assert.isTrue(stats.isDirectory()); + assert.equal(stats.mode & parseInt('0777', 8), parseInt('0755', 8)); + done(); + }) + .catch(done); }); it('accepts dir mode recursively', function (done) { @@ -141,7 +148,8 @@ describe('fs.mkdir(path, [mode], callback)', function () { assert.isTrue(stats.isDirectory()); assert.equal(stats.mode & parseInt('0777', 8), parseInt('0755', 8)); done(); - }, done); + }) + .catch(done); }); it('fails if parent does not exist', function (done) { diff --git a/test/lib/fs.mkdtemp.spec.js b/test/lib/fs.mkdtemp.spec.js index f379592..50ec179 100644 --- a/test/lib/fs.mkdtemp.spec.js +++ b/test/lib/fs.mkdtemp.spec.js @@ -34,13 +34,16 @@ if (fs.mkdtemp) { }); it('promise creates a new directory', function (done) { - fs.promises.mkdtemp('parent/dir').then(function (dirPath) { - const parentPath = path.dirname(dirPath); - assert.equal(parentPath, 'parent'); - const stats = fs.statSync(dirPath); - assert.isTrue(stats.isDirectory()); - done(); - }, done); + fs.promises + .mkdtemp('parent/dir') + .then(function (dirPath) { + const parentPath = path.dirname(dirPath); + assert.equal(parentPath, 'parent'); + const stats = fs.statSync(dirPath); + assert.isTrue(stats.isDirectory()); + done(); + }) + .catch(done); }); it('accepts a "utf8" encoding argument', function (done) { @@ -58,14 +61,17 @@ if (fs.mkdtemp) { }); it('promise accepts a "utf8" encoding argument', function (done) { - fs.promises.mkdtemp('parent/dir', 'utf8').then(function (dirPath) { - assert.isString(dirPath); - const parentPath = path.dirname(dirPath); - assert.equal(parentPath, 'parent'); - const stats = fs.statSync(dirPath); - assert.isTrue(stats.isDirectory()); - done(); - }, done); + fs.promises + .mkdtemp('parent/dir', 'utf8') + .then(function (dirPath) { + assert.isString(dirPath); + const parentPath = path.dirname(dirPath); + assert.equal(parentPath, 'parent'); + const stats = fs.statSync(dirPath); + assert.isTrue(stats.isDirectory()); + done(); + }) + .catch(done); }); it('accepts a "buffer" encoding argument', function (done) { @@ -84,15 +90,18 @@ if (fs.mkdtemp) { }); it('promise accepts a "buffer" encoding argument', function (done) { - fs.promises.mkdtemp('parent/dir', 'buffer').then(function (buffer) { - assert.instanceOf(buffer, Buffer); - const dirPath = buffer.toString(); - const parentPath = path.dirname(dirPath); - assert.equal(parentPath, 'parent'); - const stats = fs.statSync(dirPath); - assert.isTrue(stats.isDirectory()); - done(); - }, done); + fs.promises + .mkdtemp('parent/dir', 'buffer') + .then(function (buffer) { + assert.instanceOf(buffer, Buffer); + const dirPath = buffer.toString(); + const parentPath = path.dirname(dirPath); + assert.equal(parentPath, 'parent'); + const stats = fs.statSync(dirPath); + assert.isTrue(stats.isDirectory()); + done(); + }) + .catch(done); }); it('accepts an options argument with "utf8" encoding', function (done) { @@ -119,7 +128,8 @@ if (fs.mkdtemp) { const stats = fs.statSync(dirPath); assert.isTrue(stats.isDirectory()); done(); - }, done); + }) + .catch(done); }); it('accepts an options argument with "buffer" encoding', function (done) { @@ -148,7 +158,8 @@ if (fs.mkdtemp) { const stats = fs.statSync(dirPath); assert.isTrue(stats.isDirectory()); done(); - }, done); + }) + .catch(done); }); it('fails if parent does not exist', function (done) { diff --git a/test/lib/fs.open-close.spec.js b/test/lib/fs.open-close.spec.js index d4e06dd..8505cf2 100644 --- a/test/lib/fs.open-close.spec.js +++ b/test/lib/fs.open-close.spec.js @@ -45,10 +45,13 @@ describe('fs.open(path, flags, [mode], callback)', function () { }); it('promise opens an existing file for reading (r)', function (done) { - fs.promises.open('nested/sub/dir/one.txt', 'r').then(function (fd) { - assert.isNumber(fd.fd); - done(); - }, done); + fs.promises + .open('nested/sub/dir/one.txt', 'r') + .then(function (fd) { + assert.isNumber(fd.fd); + done(); + }) + .catch(done); }); it('fails if file does not exist (r)', function (done) { @@ -90,7 +93,8 @@ describe('fs.open(path, flags, [mode], callback)', function () { assert.isNumber(fd.fd); assert.isTrue(fs.existsSync('path/to/new.txt')); done(); - }, done); + }) + .catch(done); }); it('opens an existing file for writing (w)', function (done) { @@ -109,7 +113,8 @@ describe('fs.open(path, flags, [mode], callback)', function () { .then(function (fd) { assert.isNumber(fd.fd); done(); - }, done); + }) + .catch(done); }); it('fails if file exists (wx)', function (done) { diff --git a/test/lib/fs.read.spec.js b/test/lib/fs.read.spec.js index e9154c4..1521392 100644 --- a/test/lib/fs.read.spec.js +++ b/test/lib/fs.read.spec.js @@ -44,7 +44,8 @@ describe('fs.read(fd, buffer, offset, length, position, callback)', function () assert.equal(result.buffer, buffer); assert.equal(String(buffer), 'file content'); done(); - }, done); + }) + .catch(done); }); it('allows file contents to be read w/ offset', function (done) { @@ -77,7 +78,8 @@ describe('fs.read(fd, buffer, offset, length, position, callback)', function () assert.equal(result.buffer, buffer); assert.equal(String(buffer.slice(5)), 'file co'); done(); - }, done); + }) + .catch(done); }); it('allows file contents to be read w/ length', function (done) { @@ -110,7 +112,8 @@ describe('fs.read(fd, buffer, offset, length, position, callback)', function () assert.equal(result.buffer, buffer); assert.equal(String(buffer.slice(0, 4)), 'file'); done(); - }, done); + }) + .catch(done); }); it('allows file contents to be read w/ offset & length', function (done) { @@ -143,7 +146,8 @@ describe('fs.read(fd, buffer, offset, length, position, callback)', function () assert.equal(result.buffer, buffer); assert.equal(String(buffer.slice(2, 6)), 'file'); done(); - }, done); + }) + .catch(done); }); it('allows file contents to be read w/ position', function (done) { @@ -176,7 +180,8 @@ describe('fs.read(fd, buffer, offset, length, position, callback)', function () assert.equal(result.buffer, buffer); assert.equal(String(buffer), 'content'); done(); - }, done); + }) + .catch(done); }); it('allows read w/ offset, length, & position', function (done) { @@ -209,7 +214,8 @@ describe('fs.read(fd, buffer, offset, length, position, callback)', function () assert.equal(result.buffer, buffer); assert.equal(String(buffer.slice(2, 9)), 'content'); done(); - }, done); + }) + .catch(done); }); it('fails for closed file descriptor', function (done) { diff --git a/test/lib/fs.readFile.spec.js b/test/lib/fs.readFile.spec.js index 07d09f9..8fe2959 100644 --- a/test/lib/fs.readFile.spec.js +++ b/test/lib/fs.readFile.spec.js @@ -29,11 +29,14 @@ describe('fs.readFile(filename, [options], callback)', function () { }); it('promise allows a file to be read asynchronously', function (done) { - fs.promises.readFile('path/to/file.txt').then(function (data) { - assert.isTrue(Buffer.isBuffer(data)); - assert.equal(String(data), 'file content'); - done(); - }, done); + fs.promises + .readFile('path/to/file.txt') + .then(function (data) { + assert.isTrue(Buffer.isBuffer(data)); + assert.equal(String(data), 'file content'); + done(); + }) + .catch(done); }); it('fails for directory', function (done) { diff --git a/test/lib/fs.readdir.spec.js b/test/lib/fs.readdir.spec.js index cea6177..a1a96b5 100644 --- a/test/lib/fs.readdir.spec.js +++ b/test/lib/fs.readdir.spec.js @@ -51,11 +51,14 @@ describe('fs.readdir(path, callback)', function () { }); it('promise lists directory contents', function (done) { - fs.promises.readdir(path.join('path', 'to')).then(function (items) { - assert.isArray(items); - assert.deepEqual(items, ['file.txt']); - done(); - }, done); + fs.promises + .readdir(path.join('path', 'to')) + .then(function (items) { + assert.isArray(items); + assert.deepEqual(items, ['file.txt']); + done(); + }) + .catch(done); }); it('lists nested directory contents', function (done) { @@ -74,7 +77,8 @@ describe('fs.readdir(path, callback)', function () { assert.isArray(items); assert.deepEqual(items, ['empty', 'one.txt', 'two.txt']); done(); - }, done); + }) + .catch(done); }); it('calls with an error for bogus path', function (done) { @@ -151,7 +155,8 @@ describe('fs.readdir(path, callback)', function () { assert.ok(items[1].isFile()); assert.ok(items[2].isFile()); done(); - }, done); + }) + .catch(done); }); it('should support "withFileTypes" option with "encoding" option', function (done) { diff --git a/test/lib/fs.readlink.spec.js b/test/lib/fs.readlink.spec.js index 9880f18..2c9d79c 100644 --- a/test/lib/fs.readlink.spec.js +++ b/test/lib/fs.readlink.spec.js @@ -36,10 +36,13 @@ describe('fs.readlink(path, callback)', function () { }); it('promise reads a symbolic link', function (done) { - fs.promises.readlink('link').then(function (srcPath) { - assert.equal(srcPath, './file.txt'); - done(); - }, done); + fs.promises + .readlink('link') + .then(function (srcPath) { + assert.equal(srcPath, './file.txt'); + done(); + }) + .catch(done); }); it('fails for regular files', function (done) { diff --git a/test/lib/fs.realpath.spec.js b/test/lib/fs.realpath.spec.js index 7e31878..b0c0dec 100644 --- a/test/lib/fs.realpath.spec.js +++ b/test/lib/fs.realpath.spec.js @@ -28,10 +28,13 @@ describe('fs.realpath(path, [cache], callback)', function () { }); it('promise resolves the real path for a symbolic link', function (done) { - fs.promises.realpath('link').then(function (resolved) { - assertEqualPaths(resolved, path.resolve('dir/file.txt')); - done(); - }, done); + fs.promises + .realpath('link') + .then(function (resolved) { + assertEqualPaths(resolved, path.resolve('dir/file.txt')); + done(); + }) + .catch(done); }); it('resolves the real path regular file', function (done) { @@ -45,10 +48,13 @@ describe('fs.realpath(path, [cache], callback)', function () { }); it('promise resolves the real path regular file', function (done) { - fs.promises.realpath('dir/file.txt').then(function (resolved) { - assertEqualPaths(resolved, path.resolve('dir/file.txt')); - done(); - }, done); + fs.promises + .realpath('dir/file.txt') + .then(function (resolved) { + assertEqualPaths(resolved, path.resolve('dir/file.txt')); + done(); + }) + .catch(done); }); it('fails on file not exist', function (done) { diff --git a/test/lib/fs.rename.spec.js b/test/lib/fs.rename.spec.js index a48808c..c815632 100644 --- a/test/lib/fs.rename.spec.js +++ b/test/lib/fs.rename.spec.js @@ -44,11 +44,14 @@ describe('fs.rename(oldPath, newPath, callback)', function () { }); it('promise allows files to be renamed', function (done) { - fs.promises.rename('path/to/a.bin', 'path/to/b.bin').then(function () { - assert.isFalse(fs.existsSync('path/to/a.bin')); - assert.isTrue(fs.existsSync('path/to/b.bin')); - done(); - }, done); + fs.promises + .rename('path/to/a.bin', 'path/to/b.bin') + .then(function () { + assert.isFalse(fs.existsSync('path/to/a.bin')); + assert.isTrue(fs.existsSync('path/to/b.bin')); + done(); + }) + .catch(done); }); it('updates mtime of parent directory', function (done) { @@ -73,7 +76,8 @@ describe('fs.rename(oldPath, newPath, callback)', function () { const newTime = fs.statSync('nested/dir').mtime; assert.isTrue(newTime > oldTime); done(); - }, done); + }) + .catch(done); }); it('calls callback with error if old path does not exist', function (done) { @@ -111,7 +115,8 @@ describe('fs.rename(oldPath, newPath, callback)', function () { assert.isFalse(fs.existsSync('path/to/a.bin')); assert.isTrue(fs.existsSync('nested/dir/file.txt')); done(); - }, done); + }) + .catch(done); }); it('allows directories to be renamed', function (done) { @@ -125,12 +130,15 @@ describe('fs.rename(oldPath, newPath, callback)', function () { }); it('promise allows directories to be renamed', function (done) { - fs.promises.rename('path/to', 'path/foo').then(function () { - assert.isFalse(fs.existsSync('path/to')); - assert.isTrue(fs.existsSync('path/foo')); - assert.deepEqual(fs.readdirSync('path/foo'), ['a.bin']); - done(); - }, done); + fs.promises + .rename('path/to', 'path/foo') + .then(function () { + assert.isFalse(fs.existsSync('path/to')); + assert.isTrue(fs.existsSync('path/foo')); + assert.deepEqual(fs.readdirSync('path/foo'), ['a.bin']); + done(); + }) + .catch(done); }); it('calls callback with error if new directory not empty', function (done) { diff --git a/test/lib/fs.rmdir.spec.js b/test/lib/fs.rmdir.spec.js index 2633fe1..2eaf8c7 100644 --- a/test/lib/fs.rmdir.spec.js +++ b/test/lib/fs.rmdir.spec.js @@ -64,11 +64,14 @@ describe('fs.rmdir(path, callback)', function () { it('promise removes an empty directory', function (done) { assert.equal(fs.statSync('path/to').nlink, 3); - fs.promises.rmdir('path/to/empty').then(function () { - assert.isFalse(fs.existsSync('path/to/empty')); - assert.equal(fs.statSync('path/to').nlink, 2); - done(); - }, done); + fs.promises + .rmdir('path/to/empty') + .then(function () { + assert.isFalse(fs.existsSync('path/to/empty')); + assert.equal(fs.statSync('path/to').nlink, 2); + done(); + }) + .catch(done); }); it('fails if not empty', function (done) { @@ -130,11 +133,14 @@ describe('fs.rmdir(path, callback)', function () { it('promise recursively remove empty directory', function (done) { assert.equal(fs.statSync('path2/to').nlink, 4); - fs.promises.rmdir('path2/to/empty', {recursive: true}).then(function () { - assert.isFalse(fs.existsSync('path2/to/empty')); - assert.equal(fs.statSync('path2/to').nlink, 3); - done(); - }, done); + fs.promises + .rmdir('path2/to/empty', {recursive: true}) + .then(function () { + assert.isFalse(fs.existsSync('path2/to/empty')); + assert.equal(fs.statSync('path2/to').nlink, 3); + done(); + }) + .catch(done); }); it('recursively remove non-empty directory', function (done) { @@ -159,7 +165,8 @@ describe('fs.rmdir(path, callback)', function () { assert.isFalse(fs.existsSync('path2/to/non-empty')); assert.equal(fs.statSync('path2/to').nlink, 3); done(); - }, done); + }) + .catch(done); }); }); diff --git a/test/lib/fs.stat-fstat.spec.js b/test/lib/fs.stat-fstat.spec.js index 5524845..29a62d4 100644 --- a/test/lib/fs.stat-fstat.spec.js +++ b/test/lib/fs.stat-fstat.spec.js @@ -37,10 +37,13 @@ describe('fs.stat(path, options, callback)', function () { }); xit('promise creates an instance of fs.Stats', function (done) { - fs.promises.stat('/path/to/file.txt').then(function (stats) { - assert.instanceOf(stats, fs.Stats); - done(); - }, done); + fs.promises + .stat('/path/to/file.txt') + .then(function (stats) { + assert.instanceOf(stats, fs.Stats); + done(); + }) + .catch(done); }); it('identifies files', function (done) { @@ -96,12 +99,15 @@ describe('fs.stat(path, options, callback)', function () { }); it('promise identifies files', function (done) { - fs.promises.stat('/path/to/file.txt').then(function (stats) { - assert.isTrue(stats.isFile()); - assert.isFalse(stats.isDirectory()); - done(); - assert.equal(stats.mtime.getTime(), 2); - }, done); + fs.promises + .stat('/path/to/file.txt') + .then(function (stats) { + assert.isTrue(stats.isFile()); + assert.isFalse(stats.isDirectory()); + done(); + assert.equal(stats.mtime.getTime(), 2); + }) + .catch(done); }); it('promise identifies files', function (done) { @@ -112,7 +118,8 @@ describe('fs.stat(path, options, callback)', function () { assert.isFalse(stats.isDirectory()); done(); assert.equal(typeof stats.mtimeMs, 'bigint'); - }, done); + }) + .catch(done); }); it('identifies directories', function (done) { @@ -140,21 +147,27 @@ describe('fs.stat(path, options, callback)', function () { }); it('promise identifies directories', function (done) { - fs.promises.stat('/empty').then(function (stats) { - assert.isTrue(stats.isDirectory()); - assert.isFalse(stats.isFile()); - assert.equal(stats.size, 1); - done(); - }, done); + fs.promises + .stat('/empty') + .then(function (stats) { + assert.isTrue(stats.isDirectory()); + assert.isFalse(stats.isFile()); + assert.equal(stats.size, 1); + done(); + }) + .catch(done); }); it('promise identifies directories with bigint', function (done) { - fs.promises.stat('/empty', {bigint: true}).then(function (stats) { - assert.isTrue(stats.isDirectory()); - assert.isFalse(stats.isFile()); - assert.equal(typeof stats.size, 'bigint'); - done(); - }, done); + fs.promises + .stat('/empty', {bigint: true}) + .then(function (stats) { + assert.isTrue(stats.isDirectory()); + assert.isFalse(stats.isFile()); + assert.equal(typeof stats.size, 'bigint'); + done(); + }) + .catch(done); }); it('provides file stats', function (done) { @@ -190,16 +203,19 @@ describe('fs.stat(path, options, callback)', function () { }); it('promise provides file stats', function (done) { - fs.promises.stat('/path/to/file.txt').then(function (stats) { - assert.equal(stats.ctime.getTime(), 1); - assert.equal(stats.mtime.getTime(), 2); - assert.equal(stats.atime.getTime(), 3); - assert.equal(stats.uid, 42); - assert.equal(stats.gid, 43); - assert.equal(stats.nlink, 1); - assert.isNumber(stats.rdev); - done(); - }, done); + fs.promises + .stat('/path/to/file.txt') + .then(function (stats) { + assert.equal(stats.ctime.getTime(), 1); + assert.equal(stats.mtime.getTime(), 2); + assert.equal(stats.atime.getTime(), 3); + assert.equal(stats.uid, 42); + assert.equal(stats.gid, 43); + assert.equal(stats.nlink, 1); + assert.isNumber(stats.rdev); + done(); + }) + .catch(done); }); it('promise provides file stats with bigint', function (done) { @@ -214,7 +230,8 @@ describe('fs.stat(path, options, callback)', function () { assert.equal(typeof stats.nlink, 'bigint'); assert.equal(typeof stats.rdev, 'bigint'); done(); - }, done); + }) + .catch(done); }); if ( @@ -235,11 +252,14 @@ describe('fs.stat(path, options, callback)', function () { }); it('promise includes blocks and blksize in stats', function (done) { - fs.promises.stat('/path/to/file.txt').then(function (stats) { - assert.isNumber(stats.blocks); - assert.isNumber(stats.blksize); - done(); - }, done); + fs.promises + .stat('/path/to/file.txt') + .then(function (stats) { + assert.isNumber(stats.blocks); + assert.isNumber(stats.blksize); + done(); + }) + .catch(done); }); } @@ -292,45 +312,51 @@ describe('fs.stat(path, options, callback)', function () { }); it('promise provides directory stats', function (done) { - fs.promises.stat('/path').then(function (stats) { - assert.instanceOf(stats.ctime, Date); - assert.instanceOf(stats.mtime, Date); - assert.instanceOf(stats.atime, Date); - if (process.getuid) { - assert.isNumber(stats.uid); - } else { - assert.strictEqual(stats.uid, 0); - } - if (process.getgid) { - assert.isNumber(stats.gid); - } else { - assert.strictEqual(stats.gid, 0); - } - assert.equal(stats.nlink, 3); - assert.isNumber(stats.rdev); - done(); - }, done); + fs.promises + .stat('/path') + .then(function (stats) { + assert.instanceOf(stats.ctime, Date); + assert.instanceOf(stats.mtime, Date); + assert.instanceOf(stats.atime, Date); + if (process.getuid) { + assert.isNumber(stats.uid); + } else { + assert.strictEqual(stats.uid, 0); + } + if (process.getgid) { + assert.isNumber(stats.gid); + } else { + assert.strictEqual(stats.gid, 0); + } + assert.equal(stats.nlink, 3); + assert.isNumber(stats.rdev); + done(); + }) + .catch(done); }); it('promise provides directory stats with bigint', function (done) { - fs.promises.stat('/path', {bigint: true}).then(function (stats) { - assert.instanceOf(stats.ctime, Date); - assert.instanceOf(stats.mtime, Date); - assert.instanceOf(stats.atime, Date); - if (process.getuid) { - assert.equal(typeof stats.uid, 'bigint'); - } else { - assert.strictEqual(stats.uid, 0n); - } - if (process.getgid) { - assert.equal(typeof stats.gid, 'bigint'); - } else { - assert.strictEqual(stats.gid, 0n); - } - assert.equal(typeof stats.nlink, 'bigint'); - assert.equal(typeof stats.rdev, 'bigint'); - done(); - }, done); + fs.promises + .stat('/path', {bigint: true}) + .then(function (stats) { + assert.instanceOf(stats.ctime, Date); + assert.instanceOf(stats.mtime, Date); + assert.instanceOf(stats.atime, Date); + if (process.getuid) { + assert.equal(typeof stats.uid, 'bigint'); + } else { + assert.strictEqual(stats.uid, 0n); + } + if (process.getgid) { + assert.equal(typeof stats.gid, 'bigint'); + } else { + assert.strictEqual(stats.gid, 0n); + } + assert.equal(typeof stats.nlink, 'bigint'); + assert.equal(typeof stats.rdev, 'bigint'); + done(); + }) + .catch(done); }); if ( @@ -351,11 +377,14 @@ describe('fs.stat(path, options, callback)', function () { }); it('promise includes blocks and blksize in directory stats', function (done) { - fs.promises.stat('/path').then(function (stats) { - assert.isNumber(stats.blocks); - assert.isNumber(stats.blksize); - done(); - }, done); + fs.promises + .stat('/path') + .then(function (stats) { + assert.isNumber(stats.blocks); + assert.isNumber(stats.blksize); + done(); + }) + .catch(done); }); } }); @@ -403,7 +432,8 @@ describe('fs.fstat(fd, options, callback)', function () { assert.isTrue(stats.isFile()); assert.equal(stats.size, 12); done(); - }, done); + }) + .catch(done); }); it('promise accepts a file descriptor for a file (r) with bigint', function (done) { @@ -416,7 +446,8 @@ describe('fs.fstat(fd, options, callback)', function () { assert.isTrue(stats.isFile()); assert.equal(typeof stats.size, 'bigint'); done(); - }, done); + }) + .catch(done); }); it('accepts a file descriptor for a directory (r)', function (done) { @@ -453,7 +484,8 @@ describe('fs.fstat(fd, options, callback)', function () { assert.isTrue(stats.isDirectory()); assert.equal(stats.size, 1); done(); - }, done); + }) + .catch(done); }); it('promise accepts a file descriptor for a directory (r) with bigint', function (done) { @@ -466,7 +498,8 @@ describe('fs.fstat(fd, options, callback)', function () { assert.isTrue(stats.isDirectory()); assert.equal(typeof stats.size, 'bigint'); done(); - }, done); + }) + .catch(done); }); it('fails for bad file descriptor', function (done) { diff --git a/test/lib/fs.unlink.spec.js b/test/lib/fs.unlink.spec.js index c27b47c..bcb821a 100644 --- a/test/lib/fs.unlink.spec.js +++ b/test/lib/fs.unlink.spec.js @@ -40,10 +40,13 @@ describe('fs.unlink(path, callback)', function () { }); it('promise deletes a file', function (done) { - fs.promises.unlink('file.txt').then(function () { - assert.isFalse(fs.existsSync('file.txt')); - done(); - }, done); + fs.promises + .unlink('file.txt') + .then(function () { + assert.isFalse(fs.existsSync('file.txt')); + done(); + }) + .catch(done); }); it('updates mtime of parent', function (done) { @@ -61,12 +64,15 @@ describe('fs.unlink(path, callback)', function () { it('updates mtime of parent', function (done) { const oldTime = fs.statSync('dir2').mtime; - fs.promises.unlink('dir2/file').then(function () { - assert.isFalse(fs.existsSync('dir2/file')); - const newTime = fs.statSync('dir2').mtime; - assert.isTrue(newTime > oldTime); - done(); - }, done); + fs.promises + .unlink('dir2/file') + .then(function () { + assert.isFalse(fs.existsSync('dir2/file')); + const newTime = fs.statSync('dir2').mtime; + assert.isTrue(newTime > oldTime); + done(); + }) + .catch(done); }); it('fails for a directory', function (done) { @@ -110,15 +116,18 @@ describe('fs.unlink(path, callback)', function () { it('promise respects previously opened file descriptors', function (done) { const fd = fs.openSync('file.txt', 'r'); - fs.promises.unlink('file.txt').then(function () { - assert.isFalse(fs.existsSync('file.txt')); - // but we can still use fd to read - const buffer = Buffer.alloc(7); - const read = fs.readSync(fd, buffer, 0, 7); - assert.equal(read, 7); - assert.equal(String(buffer), 'content'); - done(); - }, done); + fs.promises + .unlink('file.txt') + .then(function () { + assert.isFalse(fs.existsSync('file.txt')); + // but we can still use fd to read + const buffer = Buffer.alloc(7); + const read = fs.readSync(fd, buffer, 0, 7); + assert.equal(read, 7); + assert.equal(String(buffer), 'content'); + done(); + }) + .catch(done); }); }); diff --git a/test/lib/fs.utimes-lutimes-futimes.spec.js b/test/lib/fs.utimes-lutimes-futimes.spec.js index 0168bc4..ca54be0 100644 --- a/test/lib/fs.utimes-lutimes-futimes.spec.js +++ b/test/lib/fs.utimes-lutimes-futimes.spec.js @@ -76,7 +76,8 @@ describe('fs.utimes(path, atime, mtime, callback)', function () { assert.equal(stats.atime.getTime(), 100); assert.equal(stats.mtime.getTime(), 200); done(); - }, done); + }) + .catch(done); }); it('updates timestamps for a directory', function (done) { @@ -92,12 +93,15 @@ describe('fs.utimes(path, atime, mtime, callback)', function () { }); it('promise updates timestamps for a directory', function (done) { - fs.promises.utimes('dir', new Date(300), new Date(400)).then(function () { - const stats = fs.statSync('dir'); - assert.equal(stats.atime.getTime(), 300); - assert.equal(stats.mtime.getTime(), 400); - done(); - }, done); + fs.promises + .utimes('dir', new Date(300), new Date(400)) + .then(function () { + const stats = fs.statSync('dir'); + assert.equal(stats.atime.getTime(), 300); + assert.equal(stats.mtime.getTime(), 400); + done(); + }) + .catch(done); }); it('fails for a bogus path', function (done) { @@ -192,7 +196,8 @@ describe('fs.lutimes(path, atime, mtime, callback)', function () { assert.equal(stats.atime.getTime(), 100); assert.equal(stats.mtime.getTime(), 200); done(); - }, done); + }) + .catch(done); }); it('updates timestamps for a directory', function (done) { @@ -208,12 +213,15 @@ describe('fs.lutimes(path, atime, mtime, callback)', function () { }); it('promise updates timestamps for a directory', function (done) { - fs.promises.lutimes('dir', new Date(300), new Date(400)).then(function () { - const stats = fs.statSync('dir'); - assert.equal(stats.atime.getTime(), 300); - assert.equal(stats.mtime.getTime(), 400); - done(); - }, done); + fs.promises + .lutimes('dir', new Date(300), new Date(400)) + .then(function () { + const stats = fs.statSync('dir'); + assert.equal(stats.atime.getTime(), 300); + assert.equal(stats.mtime.getTime(), 400); + done(); + }) + .catch(done); }); it('fails for a bogus path', function (done) { @@ -366,7 +374,8 @@ describe('fs.futimes(fd, atime, mtime, callback)', function () { assert.equal(stats.atime.getTime(), 100); assert.equal(stats.mtime.getTime(), 200); done(); - }, done); + }) + .catch(done); }); it('updates timestamps for a directory', function (done) { @@ -393,7 +402,8 @@ describe('fs.futimes(fd, atime, mtime, callback)', function () { assert.equal(stats.atime.getTime(), 300); assert.equal(stats.mtime.getTime(), 400); done(); - }, done); + }) + .catch(done); }); }); diff --git a/test/lib/fs.write.spec.js b/test/lib/fs.write.spec.js index 46cee52..04d7fec 100644 --- a/test/lib/fs.write.spec.js +++ b/test/lib/fs.write.spec.js @@ -40,7 +40,8 @@ describe('fs.write(fd, buffer, offset, length, position, callback)', function () assert.equal(result.buffer, buffer); assert.equal(String(fs.readFileSync('path/new-file.txt')), 'new file'); done(); - }, done); + }) + .catch(done); }); it('writes a buffer to a file with implicit offset, length, position', function (done) { @@ -69,7 +70,8 @@ describe('fs.write(fd, buffer, offset, length, position, callback)', function () assert.equal(result.buffer, buffer); assert.equal(String(fs.readFileSync('path/new-file.txt')), 'new file'); done(); - }, done); + }) + .catch(done); }); it('can write a portion of a buffer to a file', function (done) { @@ -102,7 +104,8 @@ describe('fs.write(fd, buffer, offset, length, position, callback)', function () assert.equal(result.buffer, buffer); assert.equal(String(fs.readFileSync('path/new-file.txt')), 'ew fi'); done(); - }, done); + }) + .catch(done); }); it('can write a portion of a buffer to a file position', function (done) { @@ -141,7 +144,8 @@ describe('fs.write(fd, buffer, offset, length, position, callback)', function () 'fiew fintent' ); done(); - }, done); + }) + .catch(done); }); it('can write a portion of a buffer to a file position and enlarge the file', function (done) { @@ -180,7 +184,8 @@ describe('fs.write(fd, buffer, offset, length, position, callback)', function () 'file conew fi' ); done(); - }, done); + }) + .catch(done); }); it('can append to a file', function (done) { @@ -219,7 +224,8 @@ describe('fs.write(fd, buffer, offset, length, position, callback)', function () 'file content more' ); done(); - }, done); + }) + .catch(done); }); it('fails if file not open for writing', function (done) { @@ -335,7 +341,8 @@ describe('fs.write(fd, data[, position[, encoding]], callback)', function () { assert.equal(String(result.buffer), string); assert.equal(String(fs.readFileSync('path/new-file.txt')), 'new file'); done(); - }, done); + }) + .catch(done); }); it('writes a string to a file with implicit position and encoding', function (done) { @@ -368,7 +375,8 @@ describe('fs.write(fd, data[, position[, encoding]], callback)', function () { assert.equal(String(result.buffer), string); assert.equal(String(fs.readFileSync('path/new-file.txt')), 'new file'); done(); - }, done); + }) + .catch(done); }); it('can append to a file', function (done) { @@ -404,7 +412,8 @@ describe('fs.write(fd, data[, position[, encoding]], callback)', function () { 'file content more' ); done(); - }, done); + }) + .catch(done); }); it('can write to a position of a file', function (done) { @@ -440,7 +449,8 @@ describe('fs.write(fd, data[, position[, encoding]], callback)', function () { 'fil moretent' ); done(); - }, done); + }) + .catch(done); }); it('can write to a position of a file and enlarge it', function (done) { @@ -476,7 +486,8 @@ describe('fs.write(fd, data[, position[, encoding]], callback)', function () { 'file cont more' ); done(); - }, done); + }) + .catch(done); }); it('fails if file not open for writing', function (done) { diff --git a/test/lib/fs.writeFile.spec.js b/test/lib/fs.writeFile.spec.js index bf73f4f..460a603 100644 --- a/test/lib/fs.writeFile.spec.js +++ b/test/lib/fs.writeFile.spec.js @@ -27,10 +27,13 @@ describe('fs.writeFile(filename, data, [options], callback)', function () { }); it('promise writes a string to a file', function (done) { - fs.promises.writeFile('dir/foo', 'bar').then(function () { - assert.equal(String(fs.readFileSync('dir/foo')), 'bar'); - done(); - }, done); + fs.promises + .writeFile('dir/foo', 'bar') + .then(function () { + assert.equal(String(fs.readFileSync('dir/foo')), 'bar'); + done(); + }) + .catch(done); }); it('updates mtime of parent directory', function (done) { @@ -47,11 +50,14 @@ describe('fs.writeFile(filename, data, [options], callback)', function () { it('promise updates mtime of parent directory', function (done) { const oldTime = fs.statSync('dir').mtime; - fs.promises.writeFile('dir/foo', 'bar').then(function () { - const newTime = fs.statSync('dir').mtime; - assert.isTrue(newTime > oldTime); - done(); - }, done); + fs.promises + .writeFile('dir/foo', 'bar') + .then(function () { + const newTime = fs.statSync('dir').mtime; + assert.isTrue(newTime > oldTime); + done(); + }) + .catch(done); }); it('writes a buffer to a file', function (done) { @@ -65,10 +71,13 @@ describe('fs.writeFile(filename, data, [options], callback)', function () { }); it('promise writes a buffer to a file', function (done) { - fs.promises.writeFile('dir/foo', Buffer.from('bar')).then(function () { - assert.equal(String(fs.readFileSync('dir/foo')), 'bar'); - done(); - }, done); + fs.promises + .writeFile('dir/foo', Buffer.from('bar')) + .then(function () { + assert.equal(String(fs.readFileSync('dir/foo')), 'bar'); + done(); + }) + .catch(done); }); it('fails if directory does not exist', function (done) { From 40383c93655af701311368c3d7742ce67a698811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caleb=20=E3=83=84=20Everett?= Date: Wed, 25 Sep 2024 16:25:17 -0700 Subject: [PATCH 18/31] remove disabled tests for mock.fs mock.fs was removed in v4 --- test/lib/index.spec.js | 44 ------------------------------------------ 1 file changed, 44 deletions(-) diff --git a/test/lib/index.spec.js b/test/lib/index.spec.js index 65d2314..71ccd61 100644 --- a/test/lib/index.spec.js +++ b/test/lib/index.spec.js @@ -342,50 +342,6 @@ describe('The API', function () { }); }); }); - - xdescribe('mock.fs()', function () { - it('generates a mock fs module with a mock file system', function (done) { - const mockFs = mock.fs({ - 'path/to/file.txt': 'file content', - }); - - mockFs.exists('path/to/file.txt', function (exists) { - assert.isTrue(exists); - done(); - }); - }); - - it('passes options to the FileSystem constructor', function () { - const mockFs = mock.fs( - { - '/path/to/file.txt': 'file content', - }, - { - createCwd: false, - createTmp: false, - } - ); - - assert.isTrue(mockFs.existsSync('/path/to/file.txt')); - assert.deepEqual(mockFs.readdirSync('/'), ['path']); - }); - - it('accepts an arbitrary nesting of files and directories', function () { - const mockFs = mock.fs({ - 'dir-one': { - 'dir-two': { - 'some-file.txt': 'file content here', - }, - }, - 'empty-dir': {}, - }); - - assert.isTrue(mockFs.existsSync('dir-one/dir-two/some-file.txt')); - assert.isTrue(mockFs.statSync('dir-one/dir-two/some-file.txt').isFile()); - assert.isTrue(mockFs.statSync('dir-one/dir-two').isDirectory()); - assert.isTrue(mockFs.statSync('empty-dir').isDirectory()); - }); - }); }); describe('process.cwd()', function () { From eb08cfa1e571ba84dcdc98f0d79524fe9ad3927c Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 26 Sep 2024 11:06:35 -0600 Subject: [PATCH 19/31] Transitive dependency updates from audit fix --- package-lock.json | 130 ++++++++++++++++++++-------------------------- 1 file changed, 56 insertions(+), 74 deletions(-) diff --git a/package-lock.json b/package-lock.json index 95a4133..0e39522 100644 --- a/package-lock.json +++ b/package-lock.json @@ -923,12 +923,13 @@ } }, "node_modules/eslint-plugin-jsdoc/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dev": true, + "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -939,6 +940,13 @@ } } }, + "node_modules/eslint-plugin-jsdoc/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, "node_modules/eslint-plugin-prettier": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", @@ -1010,12 +1018,16 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, + "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint/node_modules/glob-parent": { @@ -1275,10 +1287,11 @@ } }, "node_modules/get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true, + "license": "MIT", "engines": { "node": "*" } @@ -1874,18 +1887,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -1896,12 +1897,13 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, + "license": "MIT", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -2456,13 +2458,11 @@ ] }, "node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -2815,12 +2815,6 @@ "node": ">=10" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -3580,13 +3574,19 @@ }, "dependencies": { "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dev": true, "requires": { - "ms": "2.1.2" + "ms": "^2.1.3" } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true } } }, @@ -3634,9 +3634,9 @@ } }, "eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true }, "espree": { @@ -3826,9 +3826,9 @@ "dev": true }, "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true }, "get-intrinsic": { @@ -4239,15 +4239,6 @@ "is-unicode-supported": "^0.1.0" } }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, "merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -4255,12 +4246,12 @@ "dev": true }, "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "requires": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" } }, @@ -4622,13 +4613,10 @@ "dev": true }, "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true }, "serialize-javascript": { "version": "6.0.0", @@ -4894,12 +4882,6 @@ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", From 928317904b1d84ca5ff667c17626aa72fd74f475 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 26 Sep 2024 11:07:02 -0600 Subject: [PATCH 20/31] Remove conditions for untested versions --- test/lib/fs.link-symlink.spec.js | 3 +- test/lib/fs.open-close.spec.js | 25 -------- test/lib/fs.rmdir.spec.js | 103 +++++++++++++++---------------- test/lib/readfilecontext.spec.js | 3 +- 4 files changed, 51 insertions(+), 83 deletions(-) diff --git a/test/lib/fs.link-symlink.spec.js b/test/lib/fs.link-symlink.spec.js index 53d6c4c..0a1cce8 100644 --- a/test/lib/fs.link-symlink.spec.js +++ b/test/lib/fs.link-symlink.spec.js @@ -5,7 +5,6 @@ const fs = require('fs'); const mock = require('../../lib/index.js'); const assert = helper.assert; -const inVersion = helper.inVersion; describe('fs.link(srcpath, dstpath, callback)', function () { beforeEach(function () { @@ -198,7 +197,7 @@ describe('fs.symlink(srcpath, dstpath, [type], callback)', function () { // https://github.com/nodejs/node/issues/34514 if (process.platform === 'win32') { - inVersion('>=15.0.0').it('supports Buffer input', function (done) { + it('supports Buffer input', function (done) { fs.symlink( Buffer.from('../file.txt'), Buffer.from('dir/link.txt'), diff --git a/test/lib/fs.open-close.spec.js b/test/lib/fs.open-close.spec.js index 8505cf2..6ee982e 100644 --- a/test/lib/fs.open-close.spec.js +++ b/test/lib/fs.open-close.spec.js @@ -5,7 +5,6 @@ const fs = require('fs'); const mock = require('../../lib/index.js'); const assert = helper.assert; -const inVersion = helper.inVersion; describe('fs.open(path, flags, [mode], callback)', function () { beforeEach(function () { @@ -220,30 +219,6 @@ describe('fs.close(fd, callback)', function () { }); }); }); - - inVersion('<14.0.0').it( - 'promise fails for closed file descriptors', - function (done) { - fs.promises - .open('dir/file.txt', 'w') - .then(function (fd) { - return fd.close().then(function () { - // in Nodejs v14+, closing on closed file descriptor is silently ignored. - return fd.close(); - }); - }) - .then( - function () { - done(new Error('should not succeed.')); - }, - function (err) { - assert.instanceOf(err, Error); - assert.equal(err.code, 'EBADF'); - done(); - } - ); - } - ); }); describe('fs.closeSync(fd)', function () { diff --git a/test/lib/fs.rmdir.spec.js b/test/lib/fs.rmdir.spec.js index 2eaf8c7..c882f23 100644 --- a/test/lib/fs.rmdir.spec.js +++ b/test/lib/fs.rmdir.spec.js @@ -5,7 +5,6 @@ const fs = require('fs'); const mock = require('../../lib/index.js'); const assert = helper.assert; -const inVersion = helper.inVersion; const testParentPerms = process.getuid && process.getgid; @@ -116,58 +115,56 @@ describe('fs.rmdir(path, callback)', function () { ); }); - inVersion('>=12.10').run(function () { - it('recursively remove empty directory', function (done) { - assert.equal(fs.statSync('path2/to').nlink, 4); + it('recursively remove empty directory', function (done) { + assert.equal(fs.statSync('path2/to').nlink, 4); - fs.rmdir('path2/to/empty', {recursive: true}, function (err) { - if (err) { - return done(err); - } + fs.rmdir('path2/to/empty', {recursive: true}, function (err) { + if (err) { + return done(err); + } + assert.isFalse(fs.existsSync('path2/to/empty')); + assert.equal(fs.statSync('path2/to').nlink, 3); + done(); + }); + }); + + it('promise recursively remove empty directory', function (done) { + assert.equal(fs.statSync('path2/to').nlink, 4); + + fs.promises + .rmdir('path2/to/empty', {recursive: true}) + .then(function () { assert.isFalse(fs.existsSync('path2/to/empty')); assert.equal(fs.statSync('path2/to').nlink, 3); done(); - }); - }); + }) + .catch(done); + }); - it('promise recursively remove empty directory', function (done) { - assert.equal(fs.statSync('path2/to').nlink, 4); + it('recursively remove non-empty directory', function (done) { + assert.equal(fs.statSync('path2/to').nlink, 4); - fs.promises - .rmdir('path2/to/empty', {recursive: true}) - .then(function () { - assert.isFalse(fs.existsSync('path2/to/empty')); - assert.equal(fs.statSync('path2/to').nlink, 3); - done(); - }) - .catch(done); + fs.rmdir('path2/to/non-empty', {recursive: true}, function (err) { + if (err) { + return done(err); + } + assert.isFalse(fs.existsSync('path2/to/non-empty')); + assert.equal(fs.statSync('path2/to').nlink, 3); + done(); }); + }); - it('recursively remove non-empty directory', function (done) { - assert.equal(fs.statSync('path2/to').nlink, 4); + it('promise recursively remove non-empty directory', function (done) { + assert.equal(fs.statSync('path2/to').nlink, 4); - fs.rmdir('path2/to/non-empty', {recursive: true}, function (err) { - if (err) { - return done(err); - } + fs.promises + .rmdir('path2/to/non-empty', {recursive: true}) + .then(function () { assert.isFalse(fs.existsSync('path2/to/non-empty')); assert.equal(fs.statSync('path2/to').nlink, 3); done(); - }); - }); - - it('promise recursively remove non-empty directory', function (done) { - assert.equal(fs.statSync('path2/to').nlink, 4); - - fs.promises - .rmdir('path2/to/non-empty', {recursive: true}) - .then(function () { - assert.isFalse(fs.existsSync('path2/to/non-empty')); - assert.equal(fs.statSync('path2/to').nlink, 3); - done(); - }) - .catch(done); - }); + }) + .catch(done); }); if (testParentPerms) { @@ -221,20 +218,18 @@ describe('fs.rmdirSync(path)', function () { }); }); - inVersion('>=12.10').run(function () { - it('recursively remove empty directory', function () { - assert.equal(fs.statSync('path2/to').nlink, 4); - fs.rmdirSync('path2/to/empty', {recursive: true}); - assert.isFalse(fs.existsSync('path2/to/empty')); - assert.equal(fs.statSync('path2/to').nlink, 3); - }); + it('recursively remove empty directory', function () { + assert.equal(fs.statSync('path2/to').nlink, 4); + fs.rmdirSync('path2/to/empty', {recursive: true}); + assert.isFalse(fs.existsSync('path2/to/empty')); + assert.equal(fs.statSync('path2/to').nlink, 3); + }); - it('recursively remove non-empty directory', function () { - assert.equal(fs.statSync('path2/to').nlink, 4); - fs.rmdirSync('path2/to/non-empty', {recursive: true}); - assert.isFalse(fs.existsSync('path2/to/non-empty')); - assert.equal(fs.statSync('path2/to').nlink, 3); - }); + it('recursively remove non-empty directory', function () { + assert.equal(fs.statSync('path2/to').nlink, 4); + fs.rmdirSync('path2/to/non-empty', {recursive: true}); + assert.isFalse(fs.existsSync('path2/to/non-empty')); + assert.equal(fs.statSync('path2/to').nlink, 3); }); if (testParentPerms) { diff --git a/test/lib/readfilecontext.spec.js b/test/lib/readfilecontext.spec.js index 11c7718..34efc22 100644 --- a/test/lib/readfilecontext.spec.js +++ b/test/lib/readfilecontext.spec.js @@ -10,7 +10,6 @@ const { } = require('../../lib/readfilecontext.js'); const assert = helper.assert; -const inVersion = helper.inVersion; describe('getReadFileContextPrototype', function () { it('provides access to the internal ReadFileContext', function () { @@ -122,7 +121,7 @@ describe('fs.readFile() with ReadFileContext', function () { }); afterEach(mock.restore); - inVersion('>=15.0.0').it('allows file reads to be aborted', function (done) { + it('allows file reads to be aborted', function (done) { const controller = new AbortController(); const {signal} = controller; From a9c484d847e28f933ba9fe57a51ecdc17816eccf Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 26 Sep 2024 11:17:34 -0600 Subject: [PATCH 21/31] Configure dependabot and bump setup-node action --- .github/dependabot.yml | 12 ++++++++++++ .github/workflows/test.yml | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..da5267a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +version: 2 +updates: +- package-ecosystem: npm + directory: "/" + schedule: + interval: weekly + open-pull-requests-limit: 10 + versioning-strategy: increase-if-necessary +- package-ecosystem: github-actions + directory: "/" + schedule: + interval: weekly diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 24e50c2..eaf7238 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,7 +34,7 @@ jobs: uses: actions/checkout@v2 - name: Set Node.js version - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} From 9c87858c9f4b5f9f66e36fde4e6f93b926aef345 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 26 Sep 2024 11:18:10 -0600 Subject: [PATCH 22/31] Test readFileSync with utf-8 --- test/lib/fs.readFile.spec.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/lib/fs.readFile.spec.js b/test/lib/fs.readFile.spec.js index 8fe2959..bb2b10d 100644 --- a/test/lib/fs.readFile.spec.js +++ b/test/lib/fs.readFile.spec.js @@ -95,6 +95,11 @@ describe('fs.readFileSync(filename, [options])', function () { }); afterEach(mock.restore); + it('works with utf-8', function () { + const content = fs.readFileSync('path/to/file.txt', 'utf-8').toString(); + assert.equal(content, 'file content'); + }); + it('allows a file to be read synchronously', function () { const data = fs.readFileSync('path/to/file.txt'); assert.isTrue(Buffer.isBuffer(data)); From 75a225c3051d309e1a3350f6e3ae8928f93fcac8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 17:20:05 +0000 Subject: [PATCH 23/31] chore(deps): bump actions/checkout from 2 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eaf7238..9962940 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,7 +31,7 @@ jobs: steps: - name: Clone repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set Node.js version uses: actions/setup-node@v4 From e759242e001d3aae59fc2455506591b3f35a7f10 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 17:20:13 +0000 Subject: [PATCH 24/31] chore(deps-dev): bump mocha from 9.2.2 to 10.7.3 Bumps [mocha](https://github.com/mochajs/mocha) from 9.2.2 to 10.7.3. - [Release notes](https://github.com/mochajs/mocha/releases) - [Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md) - [Commits](https://github.com/mochajs/mocha/compare/v9.2.2...v10.7.3) --- updated-dependencies: - dependency-name: mocha dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 368 +++++++++++++++++++--------------------------- package.json | 2 +- 2 files changed, 155 insertions(+), 215 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0e39522..f29939d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "chai": "^4.3.4", "eslint": "^8.21.0", "eslint-config-tschaub": "^14.1.2", - "mocha": "^9.2.2", + "mocha": "^10.7.3", "rimraf": "^3.0.2", "semver": "^7.3.5" }, @@ -125,12 +125,6 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, - "node_modules/@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, "node_modules/acorn": { "version": "8.8.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", @@ -169,9 +163,9 @@ } }, "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true, "engines": { "node": ">=6" @@ -480,12 +474,12 @@ } }, "node_modules/debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dev": true, "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -543,9 +537,9 @@ } }, "node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true, "engines": { "node": ">=0.3.1" @@ -922,31 +916,6 @@ "eslint": "^7.0.0 || ^8.0.0" } }, - "node_modules/eslint-plugin-jsdoc/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/eslint-plugin-jsdoc/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, "node_modules/eslint-plugin-prettier": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", @@ -1399,15 +1368,6 @@ "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", "dev": true }, - "node_modules/growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true, - "engines": { - "node": ">=4.x" - } - }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -1929,66 +1889,81 @@ "dev": true }, "node_modules/mocha": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", - "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", - "dev": true, - "dependencies": { - "@ungap/promise-all-settled": "1.1.2", - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.3", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "4.2.1", - "ms": "2.1.3", - "nanoid": "3.3.1", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "which": "2.0.2", - "workerpool": "6.2.0", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.3.tgz", + "integrity": "sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A==", + "dev": true, + "dependencies": { + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", + "chokidar": "^3.5.3", + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^8.1.0", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9", + "yargs-unparser": "^2.0.0" }, "bin": { "_mocha": "bin/_mocha", - "mocha": "bin/mocha" + "mocha": "bin/mocha.js" }, "engines": { - "node": ">= 12.0.0" + "node": ">= 14.0.0" + } + }, + "node_modules/mocha/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/mocha/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/mocha/node_modules/minimatch": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", - "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" }, "engines": { "node": ">=10" } }, - "node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, "node_modules/mocha/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -2005,23 +1980,11 @@ } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, - "node_modules/nanoid": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", - "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -2471,9 +2434,9 @@ } }, "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, "dependencies": { "randombytes": "^2.1.0" @@ -2778,9 +2741,9 @@ } }, "node_modules/workerpool": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", - "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", "dev": true }, "node_modules/wrap-ansi": { @@ -2834,9 +2797,9 @@ } }, "node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, "engines": { "node": ">=10" @@ -2954,12 +2917,6 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, - "@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, "acorn": { "version": "8.8.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", @@ -2986,9 +2943,9 @@ } }, "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true }, "ansi-regex": { @@ -3214,12 +3171,12 @@ } }, "debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dev": true, "requires": { - "ms": "2.1.2" + "ms": "^2.1.3" } }, "decamelize": { @@ -3254,9 +3211,9 @@ } }, "diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true }, "dir-glob": { @@ -3571,23 +3528,6 @@ "regextras": "^0.8.0", "semver": "^7.3.5", "spdx-expression-parse": "^3.0.1" - }, - "dependencies": { - "debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "dev": true, - "requires": { - "ms": "^2.1.3" - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - } } }, "eslint-plugin-prettier": { @@ -3904,12 +3844,6 @@ "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", "dev": true }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -4271,51 +4205,63 @@ "dev": true }, "mocha": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", - "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.3.tgz", + "integrity": "sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A==", "dev": true, "requires": { - "@ungap/promise-all-settled": "1.1.2", - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.3", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "4.2.1", - "ms": "2.1.3", - "nanoid": "3.3.1", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "which": "2.0.2", - "workerpool": "6.2.0", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "dependencies": { - "minimatch": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", - "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", + "chokidar": "^3.5.3", + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^8.1.0", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9", + "yargs-unparser": "^2.0.0" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "balanced-match": "^1.0.0" } }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true + "glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + }, + "minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } }, "supports-color": { "version": "8.1.1", @@ -4329,15 +4275,9 @@ } }, "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "nanoid": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", - "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, "natural-compare": { @@ -4619,9 +4559,9 @@ "dev": true }, "serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, "requires": { "randombytes": "^2.1.0" @@ -4854,9 +4794,9 @@ "dev": true }, "workerpool": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", - "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", "dev": true }, "wrap-ansi": { @@ -4898,9 +4838,9 @@ } }, "yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true }, "yargs-unparser": { diff --git a/package.json b/package.json index 5701573..59f65e6 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "chai": "^4.3.4", "eslint": "^8.21.0", "eslint-config-tschaub": "^14.1.2", - "mocha": "^9.2.2", + "mocha": "^10.7.3", "rimraf": "^3.0.2", "semver": "^7.3.5" }, From 81c39f3ef684a6bb25289955d70deaf22a586966 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 17:24:26 +0000 Subject: [PATCH 25/31] chore(deps-dev): bump rimraf from 3.0.2 to 6.0.1 Bumps [rimraf](https://github.com/isaacs/rimraf) from 3.0.2 to 6.0.1. - [Changelog](https://github.com/isaacs/rimraf/blob/main/CHANGELOG.md) - [Commits](https://github.com/isaacs/rimraf/compare/v3.0.2...v6.0.1) --- updated-dependencies: - dependency-name: rimraf dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 562 +++++++++++++++++++++++++++++++++++++++++++--- package.json | 2 +- 2 files changed, 532 insertions(+), 32 deletions(-) diff --git a/package-lock.json b/package-lock.json index f29939d..5d84deb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "eslint": "^8.21.0", "eslint-config-tschaub": "^14.1.2", "mocha": "^10.7.3", - "rimraf": "^3.0.2", + "rimraf": "^6.0.1", "semver": "^7.3.5" }, "engines": { @@ -84,6 +84,102 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -569,6 +665,12 @@ "node": ">=6.0.0" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -1181,12 +1283,65 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/flat-cache/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/flat-cache/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/flatted": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", "dev": true }, + "node_modules/foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -1296,20 +1451,23 @@ } }, "node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.0.tgz", + "integrity": "sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "foreground-child": "^3.1.0", + "jackspeak": "^4.0.1", + "minimatch": "^10.0.0", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" }, "engines": { - "node": "*" + "node": "20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -1327,6 +1485,30 @@ "node": ">= 6" } }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", + "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/globals": { "version": "13.17.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", @@ -1752,6 +1934,21 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, + "node_modules/jackspeak": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.0.2.tgz", + "integrity": "sha512-bZsjR/iRjl1Nk1UkjGpAzLNfQtzuijhn2g+pbZb98HQ1Gk8vM9hfbxeMBP+M2/UUdwj0RqGG3mlvk2MsAqwvEw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -1847,6 +2044,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lru-cache": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.1.tgz", + "integrity": "sha512-CgeuL5uom6j/ZVrg7G/+1IXqRY8JXX4Hghfy5YE0EhoYQWvndP1kufu58cmZLNIDKnRhZrXfdS9urVWx98AipQ==", + "dev": true, + "engines": { + "node": "20 || >=22" + } + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -1888,6 +2094,15 @@ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/mocha": { "version": "10.7.3", "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.3.tgz", @@ -2118,6 +2333,12 @@ "node": ">=4" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "dev": true + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -2142,7 +2363,7 @@ "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, "engines": { "node": ">=0.10.0" @@ -2163,6 +2384,22 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/path-scurry": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", + "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", + "dev": true, + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -2363,15 +2600,19 @@ } }, "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.0.1.tgz", + "integrity": "sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==", "dev": true, "dependencies": { - "glob": "^7.1.3" + "glob": "^11.0.0", + "package-json-from-dist": "^1.0.0" }, "bin": { - "rimraf": "bin.js" + "rimraf": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -2477,6 +2718,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -2522,6 +2775,21 @@ "node": ">=8" } }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/string.prototype.trimend": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", @@ -2562,6 +2830,19 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -2763,6 +3044,24 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -2885,6 +3184,71 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, + "@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "requires": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true + }, + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true + }, + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "requires": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + } + }, + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + }, + "wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "requires": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + } + } + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -3234,6 +3598,12 @@ "esutils": "^2.0.2" } }, + "eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -3708,6 +4078,31 @@ "requires": { "flatted": "^3.1.0", "rimraf": "^3.0.2" + }, + "dependencies": { + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } } }, "flatted": { @@ -3716,6 +4111,16 @@ "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", "dev": true }, + "foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -3793,17 +4198,37 @@ } }, "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.0.tgz", + "integrity": "sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==", "dev": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "foreground-child": "^3.1.0", + "jackspeak": "^4.0.1", + "minimatch": "^10.0.0", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "minimatch": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", + "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + } } }, "glob-parent": { @@ -4102,6 +4527,15 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, + "jackspeak": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.0.2.tgz", + "integrity": "sha512-bZsjR/iRjl1Nk1UkjGpAzLNfQtzuijhn2g+pbZb98HQ1Gk8vM9hfbxeMBP+M2/UUdwj0RqGG3mlvk2MsAqwvEw==", + "dev": true, + "requires": { + "@isaacs/cliui": "^8.0.2" + } + }, "js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -4173,6 +4607,12 @@ "is-unicode-supported": "^0.1.0" } }, + "lru-cache": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.1.tgz", + "integrity": "sha512-CgeuL5uom6j/ZVrg7G/+1IXqRY8JXX4Hghfy5YE0EhoYQWvndP1kufu58cmZLNIDKnRhZrXfdS9urVWx98AipQ==", + "dev": true + }, "merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -4204,6 +4644,12 @@ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, + "minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true + }, "mocha": { "version": "10.7.3", "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.3.tgz", @@ -4374,6 +4820,12 @@ "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", "dev": true }, + "package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "dev": true + }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -4392,7 +4844,7 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true }, "path-key": { @@ -4407,6 +4859,16 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "path-scurry": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", + "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", + "dev": true, + "requires": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + } + }, "path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -4529,12 +4991,13 @@ "dev": true }, "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.0.1.tgz", + "integrity": "sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==", "dev": true, "requires": { - "glob": "^7.1.3" + "glob": "^11.0.0", + "package-json-from-dist": "^1.0.0" } }, "run-parallel": { @@ -4593,6 +5056,12 @@ "object-inspect": "^1.9.0" } }, + "signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true + }, "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -4632,6 +5101,17 @@ "strip-ansi": "^6.0.0" } }, + "string-width-cjs": { + "version": "npm:string-width@4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, "string.prototype.trimend": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", @@ -4663,6 +5143,15 @@ "ansi-regex": "^5.0.1" } }, + "strip-ansi-cjs": { + "version": "npm:strip-ansi@6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -4810,6 +5299,17 @@ "strip-ansi": "^6.0.0" } }, + "wrap-ansi-cjs": { + "version": "npm:wrap-ansi@7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/package.json b/package.json index 59f65e6..65fae05 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "eslint": "^8.21.0", "eslint-config-tschaub": "^14.1.2", "mocha": "^10.7.3", - "rimraf": "^3.0.2", + "rimraf": "^6.0.1", "semver": "^7.3.5" }, "engines": { From 1c2f619e718dba5290e086c3e00f7d02e1b1d192 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 26 Sep 2024 11:35:21 -0600 Subject: [PATCH 26/31] Log changes --- changelog.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/changelog.md b/changelog.md index 88a90be..dfe5d14 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,25 @@ # Change Log +## 5.3.0 + + * Remove conditions for untested versions + * Remove disabled tests for mock.fs (thanks @everett1992, see [#391][#391]) + * Fix tests on node 20 (thanks @everett1992, see [#387][#387]) + * Fix timeout in failing test (thanks @everett1992, see [#390][#390]) + * Stop testing on Node 12 and 14 + +
+ Dependency Updates + + * chore(deps-dev): bump rimraf from 3.0.2 to 6.0.1 + * chore(deps): bump actions/checkout from 2 to 4 + * chore(deps-dev): bump mocha from 9.2.2 to 10.7.3 + * chore(deps-dev): bump braces from 3.0.2 to 3.0.3 + * chore(deps-dev): bump word-wrap from 1.2.3 to 1.2.4 + * chore(deps): bump json5 from 1.0.1 to 1.0.2 + +
+ ## 5.2.0 * Fix EACCES error on access by root user (thanks @danielkatz, see [#369][#369]) @@ -351,3 +371,6 @@ Detailed changes: [#363]: https://github.com/tschaub/mock-fs/pull/363 [#366]: https://github.com/tschaub/mock-fs/pull/366 [#369]: https://github.com/tschaub/mock-fs/pull/369 +[#387]: https://github.com/tschaub/mock-fs/pull/387 +[#390]: https://github.com/tschaub/mock-fs/pull/390 +[#391]: https://github.com/tschaub/mock-fs/pull/391 From f0666811d785f2d5f7c1be4aa0d51b32273947e6 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 26 Sep 2024 11:35:26 -0600 Subject: [PATCH 27/31] 5.3.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5d84deb..d18c7a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mock-fs", - "version": "5.2.0", + "version": "5.3.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "mock-fs", - "version": "5.2.0", + "version": "5.3.0", "license": "MIT", "devDependencies": { "chai": "^4.3.4", diff --git a/package.json b/package.json index 65fae05..e0eea9d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "mock-fs", "description": "A configurable mock file system. You know, for testing.", - "version": "5.2.0", + "version": "5.3.0", "main": "lib/index.js", "homepage": "https://github.com/tschaub/mock-fs", "author": { From eba46deb97bc99db641c20f8456883cd66367734 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 26 Sep 2024 11:40:38 -0600 Subject: [PATCH 28/31] Show build status for default branch --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 5e44c38..760a484 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -[![Build Status](https://github.com/tschaub/mock-fs/workflows/Test/badge.svg)](https://github.com/tschaub/mock-fs/actions?workflow=Test) +[![Build Status](https://github.com/tschaub/mock-fs/workflows/Test/badge.svg?branch=main)](https://github.com/tschaub/mock-fs/actions?workflow=Test) # `mock-fs` From f86545614e9938f919a963913d2ed16c8c61f0f6 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 26 Sep 2024 11:43:04 -0600 Subject: [PATCH 29/31] Updated badge URL --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 760a484..9ec8ea5 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -[![Build Status](https://github.com/tschaub/mock-fs/workflows/Test/badge.svg?branch=main)](https://github.com/tschaub/mock-fs/actions?workflow=Test) +[![Build Status](https://github.com/tschaub/mock-fs/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/tschaub/mock-fs/actions?workflow=Test) # `mock-fs` From 66cd52e0480ccad383733ea2681497a0e2ce24a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 01:02:17 +0000 Subject: [PATCH 30/31] chore(deps-dev): bump chai from 4.3.4 to 4.5.0 Bumps [chai](https://github.com/chaijs/chai) from 4.3.4 to 4.5.0. - [Release notes](https://github.com/chaijs/chai/releases) - [Changelog](https://github.com/chaijs/chai/blob/main/History.md) - [Commits](https://github.com/chaijs/chai/compare/v4.3.4...v4.5.0) --- updated-dependencies: - dependency-name: chai dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 94 ++++++++++++++++++++++++++++++----------------- 1 file changed, 60 insertions(+), 34 deletions(-) diff --git a/package-lock.json b/package-lock.json index d18c7a5..bb5e77a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -443,17 +443,18 @@ } }, "node_modules/chai": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz", - "integrity": "sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", "dev": true, "dependencies": { "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^3.0.1", - "get-func-name": "^2.0.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", "pathval": "^1.1.1", - "type-detect": "^4.0.5" + "type-detect": "^4.1.0" }, "engines": { "node": ">=4" @@ -476,10 +477,13 @@ } }, "node_modules/check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", "dev": true, + "dependencies": { + "get-func-name": "^2.0.2" + }, "engines": { "node": "*" } @@ -599,15 +603,15 @@ } }, "node_modules/deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", + "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", "dev": true, "dependencies": { "type-detect": "^4.0.0" }, "engines": { - "node": ">=0.12" + "node": ">=6" } }, "node_modules/deep-is": { @@ -2044,6 +2048,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/loupe": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.1" + } + }, "node_modules/lru-cache": { "version": "11.0.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.1.tgz", @@ -2931,9 +2944,9 @@ } }, "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", "dev": true, "engines": { "node": ">=4" @@ -3440,17 +3453,18 @@ "dev": true }, "chai": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz", - "integrity": "sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", "dev": true, "requires": { "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^3.0.1", - "get-func-name": "^2.0.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", "pathval": "^1.1.1", - "type-detect": "^4.0.5" + "type-detect": "^4.1.0" } }, "chalk": { @@ -3464,10 +3478,13 @@ } }, "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", - "dev": true + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "dev": true, + "requires": { + "get-func-name": "^2.0.2" + } }, "chokidar": { "version": "3.5.3", @@ -3550,9 +3567,9 @@ "dev": true }, "deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", + "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", "dev": true, "requires": { "type-detect": "^4.0.0" @@ -4607,6 +4624,15 @@ "is-unicode-supported": "^0.1.0" } }, + "loupe": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", + "dev": true, + "requires": { + "get-func-name": "^2.0.1" + } + }, "lru-cache": { "version": "11.0.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.1.tgz", @@ -5216,9 +5242,9 @@ } }, "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", "dev": true }, "type-fest": { From e1320efdadf79df2c9235a37845d0ab75895a695 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 01:02:23 +0000 Subject: [PATCH 31/31] chore(deps-dev): bump eslint from 8.21.0 to 8.57.1 Bumps [eslint](https://github.com/eslint/eslint) from 8.21.0 to 8.57.1. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.21.0...v8.57.1) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 673 +++++++++++++++++----------------------------- 1 file changed, 254 insertions(+), 419 deletions(-) diff --git a/package-lock.json b/package-lock.json index d18c7a5..74b87ca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,54 +34,95 @@ "node": "^12 || ^14 || ^16 || ^17" } }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", + "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", - "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.3.2", - "globals": "^13.15.0", + "espree": "^9.6.0", + "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", - "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "deprecated": "Use @eslint/config-array instead", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.4" + "@humanwhocodes/object-schema": "^2.0.3", + "debug": "^4.3.1", + "minimatch": "^3.0.5" }, "engines": { "node": ">=10.10.0" } }, - "node_modules/@humanwhocodes/gitignore-to-minimatch": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", - "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, + "engines": { + "node": ">=12.22" + }, "funding": { "type": "github", "url": "https://github.com/sponsors/nzakas" } }, "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", "dev": true }, "node_modules/@isaacs/cliui": { @@ -221,10 +262,16 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "node_modules/acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -329,15 +376,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/array.prototype.flat": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz", @@ -611,9 +649,9 @@ } }, "node_modules/deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, "node_modules/define-properties": { @@ -641,18 +679,6 @@ "node": ">=0.3.1" } }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -762,50 +788,49 @@ } }, "node_modules/eslint": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.21.0.tgz", - "integrity": "sha512-/XJ1+Qurf1T9G2M5IHrsjp+xrGT73RZf23xA1z5wB1ZzzEAWSZKvRwhWxTFp1rvkvCfwcvAUNAP31bhKTTGfDA==", - "dev": true, - "dependencies": { - "@eslint/eslintrc": "^1.3.0", - "@humanwhocodes/config-array": "^0.10.4", - "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", - "ajv": "^6.10.0", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.3", - "esquery": "^1.4.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^6.0.1", - "globals": "^13.15.0", - "globby": "^11.1.0", - "grapheme-splitter": "^1.0.4", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", "ignore": "^5.2.0", - "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", + "optionator": "^0.9.3", "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "text-table": "^0.2.0" }, "bin": { "eslint": "bin/eslint.js" @@ -1049,9 +1074,9 @@ } }, "node_modules/eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", @@ -1059,33 +1084,9 @@ }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" }, "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "engines": { - "node": ">=10" + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-visitor-keys": { @@ -1093,7 +1094,6 @@ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, - "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -1114,14 +1114,14 @@ } }, "node_modules/espree": { - "version": "9.3.3", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.3.tgz", - "integrity": "sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "dependencies": { - "acorn": "^8.8.0", + "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1131,9 +1131,9 @@ } }, "node_modules/esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, "dependencies": { "estraverse": "^5.1.0" @@ -1184,22 +1184,6 @@ "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", "dev": true }, - "node_modules/fast-glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", - "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -1209,13 +1193,13 @@ "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, "node_modules/fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dev": true, "dependencies": { "reusify": "^1.0.4" @@ -1386,12 +1370,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, "node_modules/functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", @@ -1510,9 +1488,9 @@ } }, "node_modules/globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -1524,30 +1502,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, "node_modules/has": { @@ -1629,9 +1587,9 @@ } }, "node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, "engines": { "node": ">= 4" @@ -1837,6 +1795,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-plain-obj": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", @@ -2053,29 +2020,6 @@ "node": "20 || >=22" } }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -2278,9 +2222,9 @@ } }, "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, "dependencies": { "deep-is": "^0.1.3", @@ -2288,7 +2232,7 @@ "levn": "^0.4.1", "prelude-ls": "^1.2.1", "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "word-wrap": "^1.2.5" }, "engines": { "node": ">= 0.8.0" @@ -2400,15 +2344,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/pathval": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", @@ -2467,9 +2402,9 @@ } }, "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, "engines": { "node": ">=6" @@ -2533,18 +2468,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, "node_modules/regextras": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/regextras/-/regextras-0.8.0.tgz", @@ -2730,15 +2653,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/spdx-exceptions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", @@ -2975,12 +2889,6 @@ "punycode": "^2.1.0" } }, - "node_modules/v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -3013,9 +2921,9 @@ } }, "node_modules/word-wrap": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", - "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, "engines": { "node": ">=0.10.0" @@ -3144,16 +3052,31 @@ "jsdoc-type-pratt-parser": "~2.2.5" } }, + "@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^3.3.0" + } + }, + "@eslint-community/regexpp": { + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", + "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", + "dev": true + }, "@eslint/eslintrc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", - "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.3.2", - "globals": "^13.15.0", + "espree": "^9.6.0", + "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -3161,27 +3084,33 @@ "strip-json-comments": "^3.1.1" } }, + "@eslint/js": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "dev": true + }, "@humanwhocodes/config-array": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", - "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", "dev": true, "requires": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.4" + "@humanwhocodes/object-schema": "^2.0.3", + "debug": "^4.3.1", + "minimatch": "^3.0.5" } }, - "@humanwhocodes/gitignore-to-minimatch": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", - "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", + "@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true }, "@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", "dev": true }, "@isaacs/cliui": { @@ -3281,10 +3210,16 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, + "@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "dev": true }, "acorn-jsx": { @@ -3356,12 +3291,6 @@ "is-string": "^1.0.7" } }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true - }, "array.prototype.flat": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz", @@ -3559,9 +3488,9 @@ } }, "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, "define-properties": { @@ -3580,15 +3509,6 @@ "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "requires": { - "path-type": "^4.0.0" - } - }, "doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -3674,50 +3594,49 @@ "dev": true }, "eslint": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.21.0.tgz", - "integrity": "sha512-/XJ1+Qurf1T9G2M5IHrsjp+xrGT73RZf23xA1z5wB1ZzzEAWSZKvRwhWxTFp1rvkvCfwcvAUNAP31bhKTTGfDA==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.3.0", - "@humanwhocodes/config-array": "^0.10.4", - "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", - "ajv": "^6.10.0", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.3", - "esquery": "^1.4.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^6.0.1", - "globals": "^13.15.0", - "globby": "^11.1.0", - "grapheme-splitter": "^1.0.4", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", "ignore": "^5.2.0", - "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", + "optionator": "^0.9.3", "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "text-table": "^0.2.0" }, "dependencies": { "glob-parent": { @@ -3917,32 +3836,15 @@ "requires": {} }, "eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, "requires": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" } }, - "eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^2.0.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true - } - } - }, "eslint-visitor-keys": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", @@ -3950,20 +3852,20 @@ "dev": true }, "espree": { - "version": "9.3.3", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.3.tgz", - "integrity": "sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "requires": { - "acorn": "^8.8.0", + "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.1" } }, "esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, "requires": { "estraverse": "^5.1.0" @@ -4002,19 +3904,6 @@ "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", "dev": true }, - "fast-glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", - "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - } - }, "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -4024,13 +3913,13 @@ "fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, "fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dev": true, "requires": { "reusify": "^1.0.4" @@ -4152,12 +4041,6 @@ "functions-have-names": "^1.2.2" } }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, "functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", @@ -4241,32 +4124,18 @@ } }, "globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "requires": { "type-fest": "^0.20.2" } }, - "globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "requires": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - } - }, - "grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, "has": { @@ -4321,9 +4190,9 @@ "dev": true }, "ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true }, "import-fresh": { @@ -4463,6 +4332,12 @@ "has-tostringtag": "^1.0.0" } }, + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true + }, "is-plain-obj": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", @@ -4613,22 +4488,6 @@ "integrity": "sha512-CgeuL5uom6j/ZVrg7G/+1IXqRY8JXX4Hghfy5YE0EhoYQWvndP1kufu58cmZLNIDKnRhZrXfdS9urVWx98AipQ==", "dev": true }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true - }, - "micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "requires": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - } - }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -4783,9 +4642,9 @@ } }, "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, "requires": { "deep-is": "^0.1.3", @@ -4793,7 +4652,7 @@ "levn": "^0.4.1", "prelude-ls": "^1.2.1", "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "word-wrap": "^1.2.5" } }, "p-limit": { @@ -4869,12 +4728,6 @@ "minipass": "^7.1.2" } }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - }, "pathval": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", @@ -4909,9 +4762,9 @@ } }, "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true }, "queue-microtask": { @@ -4949,12 +4802,6 @@ "functions-have-names": "^1.2.2" } }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true - }, "regextras": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/regextras/-/regextras-0.8.0.tgz", @@ -5062,12 +4909,6 @@ "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, "spdx-exceptions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", @@ -5248,12 +5089,6 @@ "punycode": "^2.1.0" } }, - "v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -5277,9 +5112,9 @@ } }, "word-wrap": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", - "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true }, "workerpool": {