diff --git a/.eslintrc b/.eslintrc index 255daa48..c2bd0e8b 100644 --- a/.eslintrc +++ b/.eslintrc @@ -194,8 +194,11 @@ { // Specific rules for test files files: [ "packages/**/test/**/*-test.js" ], + plugins: [ "eslint-plugin-promise" ], rules: { - "import/no-extraneous-dependencies": "off" + "import/no-extraneous-dependencies": "off", + "promise/prefer-await-to-then": 2, + "promise/prefer-await-to-callbacks": 2 } }, { diff --git a/package.json b/package.json index 8718f7c4..c47e3aec 100644 --- a/package.json +++ b/package.json @@ -14,21 +14,19 @@ "@types/request": "^2.48.13", "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", - "chai": "^4.0.0", + "@vitest/coverage-v8": "^4.1.10", "coveralls": "^3.0.9", "eslint": "^7.0.0", "eslint-plugin-import": "^2.22.0", + "eslint-plugin-promise": "^7.3.0", "lerna": "^4.0.0", "manual-git-changelog": "^1.0.1", - "mocha": "^8.0.0", "node-gyp": "^11.0.0", - "nyc": "^15.0.0", "pre-commit": "^1.1.3", "rdf-object": "^1.14.0", - "sinon": "^1.17.4", - "sinon-chai": "^2.14.0", "supertest": "^6.0.0", - "typescript": "^5.9.3" + "typescript": "^5.9.3", + "vitest": "^4.1.10" }, "pre-commit": [ "lint", @@ -37,12 +35,11 @@ "scripts": { "test-changed": "lerna run test --since HEAD", "lint-changed": "lerna run lint --since HEAD", - "mocha": "mocha \"packages/*/test/**/*-test.js\" --recursive --require ./test/test-setup --timeout 500", - "test": "nyc npm run mocha", - "test-ci": "nyc --reporter=lcov npm run mocha", + "test": "vitest run --coverage", + "test-ci": "vitest run --coverage", "typecheck": "tsc -p tsconfig.json --noEmit", "build": "tsc -p tsconfig.json", - "lint": "eslint packages/*/bin/* packages/*/lib packages/*/test --ext .js,.ts", + "lint": "eslint packages/*/bin/* packages/*/lib packages/*/test test --ext .js,.ts", "clean": "rm -rf ./node_modules && rm -rf ./packages/*/node_modules", "dedupe": "npx yarn-deduplicate yarn.lock --scopes", "publish": "lerna publish", diff --git a/packages/core/lib/CliRunner.ts b/packages/core/lib/CliRunner.ts index 54853281..6dfac5b6 100644 --- a/packages/core/lib/CliRunner.ts +++ b/packages/core/lib/CliRunner.ts @@ -16,9 +16,9 @@ import type { WorkerConfig } from './types'; type Writable = { write(chunk: string): void }; // Run function for starting the server from the command line -export function runCli(moduleRootPath: string): void { +export function runCli(moduleRootPath: string): Promise { let argv = process.argv.slice(2); - runCustom(argv, process.stdin, process.stdout, process.stderr, null, { mainModulePath: moduleRootPath }); + return runCustom(argv, process.stdin, process.stdout, process.stderr, null, { mainModulePath: moduleRootPath }); } // Generic run function for starting the server from a given config @@ -29,7 +29,7 @@ export function runCustom( stderr: Writable, componentConfigUri: string | null, properties: Record, -): void { +): Promise { if (args.length < 1 || args.length > 4 || /^--?h(elp)?$/.test(args[0])) { stdout.write('usage: server config.json [port [workers [componentConfigUri]]]\n'); return process.exit(1); @@ -39,7 +39,7 @@ export function runCustom( cliWorkers = parseInt(args[2], 10), configUri = args[3] || componentConfigUri || 'urn:ldf-server:my'; - ComponentsManager.build({ + return ComponentsManager.build({ ...properties, configLoader: (registry: ConfigRegistry) => registry.register(args[0]), } as IComponentsManagerBuilderOptions) diff --git a/packages/core/lib/UrlData.ts b/packages/core/lib/UrlData.ts index a6379dd1..80a20650 100644 --- a/packages/core/lib/UrlData.ts +++ b/packages/core/lib/UrlData.ts @@ -23,7 +23,7 @@ export class UrlData { options = options || {}; this.baseURL = (options.baseURL || '/').replace(/\/?$/, '/'); this.baseURLRoot = this.baseURL.match(/^(?:https?:\/\/[^\/]+)?/)![0]; - this.baseURLPath = this.baseURL.substr(this.baseURLRoot.length); + this.baseURLPath = this.baseURL.slice(this.baseURLRoot.length); this.blankNodePath = this.baseURLRoot ? '/.well-known/genid/' : ''; this.blankNodePrefix = this.blankNodePath ? this.baseURLRoot + this.blankNodePath : 'genid:'; this.blankNodePrefixLength = this.blankNodePrefix.length; diff --git a/packages/core/lib/datasources/Datasource.ts b/packages/core/lib/datasources/Datasource.ts index 115a6a3f..ccb4afc1 100644 --- a/packages/core/lib/datasources/Datasource.ts +++ b/packages/core/lib/datasources/Datasource.ts @@ -151,11 +151,11 @@ export class Datasource extends EventEmitter { // Translate blank nodes IRIs in the query to blank nodes let blankNodePrefix = this.urlData.blankNodePrefix, blankNodePrefixLength = this.urlData.blankNodePrefixLength; if (query.subject && query.subject.termType === 'NamedNode' && query.subject.value.indexOf(blankNodePrefix) === 0) - query.subject = this.dataFactory.blankNode(query.subject.value.substr(blankNodePrefixLength)); + query.subject = this.dataFactory.blankNode(query.subject.value.slice(blankNodePrefixLength)); if (query.object && query.object.termType === 'NamedNode' && query.object.value.indexOf(blankNodePrefix) === 0) - query.object = this.dataFactory.blankNode(query.object.value.substr(blankNodePrefixLength)); + query.object = this.dataFactory.blankNode(query.object.value.slice(blankNodePrefixLength)); if (query.graph && query.graph.termType === 'NamedNode' && query.graph.value.indexOf(blankNodePrefix) === 0) - query.graph = this.dataFactory.blankNode(query.graph.value.substr(blankNodePrefixLength)); + query.graph = this.dataFactory.blankNode(query.graph.value.slice(blankNodePrefixLength)); // Force the default graph if QPF support is disable if (!this._supportsQuads) @@ -214,7 +214,7 @@ export class Datasource extends EventEmitter { break; // Read a file from the local filesystem case 'file': - stream = fs.createReadStream(url.substr(protocolMatch[0].length), { encoding: 'utf8' }); + stream = fs.createReadStream(url.slice(protocolMatch[0].length), { encoding: 'utf8' }); break; default: stream = new EventEmitter(); diff --git a/packages/core/lib/routers/DatasourceRouter.ts b/packages/core/lib/routers/DatasourceRouter.ts index e05367f4..18393316 100644 --- a/packages/core/lib/routers/DatasourceRouter.ts +++ b/packages/core/lib/routers/DatasourceRouter.ts @@ -17,7 +17,7 @@ export class DatasourceRouter { extractQueryParams(request: RouterRequest, query: Query): void { (query.features || (query.features = {})).datasource = true; let path = request.url && request.url.pathname || '/'; - query.datasource = path.substr(this._baseLength); + query.datasource = path.slice(this._baseLength); } } diff --git a/packages/core/package.json b/packages/core/package.json index d440a720..9d635f05 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -24,9 +24,6 @@ "test": "nyc mocha", "lint": "eslint bin/* lib test" }, - "engines": { - "node": ">=10.0" - }, "dependencies": { "asynciterator": "^3.0.0", "componentsjs": "^4.0.4", diff --git a/packages/core/test/LinkedDataFragmentsServer-test.js b/packages/core/test/LinkedDataFragmentsServer-test.js index 886e7881..e6d26994 100644 --- a/packages/core/test/LinkedDataFragmentsServer-test.js +++ b/packages/core/test/LinkedDataFragmentsServer-test.js @@ -1,4 +1,6 @@ /*! @license MIT ©2013-2016 Ruben Verborgh, Ghent University - imec */ + +import { describe, it, expect, beforeAll, beforeEach, vi } from 'vitest'; let LinkedDataFragmentsServer = require('../lib/LinkedDataFragmentsServer').LinkedDataFragmentsServer; // changed to make tests pass, will be revised in follow up pr let request = require('supertest'); @@ -6,9 +8,9 @@ let request = require('supertest'); describe('LinkedDataFragmentsServer', () => { describe('A LinkedDataFragmentsServer instance with one controller', () => { let server, controller, client; - before(() => { + beforeAll(() => { controller = { - handleRequest: sinon.spy((request, response, next) => { + handleRequest: vi.fn((request, response, next) => { switch (request.url) { case '/handle': response.end('body contents'); @@ -22,7 +24,7 @@ describe('LinkedDataFragmentsServer', () => { }; server = new LinkedDataFragmentsServer({ controllers: [controller], - log: sinon.stub(), + log: vi.fn(), protocol: 'http', response: { headers: { @@ -34,73 +36,66 @@ describe('LinkedDataFragmentsServer', () => { client = request.agent(server); }); beforeEach(() => { - controller.handleRequest.reset(); + controller.handleRequest.mockClear(); }); - it('should send the configured headers', (done) => { - client.head('/').expect((response) => { - response.headers.should.have.property('access-control-allow-origin', '*'); - response.headers.should.have.property('my-header', 'value'); - }).end(done); + it('should send the configured headers', async () => { + let response = await client.head('/'); + expect(response.headers).toHaveProperty('access-control-allow-origin', '*'); + expect(response.headers).toHaveProperty('my-header', 'value'); }); - it('should not allow POST requests', (done) => { - client.post('/').expect((response) => { - controller.handleRequest.should.not.have.been.called; - response.should.have.property('statusCode', 405); - response.headers.should.have.property('content-type', 'text/plain;charset=utf-8'); - response.should.have.property('text', 'The HTTP method "POST" is not allowed; try "GET" instead.'); - }).end(done); + it('should not allow POST requests', async () => { + let response = await client.post('/'); + expect(controller.handleRequest).not.toHaveBeenCalled(); + expect(response).toHaveProperty('statusCode', 405); + expect(response.headers).toHaveProperty('content-type', 'text/plain;charset=utf-8'); + expect(response).toHaveProperty('text', 'The HTTP method "POST" is not allowed; try "GET" instead.'); }); - it('should send a body with GET requests', (done) => { - client.get('/handle').expect((response) => { - controller.handleRequest.should.have.been.calledOnce; - response.should.have.property('statusCode', 200); - response.should.have.property('text', 'body contents'); - }).end(done); + it('should send a body with GET requests', async () => { + let response = await client.get('/handle'); + expect(controller.handleRequest).toHaveBeenCalledOnce(); + expect(response).toHaveProperty('statusCode', 200); + expect(response).toHaveProperty('text', 'body contents'); }); - it('should not send a body with HEAD requests', (done) => { - client.head('/handle').expect((response) => { - controller.handleRequest.should.have.been.calledOnce; - response.should.have.property('statusCode', 200); - response.body.should.not.have.property('length'); - }).end(done); + it('should not send a body with HEAD requests', async () => { + let response = await client.head('/handle'); + expect(controller.handleRequest).toHaveBeenCalledOnce(); + expect(response).toHaveProperty('statusCode', 200); + expect(response.body).not.toHaveProperty('length'); }); - it('should not send a body with OPTIONS requests', (done) => { - client.options('/handle').expect((response) => { - controller.handleRequest.should.have.been.calledOnce; - response.should.have.property('statusCode', 200); - response.should.have.property('text', ''); - }).end(done); + it('should not send a body with OPTIONS requests', async () => { + let response = await client.options('/handle'); + expect(controller.handleRequest).toHaveBeenCalledOnce(); + expect(response).toHaveProperty('statusCode', 200); + expect(response).toHaveProperty('text', ''); }); - it('should error when the controller cannot handle the request', (done) => { - client.get('/unsupported').expect((response) => { - controller.handleRequest.should.have.been.calledOnce; - response.should.have.property('statusCode', 500); - response.headers.should.have.property('content-type', 'text/plain;charset=utf-8'); - response.should.have.property('text', 'Application error: No controller for /unsupported\n'); - }).end(done); + it('should error when the controller cannot handle the request', async () => { + let response = await client.get('/unsupported'); + expect(controller.handleRequest).toHaveBeenCalledOnce(); + expect(response).toHaveProperty('statusCode', 500); + expect(response.headers).toHaveProperty('content-type', 'text/plain;charset=utf-8'); + expect(response).toHaveProperty('text', 'Application error: No controller for /unsupported\n'); }); - it('should error when the controller errors', (done) => { - client.get('/error').expect((response) => { - controller.handleRequest.should.have.been.calledOnce; - response.should.have.property('statusCode', 500); - response.headers.should.have.property('content-type', 'text/plain;charset=utf-8'); - response.should.have.property('text', 'Application error: error message\n'); - }).end(done); + it('should error when the controller errors', async () => { + let response = await client.get('/error'); + expect(controller.handleRequest).toHaveBeenCalledOnce(); + expect(response).toHaveProperty('statusCode', 500); + expect(response.headers).toHaveProperty('content-type', 'text/plain;charset=utf-8'); + expect(response).toHaveProperty('text', 'Application error: error message\n'); }); }); describe('A LinkedDataFragmentsServer instance with two controllers', () => { let server, controllerA, controllerB, client; - before(() => { + beforeAll(() => { controllerA = { - handleRequest: sinon.spy((request, response, next) => { + handleRequest: vi.fn((request, response, next) => { switch (request.url) { case '/handleA': response.end('body contents A'); @@ -113,7 +108,7 @@ describe('LinkedDataFragmentsServer', () => { }), }; controllerB = { - handleRequest: sinon.spy((request, response, next) => { + handleRequest: vi.fn((request, response, next) => { switch (request.url) { case '/handleB': response.end('body contents B'); @@ -129,71 +124,65 @@ describe('LinkedDataFragmentsServer', () => { server = new LinkedDataFragmentsServer({ controllers: [controllerA, controllerB], protocol: 'http', - log: sinon.stub(), + log: vi.fn(), }); client = request.agent(server); }); beforeEach(() => { - controllerA.handleRequest.reset(); - controllerB.handleRequest.reset(); - }); - - it('should not allow POST requests', (done) => { - client.post('/').expect((response) => { - controllerA.handleRequest.should.not.have.been.called; - controllerB.handleRequest.should.not.have.been.called; - response.should.have.property('statusCode', 405); - response.headers.should.have.property('content-type', 'text/plain;charset=utf-8'); - response.should.have.property('text', 'The HTTP method "POST" is not allowed; try "GET" instead.'); - }).end(done); - }); - - it('should use the first controller when it can handle the request', (done) => { - client.get('/handleA').expect((response) => { - controllerA.handleRequest.should.have.been.calledOnce; - controllerB.handleRequest.should.not.have.been.called; - response.should.have.property('statusCode', 200); - response.should.have.property('text', 'body contents A'); - }).end(done); - }); - - it('should use the second controller when the first cannot handle the request', (done) => { - client.get('/handleB').expect((response) => { - controllerA.handleRequest.should.have.been.calledOnce; - controllerB.handleRequest.should.have.been.calledOnce; - response.should.have.property('statusCode', 200); - response.should.have.property('text', 'body contents B'); - }).end(done); - }); - - it('should error when neither controller can handle the request', (done) => { - client.get('/unsupported').expect((response) => { - controllerA.handleRequest.should.have.been.calledOnce; - controllerB.handleRequest.should.have.been.calledOnce; - response.should.have.property('statusCode', 500); - response.headers.should.have.property('content-type', 'text/plain;charset=utf-8'); - response.should.have.property('text', 'Application error: No controller for /unsupported\n'); - }).end(done); - }); - - it('should error when the first controller errors', (done) => { - client.get('/errorA').expect((response) => { - controllerA.handleRequest.should.have.been.calledOnce; - controllerB.handleRequest.should.not.have.been.called; - response.should.have.property('statusCode', 500); - response.headers.should.have.property('content-type', 'text/plain;charset=utf-8'); - response.should.have.property('text', 'Application error: error message A\n'); - }).end(done); - }); - - it('should error when the second controller errors', (done) => { - client.get('/errorB').expect((response) => { - controllerA.handleRequest.should.have.been.calledOnce; - controllerB.handleRequest.should.have.been.calledOnce; - response.should.have.property('statusCode', 500); - response.headers.should.have.property('content-type', 'text/plain;charset=utf-8'); - response.should.have.property('text', 'Application error: error message B\n'); - }).end(done); + controllerA.handleRequest.mockClear(); + controllerB.handleRequest.mockClear(); + }); + + it('should not allow POST requests', async () => { + let response = await client.post('/'); + expect(controllerA.handleRequest).not.toHaveBeenCalled(); + expect(controllerB.handleRequest).not.toHaveBeenCalled(); + expect(response).toHaveProperty('statusCode', 405); + expect(response.headers).toHaveProperty('content-type', 'text/plain;charset=utf-8'); + expect(response).toHaveProperty('text', 'The HTTP method "POST" is not allowed; try "GET" instead.'); + }); + + it('should use the first controller when it can handle the request', async () => { + let response = await client.get('/handleA'); + expect(controllerA.handleRequest).toHaveBeenCalledOnce(); + expect(controllerB.handleRequest).not.toHaveBeenCalled(); + expect(response).toHaveProperty('statusCode', 200); + expect(response).toHaveProperty('text', 'body contents A'); + }); + + it('should use the second controller when the first cannot handle the request', async () => { + let response = await client.get('/handleB'); + expect(controllerA.handleRequest).toHaveBeenCalledOnce(); + expect(controllerB.handleRequest).toHaveBeenCalledOnce(); + expect(response).toHaveProperty('statusCode', 200); + expect(response).toHaveProperty('text', 'body contents B'); + }); + + it('should error when neither controller can handle the request', async () => { + let response = await client.get('/unsupported'); + expect(controllerA.handleRequest).toHaveBeenCalledOnce(); + expect(controllerB.handleRequest).toHaveBeenCalledOnce(); + expect(response).toHaveProperty('statusCode', 500); + expect(response.headers).toHaveProperty('content-type', 'text/plain;charset=utf-8'); + expect(response).toHaveProperty('text', 'Application error: No controller for /unsupported\n'); + }); + + it('should error when the first controller errors', async () => { + let response = await client.get('/errorA'); + expect(controllerA.handleRequest).toHaveBeenCalledOnce(); + expect(controllerB.handleRequest).not.toHaveBeenCalled(); + expect(response).toHaveProperty('statusCode', 500); + expect(response.headers).toHaveProperty('content-type', 'text/plain;charset=utf-8'); + expect(response).toHaveProperty('text', 'Application error: error message A\n'); + }); + + it('should error when the second controller errors', async () => { + let response = await client.get('/errorB'); + expect(controllerA.handleRequest).toHaveBeenCalledOnce(); + expect(controllerB.handleRequest).toHaveBeenCalledOnce(); + expect(response).toHaveProperty('statusCode', 500); + expect(response.headers).toHaveProperty('content-type', 'text/plain;charset=utf-8'); + expect(response).toHaveProperty('text', 'Application error: error message B\n'); }); }); }); diff --git a/packages/core/test/controllers/AssetsController-test.js b/packages/core/test/controllers/AssetsController-test.js index b2032374..1f4f3e2d 100644 --- a/packages/core/test/controllers/AssetsController-test.js +++ b/packages/core/test/controllers/AssetsController-test.js @@ -1,72 +1,69 @@ /*! @license MIT ©2015-2016 Ruben Verborgh, Ghent University - imec */ + +import { describe, it, expect, beforeAll } from 'vitest'; +import { DummyServer } from '../../../../test/DummyServer'; let AssetsController = require('../../lib/controllers/AssetsController').AssetsController; // changed to make tests pass, will be revised in follow up pr let request = require('supertest'), - DummyServer = require('../../../../test/DummyServer'), fs = require('fs'), path = require('path'); describe('AssetsController', () => { describe('The AssetsController module', () => { it('should be a function', () => { - AssetsController.should.be.a('function'); + expect(typeof AssetsController).toBe('function'); }); it('should be an AssetsController constructor', () => { - new AssetsController().should.be.an.instanceof(AssetsController); + expect(new AssetsController()).toBeInstanceOf(AssetsController); }); }); describe('An AssetsController instance', () => { let controller, client; - before(() => { + beforeAll(() => { controller = new AssetsController(); - client = request.agent(new DummyServer(controller)); + client = request.agent(new DummyServer(controller), {}); }); - it('should correctly serve SVG assets', (done) => { - client.get('/assets/images/logo').expect((response) => { - let asset = fs.readFileSync(path.join(__dirname, '/../../assets/images/logo.svg'), 'utf8'); - controller.next.should.not.have.been.called; - response.should.have.property('statusCode', 200); - response.headers.should.have.property('content-type', 'image/svg+xml'); - response.headers.should.have.property('cache-control', 'public,max-age=1209600'); - response.body.toString().should.equal(asset); - }).end(done); + it('should correctly serve SVG assets', async () => { + let response = await client.get('/assets/images/logo'); + let asset = fs.readFileSync(path.join(__dirname, '/../../assets/images/logo.svg'), 'utf8'); + expect(controller.next).not.toHaveBeenCalled(); + expect(response).toHaveProperty('statusCode', 200); + expect(response.headers).toHaveProperty('content-type', 'image/svg+xml'); + expect(response.headers).toHaveProperty('cache-control', 'public,max-age=1209600'); + expect(response.body.toString()).toBe(asset); }); - it('should correctly serve CSS assets', (done) => { - client.get('/assets/styles/ldf-server').expect((response) => { - let asset = fs.readFileSync(path.join(__dirname, '/../../assets/styles/ldf-server.css'), 'utf8'); - controller.next.should.not.have.been.called; - response.should.have.property('statusCode', 200); - response.headers.should.have.property('content-type', 'text/css;charset=utf-8'); - response.headers.should.have.property('cache-control', 'public,max-age=1209600'); - response.should.have.property('text', asset); - }).end(done); + it('should correctly serve CSS assets', async () => { + let response = await client.get('/assets/styles/ldf-server'); + let asset = fs.readFileSync(path.join(__dirname, '/../../assets/styles/ldf-server.css'), 'utf8'); + expect(controller.next).not.toHaveBeenCalled(); + expect(response).toHaveProperty('statusCode', 200); + expect(response.headers).toHaveProperty('content-type', 'text/css;charset=utf-8'); + expect(response.headers).toHaveProperty('cache-control', 'public,max-age=1209600'); + expect(response).toHaveProperty('text', asset); }); - it('should correctly serve ICO assets', (done) => { - client.get('/favicon.ico').expect((response) => { - let asset = fs.readFileSync(path.join(__dirname, '/../../assets/favicon.ico'), 'utf8'); - controller.next.should.not.have.been.called; - response.should.have.property('statusCode', 200); - response.headers.should.have.property('content-type', 'image/vnd.microsoft.icon'); - response.headers.should.have.property('cache-control', 'public,max-age=1209600'); - response.body.toString().should.equal(asset); - }).end(done); + it('should correctly serve ICO assets', async () => { + let response = await client.get('/favicon.ico'); + let asset = fs.readFileSync(path.join(__dirname, '/../../assets/favicon.ico'), 'utf8'); + expect(controller.next).not.toHaveBeenCalled(); + expect(response).toHaveProperty('statusCode', 200); + expect(response.headers).toHaveProperty('content-type', 'image/vnd.microsoft.icon'); + expect(response.headers).toHaveProperty('cache-control', 'public,max-age=1209600'); + expect(response.body.toString()).toBe(asset); }); - it('should hand over to the next controller if no asset with that name is found', (done) => { - client.get('/assets/unknown').expect((response) => { - controller.next.should.have.been.calledOnce; - }).end(done); + it('should hand over to the next controller if no asset with that name is found', async () => { + await client.get('/assets/unknown'); + expect(controller.next).toHaveBeenCalledOnce(); }); - it('should hand over to the next controller for non-asset paths', (done) => { - client.get('/other').expect((response) => { - controller.next.should.have.been.calledOnce; - }).end(done); + it('should hand over to the next controller for non-asset paths', async () => { + await client.get('/other'); + expect(controller.next).toHaveBeenCalledOnce(); }); }); }); diff --git a/packages/core/test/controllers/Controller-test.js b/packages/core/test/controllers/Controller-test.js index 941dabe9..491d70ac 100644 --- a/packages/core/test/controllers/Controller-test.js +++ b/packages/core/test/controllers/Controller-test.js @@ -1,49 +1,49 @@ /*! @license MIT ©2015-2016 Ruben Verborgh, Ghent University - imec */ + +import { describe, it, expect, beforeAll, vi } from 'vitest'; +import { DummyServer } from '../../../../test/DummyServer'; // changed to make tests pass, will be revised in follow up pr let Controller = require('../../lib/controllers/Controller').Controller, UrlData = require('../../lib/UrlData').UrlData; let http = require('http'), - request = require('supertest'), - DummyServer = require('../../../../test/DummyServer'); + request = require('supertest'); describe('Controller', () => { describe('The Controller module', () => { it('should be a function', () => { - Controller.should.be.a('function'); + expect(typeof Controller).toBe('function'); }); it('should be a Controller constructor', () => { - new Controller().should.be.an.instanceof(Controller); + expect(new Controller()).toBeInstanceOf(Controller); }); }); describe('A Controller instance without baseURL', () => { let controller, client; - before(() => { + beforeAll(() => { controller = new Controller(); - sinon.spy(controller, '_handleRequest'); - client = request.agent(new DummyServer(controller)); + vi.spyOn(controller, '_handleRequest'); + client = request.agent(new DummyServer(controller), {}); }); describe('receiving a request', () => { - before((done) => { - client.get('/path?a=b').end(done); - }); + beforeAll(() => client.get('/path?a=b')); it('should call _handleRequest with request, response and next', () => { - controller._handleRequest.should.have.been.calledOnce; - let args = controller._handleRequest.getCall(0).args; - args[0].should.have.property('url'); - args[1].should.be.an.instanceof(http.ServerResponse); - args[2].should.be.an.instanceof(Function); + expect(controller._handleRequest).toHaveBeenCalledOnce(); + let args = controller._handleRequest.mock.calls[0]; + expect(args[0]).toHaveProperty('url'); + expect(args[1]).toBeInstanceOf(http.ServerResponse); + expect(args[2]).toBeInstanceOf(Function); }); it('should extend _handleRequest with the original URL as parsedUrl property', () => { - controller._handleRequest.should.have.been.calledOnce; - let request = controller._handleRequest.getCall(0).args[0]; - request.should.have.property('parsedUrl'); - request.parsedUrl.should.deep.equal({ + expect(controller._handleRequest).toHaveBeenCalledOnce(); + let request = controller._handleRequest.mock.calls[0][0]; + expect(request).toHaveProperty('parsedUrl'); + expect(request.parsedUrl).toEqual({ protocol: 'http:', host: request.headers.host, hostname: undefined, port: undefined, path: '/path?a=b', pathname: '/path', href: undefined, auth: undefined, query: { a: 'b' }, search: undefined, hash: undefined, slashes: undefined, @@ -51,42 +51,39 @@ describe('Controller', () => { }); it('should hand over to the next controller', () => { - controller.next.should.have.been.calledOnce; + expect(controller.next).toHaveBeenCalledOnce(); }); }); }); describe('A Controller instance without baseURL using Forwarded header', () => { let controller, client; - before(() => { + beforeAll(() => { controller = new Controller({ urlData: new UrlData({ baseURL: 'http://example.org:1234/base?c=d#f' }) }); - sinon.spy(controller, '_handleRequest'); - client = request.agent(new DummyServer(controller)); + vi.spyOn(controller, '_handleRequest'); + client = request.agent(new DummyServer(controller), {}); }); describe('receiving a request', () => { - before((done) => { - client - .get('/path?a=b') - .set('X-Forwarded-Host', 'foo:5000') - // NOTE: the priority will go to the Forwarded header over the X-Forwarded-Host header - .set('Forwarded', 'proto=https;host="bar:8000"') - .end(done); - }); + beforeAll(() => client + .get('/path?a=b') + .set('X-Forwarded-Host', 'foo:5000') + // NOTE: the priority will go to the Forwarded header over the X-Forwarded-Host header + .set('Forwarded', 'proto=https;host="bar:8000"')); it('should call _handleRequest with request, response and next', () => { - controller._handleRequest.should.have.been.calledOnce; - let args = controller._handleRequest.getCall(0).args; - args[0].should.have.property('url'); - args[1].should.be.an.instanceof(http.ServerResponse); - args[2].should.be.an.instanceof(Function); + expect(controller._handleRequest).toHaveBeenCalledOnce(); + let args = controller._handleRequest.mock.calls[0]; + expect(args[0]).toHaveProperty('url'); + expect(args[1]).toBeInstanceOf(http.ServerResponse); + expect(args[2]).toBeInstanceOf(Function); }); it('should extend _handleRequest with the original URL as parsedUrl property', () => { - controller._handleRequest.should.have.been.calledOnce; - let request = controller._handleRequest.getCall(0).args[0]; - request.should.have.property('parsedUrl'); - request.parsedUrl.should.deep.equal({ + expect(controller._handleRequest).toHaveBeenCalledOnce(); + let request = controller._handleRequest.mock.calls[0][0]; + expect(request).toHaveProperty('parsedUrl'); + expect(request.parsedUrl).toEqual({ protocol: 'https:', host: 'bar:8000', hostname: 'example.org', port: '1234', path: '/path?a=b', pathname: '/path', href: undefined, auth: undefined, query: { a: 'b' }, search: undefined, hash: undefined, slashes: true, @@ -94,41 +91,38 @@ describe('Controller', () => { }); it('should hand over to the next controller', () => { - controller.next.should.have.been.calledOnce; + expect(controller.next).toHaveBeenCalledOnce(); }); }); }); describe('A Controller instance without baseURL using X-Forwarded-* headers', () => { let controller, client; - before(() => { + beforeAll(() => { controller = new Controller(); - sinon.spy(controller, '_handleRequest'); - client = request.agent(new DummyServer(controller)); + vi.spyOn(controller, '_handleRequest'); + client = request.agent(new DummyServer(controller), {}); }); describe('receiving a request', () => { - before((done) => { - client - .get('/path?a=b') - .set('X-Forwarded-Host', 'foo:5000') - .set('X-Forwarded-Proto', 'https') - .end(done); - }); + beforeAll(() => client + .get('/path?a=b') + .set('X-Forwarded-Host', 'foo:5000') + .set('X-Forwarded-Proto', 'https')); it('should call _handleRequest with request, response and next', () => { - controller._handleRequest.should.have.been.calledOnce; - let args = controller._handleRequest.getCall(0).args; - args[0].should.have.property('url'); - args[1].should.be.an.instanceof(http.ServerResponse); - args[2].should.be.an.instanceof(Function); + expect(controller._handleRequest).toHaveBeenCalledOnce(); + let args = controller._handleRequest.mock.calls[0]; + expect(args[0]).toHaveProperty('url'); + expect(args[1]).toBeInstanceOf(http.ServerResponse); + expect(args[2]).toBeInstanceOf(Function); }); it('should extend _handleRequest with the original URL as parsedUrl property', () => { - controller._handleRequest.should.have.been.calledOnce; - let request = controller._handleRequest.getCall(0).args[0]; - request.should.have.property('parsedUrl'); - request.parsedUrl.should.deep.equal({ + expect(controller._handleRequest).toHaveBeenCalledOnce(); + let request = controller._handleRequest.mock.calls[0][0]; + expect(request).toHaveProperty('parsedUrl'); + expect(request.parsedUrl).toEqual({ protocol: 'https:', host: 'foo:5000', hostname: undefined, port: undefined, path: '/path?a=b', pathname: '/path', href: undefined, auth: undefined, query: { a: 'b' }, search: undefined, hash: undefined, slashes: undefined, @@ -136,37 +130,35 @@ describe('Controller', () => { }); it('should hand over to the next controller', () => { - controller.next.should.have.been.calledOnce; + expect(controller.next).toHaveBeenCalledOnce(); }); }); }); describe('A Controller instance with baseURL', () => { let controller, client; - before(() => { + beforeAll(() => { controller = new Controller({ urlData: new UrlData({ baseURL: 'http://example.org:1234/base?c=d#f' }) }); - sinon.spy(controller, '_handleRequest'); - client = request.agent(new DummyServer(controller)); + vi.spyOn(controller, '_handleRequest'); + client = request.agent(new DummyServer(controller), {}); }); describe('receiving a request', () => { - before((done) => { - client.get('/path?a=b').end(done); - }); + beforeAll(() => client.get('/path?a=b')); it('should call _handleRequest with request, response and next', () => { - controller._handleRequest.should.have.been.calledOnce; - let args = controller._handleRequest.getCall(0).args; - args[0].should.have.property('url'); - args[1].should.be.an.instanceof(http.ServerResponse); - args[2].should.be.an.instanceof(Function); + expect(controller._handleRequest).toHaveBeenCalledOnce(); + let args = controller._handleRequest.mock.calls[0]; + expect(args[0]).toHaveProperty('url'); + expect(args[1]).toBeInstanceOf(http.ServerResponse); + expect(args[2]).toBeInstanceOf(Function); }); it('should extend _handleRequest with the rebased URL as parsedUrl property', () => { - controller._handleRequest.should.have.been.calledOnce; - let request = controller._handleRequest.getCall(0).args[0]; - request.should.have.property('parsedUrl'); - request.parsedUrl.should.deep.equal({ + expect(controller._handleRequest).toHaveBeenCalledOnce(); + let request = controller._handleRequest.mock.calls[0][0]; + expect(request).toHaveProperty('parsedUrl'); + expect(request.parsedUrl).toEqual({ protocol: 'http:', host: 'example.org:1234', hostname: 'example.org', port: '1234', path: '/path?a=b', pathname: '/path', href: undefined, auth: undefined, query: { a: 'b' }, search: undefined, hash: undefined, slashes: true, @@ -174,7 +166,7 @@ describe('Controller', () => { }); it('should hand over to the next controller', () => { - controller.next.should.have.been.calledOnce; + expect(controller.next).toHaveBeenCalledOnce(); }); }); }); diff --git a/packages/core/test/controllers/DereferenceController-test.js b/packages/core/test/controllers/DereferenceController-test.js index 43eae744..da3032ad 100644 --- a/packages/core/test/controllers/DereferenceController-test.js +++ b/packages/core/test/controllers/DereferenceController-test.js @@ -1,44 +1,43 @@ /*! @license MIT ©2015-2016 Ruben Verborgh, Ghent University - imec */ + +import { describe, it, expect, beforeAll } from 'vitest'; +import { DummyServer } from '../../../../test/DummyServer'; let DereferenceController = require('../../lib/controllers/DereferenceController').DeferenceController; // changed to make tests pass, will be revised in follow up pr -let request = require('supertest'), - DummyServer = require('../../../../test/DummyServer'); +let request = require('supertest'); describe('DereferenceController', () => { describe('The DereferenceController module', () => { it('should be a function', () => { - DereferenceController.should.be.a('function'); + expect(typeof DereferenceController).toBe('function'); }); it('should be a DereferenceController constructor', () => { - new DereferenceController().should.be.an.instanceof(DereferenceController); + expect(new DereferenceController()).toBeInstanceOf(DereferenceController); }); }); describe('A DereferenceController instance', () => { let controller, client; - before(() => { + beforeAll(() => { controller = new DereferenceController({ dereference: { '/resource/': { path: 'dbpedia/2014' } } }); - client = request.agent(new DummyServer(controller)); + client = request.agent(new DummyServer(controller), {}); }); describe('receiving a request for a dereferenced URL', () => { let response; - before((done) => { - client.get('/resource/Mickey_Mouse') - .end((error, res) => { response = res; done(error); }); - }); + beforeAll(async () => { response = await client.get('/resource/Mickey_Mouse'); }); it('should not hand over to the next controller', () => { - controller.next.should.not.have.been.called; + expect(controller.next).not.toHaveBeenCalled(); }); it('should set the status code to 303', () => { - response.should.have.property('statusCode', 303); + expect(response).toHaveProperty('statusCode', 303); }); it('should set the text/plain content type', () => { - response.headers.should.have.property('content-type', 'text/plain;charset=utf-8'); + expect(response.headers).toHaveProperty('content-type', 'text/plain;charset=utf-8'); }); it('should set the Location header correctly', () => { @@ -46,7 +45,7 @@ describe('DereferenceController', () => { entityUrl = encodeURIComponent('http://' + hostname + '/resource/Mickey_Mouse'), expectedLocation = 'http://' + hostname + '/dbpedia/2014?subject=' + entityUrl; - response.headers.should.have.property('location', expectedLocation); + expect(response.headers).toHaveProperty('location', expectedLocation); }); it('should mention the desired location in the body', () => { @@ -54,17 +53,15 @@ describe('DereferenceController', () => { entityUrl = encodeURIComponent('http://' + hostname + '/resource/Mickey_Mouse'), expectedLocation = 'http://' + hostname + '/dbpedia/2014?subject=' + entityUrl; - response.text.should.contain(expectedLocation); + expect(response.text).toContain(expectedLocation); }); }); describe('receiving a request for a non-defererenced URL', () => { - before((done) => { - client.get('/otherresource/Mickey_Mouse').end(done); - }); + beforeAll(() => client.get('/otherresource/Mickey_Mouse')); it('should hand over to the next controller', () => { - controller.next.should.have.been.calledOnce; + expect(controller.next).toHaveBeenCalledOnce(); }); }); }); diff --git a/packages/core/test/controllers/NotFoundController-test.js b/packages/core/test/controllers/NotFoundController-test.js index a98dc50e..de32100b 100644 --- a/packages/core/test/controllers/NotFoundController-test.js +++ b/packages/core/test/controllers/NotFoundController-test.js @@ -1,261 +1,256 @@ /*! @license MIT ©2015-2016 Ruben Verborgh, Ghent University - imec */ -let NotFoundController = require('../../lib/controllers/NotFoundController').NotFoundController; // changed to make tests pass, will be revised in follow up pr + +import { describe, it, expect, beforeAll, vi } from 'vitest'; +import { DummyServer } from '../../../../test/DummyServer'; +let NotFoundController = require('../../lib/controllers/NotFoundController').NotFoundController; let request = require('supertest'), - DummyServer = require('../../../../test/DummyServer'), dataFactory = require('n3').DataFactory; -// changed to make tests pass, will be revised in follow up pr -let NotFoundHtmlView = require('../../lib/views/notfound/NotFoundHtmlView.js').NotFoundHtmlView, - NotFoundRdfView = require('../../lib/views/notfound/NotFoundRdfView.js').NotFoundRdfView; +let NotFoundHtmlView = require('../../lib/views/notfound/NotFoundHtmlView').NotFoundHtmlView, + NotFoundRdfView = require('../../lib/views/notfound/NotFoundRdfView').NotFoundRdfView; describe('NotFoundController', () => { describe('The NotFoundController module', () => { it('should be a function', () => { - NotFoundController.should.be.a('function'); + expect(typeof NotFoundController).toBe('function'); }); it('should be a NotFoundController constructor', () => { - new NotFoundController().should.be.an.instanceof(NotFoundController); + expect(new NotFoundController()).toBeInstanceOf(NotFoundController); }); }); describe('A NotFoundController instance without views', () => { let controller, client; - before(() => { + beforeAll(() => { controller = new NotFoundController(); - client = request.agent(new DummyServer(controller)); + client = request.agent(new DummyServer(controller), {}); }); describe('receiving a request', () => { let response; - before((done) => { - client.get('/notfound') - .end((error, res) => { response = res; done(error); }); + beforeAll(async () => { + response = await client.get('/notfound'); }); it('should not hand over to the next controller', () => { - controller.next.should.not.have.been.called; + expect(controller.next).not.toHaveBeenCalled(); }); it('should have a 404 status', () => { - response.should.have.property('statusCode', 404); + expect(response).toHaveProperty('statusCode', 404); }); it('should set the text/plain content type', () => { - response.headers.should.have.property('content-type', 'text/plain;charset=utf-8'); + expect(response.headers).toHaveProperty('content-type', 'text/plain;charset=utf-8'); }); it('should indicate Accept in the Vary header', () => { - response.headers.should.have.property('vary', 'Accept'); + expect(response.headers).toHaveProperty('vary', 'Accept'); }); it('should send a textual error body', () => { - response.should.have.property('text', '/notfound not found\n'); + expect(response).toHaveProperty('text', '/notfound not found\n'); }); }); }); describe('A NotFoundController instance with HTML and RDF views', () => { let controller, htmlView, rdfView, datasources, client; - before(() => { + beforeAll(() => { htmlView = new NotFoundHtmlView({ dataFactory }); rdfView = new NotFoundRdfView({ dataFactory }); - sinon.spy(htmlView, 'render'); - sinon.spy(rdfView, 'render'); + vi.spyOn(htmlView, 'render'); + vi.spyOn(rdfView, 'render'); datasources = { a: { title: 'foo', url: 'http://example.org/foo#dataset' } }; controller = new NotFoundController({ views: [htmlView, rdfView], datasources: datasources }); - client = request.agent(new DummyServer(controller)); + client = request.agent(new DummyServer(controller), {}); }); function resetAll() { - htmlView.render.reset(); - rdfView.render.reset(); + htmlView.render.mockClear(); + rdfView.render.mockClear(); } describe('receiving a request without Accept header', () => { let response; - before((done) => { + beforeAll(async () => { resetAll(); - client.get('/notfound') - .end((error, res) => { response = res; done(error); }); + response = await client.get('/notfound'); }); it('should not hand over to the next controller', () => { - controller.next.should.not.have.been.called; + expect(controller.next).not.toHaveBeenCalled(); }); it('should call the HTML view', () => { - htmlView.render.should.have.been.calledOnce; + expect(htmlView.render).toHaveBeenCalledOnce(); }); it('should not call the RDF view', () => { - rdfView.render.should.not.have.been.called; + expect(rdfView.render).not.toHaveBeenCalled(); }); it('should have a 404 status', () => { - response.should.have.property('statusCode', 404); + expect(response).toHaveProperty('statusCode', 404); }); it('should set the text/html content type', () => { - response.headers.should.have.property('content-type', 'text/html;charset=utf-8'); + expect(response.headers).toHaveProperty('content-type', 'text/html;charset=utf-8'); }); it('should indicate Accept in the Vary header', () => { - response.headers.should.have.property('vary', 'Accept'); + expect(response.headers).toHaveProperty('vary', 'Accept'); }); it('should send an HTML error body', () => { - response.text.should.contain('No resource with URL /notfound was found.'); + expect(response.text).toContain('No resource with URL /notfound was found.'); }); }); describe('receiving a request with an Accept header of */*', () => { let response; - before((done) => { + beforeAll(async () => { resetAll(); - client.get('/notfound').set('Accept', '*/*') - .end((error, res) => { response = res; done(error); }); + response = await client.get('/notfound').set('Accept', '*/*'); }); it('should not hand over to the next controller', () => { - controller.next.should.not.have.been.called; + expect(controller.next).not.toHaveBeenCalled(); }); it('should call the HTML view', () => { - htmlView.render.should.have.been.calledOnce; + expect(htmlView.render).toHaveBeenCalledOnce(); }); it('should not call the RDF view', () => { - rdfView.render.should.not.have.been.called; + expect(rdfView.render).not.toHaveBeenCalled(); }); it('should have a 404 status', () => { - response.should.have.property('statusCode', 404); + expect(response).toHaveProperty('statusCode', 404); }); it('should set the text/html content type', () => { - response.headers.should.have.property('content-type', 'text/html;charset=utf-8'); + expect(response.headers).toHaveProperty('content-type', 'text/html;charset=utf-8'); }); it('should indicate Accept in the Vary header', () => { - response.headers.should.have.property('vary', 'Accept'); + expect(response.headers).toHaveProperty('vary', 'Accept'); }); it('should send an HTML error body', () => { - response.text.should.contain('No resource with URL /notfound was found.'); + expect(response.text).toContain('No resource with URL /notfound was found.'); }); }); describe('receiving a request with an Accept header of text/html', () => { let response; - before((done) => { + beforeAll(async () => { resetAll(); - client.get('/notfound').set('Accept', 'text/html') - .end((error, res) => { response = res; done(error); }); + response = await client.get('/notfound').set('Accept', 'text/html'); }); it('should not hand over to the next controller', () => { - controller.next.should.not.have.been.called; + expect(controller.next).not.toHaveBeenCalled(); }); it('should call the HTML view', () => { - htmlView.render.should.have.been.calledOnce; + expect(htmlView.render).toHaveBeenCalledOnce(); }); it('should not call the RDF view', () => { - rdfView.render.should.not.have.been.called; + expect(rdfView.render).not.toHaveBeenCalled(); }); it('should have a 404 status', () => { - response.should.have.property('statusCode', 404); + expect(response).toHaveProperty('statusCode', 404); }); it('should set the text/html content type', () => { - response.headers.should.have.property('content-type', 'text/html;charset=utf-8'); + expect(response.headers).toHaveProperty('content-type', 'text/html;charset=utf-8'); }); it('should indicate Accept in the Vary header', () => { - response.headers.should.have.property('vary', 'Accept'); + expect(response.headers).toHaveProperty('vary', 'Accept'); }); it('should send an HTML error body', () => { - response.text.should.contain('No resource with URL /notfound was found.'); + expect(response.text).toContain('No resource with URL /notfound was found.'); }); }); describe('receiving a request with an Accept header of text/turtle', () => { let response; - before((done) => { + beforeAll(async () => { resetAll(); - client.get('/notfound').set('Accept', 'text/turtle') - .end((error, res) => { response = res; done(error); }); + response = await client.get('/notfound').set('Accept', 'text/turtle'); }); it('should not hand over to the next controller', () => { - controller.next.should.not.have.been.called; + expect(controller.next).not.toHaveBeenCalled(); }); it('should call the RDF view', () => { - rdfView.render.should.have.been.calledOnce; + expect(rdfView.render).toHaveBeenCalledOnce(); }); it('should not call the HTML view', () => { - htmlView.render.should.not.have.been.called; + expect(htmlView.render).not.toHaveBeenCalled(); }); it('should have a 404 status', () => { - response.should.have.property('statusCode', 404); + expect(response).toHaveProperty('statusCode', 404); }); it('should set the text/turtle content type', () => { - response.headers.should.have.property('content-type', 'text/turtle;charset=utf-8'); + expect(response.headers).toHaveProperty('content-type', 'text/turtle;charset=utf-8'); }); it('should indicate Accept in the Vary header', () => { - response.headers.should.have.property('vary', 'Accept'); + expect(response.headers).toHaveProperty('vary', 'Accept'); }); it('should send a Turtle error body', () => { - response.text.should.contain(' a '); - response.text.should.not.contain('<#metadata> <>.'); + expect(response.text).toContain(' a '); + expect(response.text).not.toContain('<#metadata> <>.'); }); }); describe('receiving a request with an Accept header of application/trig', () => { let response; - before((done) => { + beforeAll(async () => { resetAll(); - client.get('/notfound').set('Accept', 'application/trig') - .end((error, res) => { response = res; done(error); }); + response = await client.get('/notfound').set('Accept', 'application/trig'); }); it('should not hand over to the next controller', () => { - controller.next.should.not.have.been.called; + expect(controller.next).not.toHaveBeenCalled(); }); it('should call the RDF view', () => { - rdfView.render.should.have.been.calledOnce; + expect(rdfView.render).toHaveBeenCalledOnce(); }); it('should not call the HTML view', () => { - htmlView.render.should.not.have.been.called; + expect(htmlView.render).not.toHaveBeenCalled(); }); it('should have a 404 status', () => { - response.should.have.property('statusCode', 404); + expect(response).toHaveProperty('statusCode', 404); }); it('should set the text/html content type', () => { - response.headers.should.have.property('content-type', 'application/trig;charset=utf-8'); + expect(response.headers).toHaveProperty('content-type', 'application/trig;charset=utf-8'); }); it('should indicate Accept in the Vary header', () => { - response.headers.should.have.property('vary', 'Accept'); + expect(response.headers).toHaveProperty('vary', 'Accept'); }); it('should send a TriG error body', () => { - response.text.should.contain(' a '); - response.text.should.contain('<#metadata> <>.'); + expect(response.text).toContain(' a '); + expect(response.text).toContain('<#metadata> <>.'); }); }); }); diff --git a/packages/core/test/datasources/Datasource-test.js b/packages/core/test/datasources/Datasource-test.js index b4eba091..fd085dc1 100644 --- a/packages/core/test/datasources/Datasource-test.js +++ b/packages/core/test/datasources/Datasource-test.js @@ -1,7 +1,10 @@ /*! @license MIT ©2013-2016 Ruben Verborgh, Ghent University - imec */ + +import { describe, it, expect, beforeAll, beforeEach, vi } from 'vitest'; const Datasource = require('../../lib/datasources/Datasource').Datasource; // changed to make tests pass, will be revised in follow up pr const EventEmitter = require('events'), + { once } = EventEmitter, fs = require('fs'), path = require('path'), N3 = require('n3'); @@ -12,15 +15,15 @@ const dataFactory = N3.DataFactory; describe('Datasource', () => { describe('The Datasource module', () => { it('should be a function', () => { - Datasource.should.be.a('function'); + expect(typeof Datasource).toBe('function'); }); it('should be a Datasource constructor', () => { - new Datasource({ dataFactory }).should.be.an.instanceof(Datasource); + expect(new Datasource({ dataFactory })).toBeInstanceOf(Datasource); }); it('should be an EventEmitter constructor', () => { - new Datasource({ dataFactory }).should.be.an.instanceof(EventEmitter); + expect(new Datasource({ dataFactory })).toBeInstanceOf(EventEmitter); }); }); @@ -29,77 +32,60 @@ describe('Datasource', () => { datasource.initialize(); it('should not indicate support for any features', () => { - datasource.supportedFeatures.should.deep.equal({}); + expect(datasource.supportedFeatures).toEqual({}); }); it('should not support the empty query', () => { - datasource.supportsQuery({}).should.be.false; + expect(datasource.supportsQuery({})).toBe(false); }); it('should not support a query with features', () => { - datasource.supportsQuery({ features: { a: true, b: true } }).should.be.false; + expect(datasource.supportsQuery({ features: { a: true, b: true } })).toBe(false); }); - it('should throw an error when trying to execute an unsupported query', (done) => { - datasource.select({ features: { a: true, b: true } }, (error) => { - error.should.be.an.instanceOf(Error); - error.should.have.property('message', 'The datasource does not support the given query'); - done(); - }); + it('should throw an error when trying to execute an unsupported query', async () => { + let error = await new Promise((resolve) => datasource.select({ features: { a: true, b: true } }, resolve)); + expect(error).toBeInstanceOf(Error); + expect(error).toHaveProperty('message', 'The datasource does not support the given query'); }); it('should throw an error when trying to execute a supported query', () => { - (function () { datasource.select({ features: {} }); }) - .should.throw('_executeQuery has not been implemented'); + expect(() => { datasource.select({ features: {} }); }) + .toThrow('_executeQuery has not been implemented'); }); describe('fetching a resource', () => { - it('fetches an existing resource', (done) => { + it('fetches an existing resource', async () => { let result = datasource._fetch({ url: 'file://' + exampleFile }), buffer = ''; result.on('data', (d) => { buffer += d; }); - result.on('end', () => { - buffer.should.equal(fs.readFileSync(exampleFile, 'utf8')); - done(); - }); - result.on('error', done); + await once(result, 'end'); + expect(buffer).toBe(fs.readFileSync(exampleFile, 'utf8')); }); - it('assumes file:// as the default protocol', (done) => { + it('assumes file:// as the default protocol', async () => { let result = datasource._fetch({ url: exampleFile }), buffer = ''; result.on('data', (d) => { buffer += d; }); - result.on('end', () => { - buffer.should.equal(fs.readFileSync(exampleFile, 'utf8')); - done(); - }); - result.on('error', done); + await once(result, 'end'); + expect(buffer).toBe(fs.readFileSync(exampleFile, 'utf8')); }); - it('emits an error when the protocol is unknown', (done) => { + it('emits an error when the protocol is unknown', async () => { let result = datasource._fetch({ url: 'myprotocol:abc' }); - result.on('error', (error) => { - error.message.should.contain('Unknown protocol: myprotocol'); - done(); - }); + let [error] = await once(result, 'error'); + expect(error.message).toContain('Unknown protocol: myprotocol'); }); - it('emits an error on the datasource when no error listener is attached to the result', (done) => { + it('emits an error on the datasource when no error listener is attached to the result', async () => { let result = datasource._fetch({ url: exampleFile + 'notfound' }); - result.on('data', done); - datasource.on('error', (error) => { - error.message.should.contain('ENOENT: no such file or directory'); - done(); - }); + result.on('data', () => {}); + let [error] = await once(datasource, 'error'); + expect(error.message).toContain('ENOENT: no such file or directory'); }); - it('does not emit an error on the datasource when an error listener is attached to the result', (done) => { + it('does not emit an error on the datasource when an error listener is attached to the result', async () => { let result = datasource._fetch({ url: exampleFile + 'notfound' }); - result.on('error', (error) => { - error.message.should.contain('ENOENT: no such file or directory'); - done(); - }); - datasource.on('error', (error) => { - done(error); - }); + let [error] = await once(result, 'error'); + expect(error.message).toContain('ENOENT: no such file or directory'); }); }); @@ -110,137 +96,131 @@ describe('Datasource', () => { }); describe('when closed with a callback', () => { - it('should invoke the callback', (done) => { - datasource.close(done); - }); + it('should invoke the callback', () => new Promise((resolve) => datasource.close(resolve))); }); }); describe('A Datasource instance with an initializer', () => { let datasource, initializedListener, errorListener, initResolver, initSpy; - before(() => { + beforeAll(() => { datasource = new Datasource({ dataFactory }); - datasource._initialize = () => new Promise((resolve) => initResolver = resolve); - initSpy = sinon.spy(datasource, '_initialize'); + datasource._initialize = () => new Promise((resolve) => { initResolver = resolve; }); + initSpy = vi.spyOn(datasource, '_initialize'); Object.defineProperty(datasource, 'supportedFeatures', { value: { all: true }, }); - datasource.on('initialized', initializedListener = sinon.stub()); - datasource.on('error', errorListener = sinon.stub()); + datasource.on('initialized', initializedListener = vi.fn()); + datasource.on('error', errorListener = vi.fn()); datasource.initialize(); }); describe('after construction', () => { it('should have called the initializer', () => { - initSpy.should.have.been.calledOnce; + expect(initSpy).toHaveBeenCalledOnce(); }); it('should not be initialized', () => { - datasource.initialized.should.be.false; + expect(datasource.initialized).toBe(false); }); it('should not support any query', () => { - datasource.supportsQuery({}).should.be.false; + expect(datasource.supportsQuery({})).toBe(false); }); - it('should error when trying to query', (done) => { - datasource.select({}, (error) => { - error.should.have.property('message', 'The datasource is not initialized yet'); - done(); - }); + it('should error when trying to query', async () => { + let error = await new Promise((resolve) => datasource.select({}, resolve)); + expect(error).toHaveProperty('message', 'The datasource is not initialized yet'); }); }); describe('after the initializer calls the callback', () => { - before(() => { + beforeAll(() => { initResolver(); }); it('should be initialized', () => { - datasource.initialized.should.be.true; + expect(datasource.initialized).toBe(true); }); it('should have called "initialized" listeners', () => { - initializedListener.should.have.been.calledOnce; + expect(initializedListener).toHaveBeenCalledOnce(); }); it('should not have called "error" listeners', () => { - errorListener.should.not.have.been.called; + expect(errorListener).not.toHaveBeenCalled(); }); it('should support queries', () => { - datasource.supportsQuery({}).should.be.true; + expect(datasource.supportsQuery({})).toBe(true); }); - it('should allow querying', (done) => { - datasource.select({}, (error) => { - error.should.have.property('message', '_executeQuery has not been implemented'); - done(); - }); + it('should allow querying', async () => { + let error = await new Promise((resolve) => datasource.select({}, resolve)); + expect(error).toHaveProperty('message', '_executeQuery has not been implemented'); }); }); }); describe('A Datasource instance with an initializer that errors synchronously', () => { let datasource, initializedListener, errorListener, error; - before(() => { + beforeAll(() => { datasource = new Datasource({ dataFactory }); error = new Error('initializer error'); datasource._initialize = () => { throw error; }; - sinon.spy(datasource, '_initialize'); - datasource.on('initialized', initializedListener = sinon.stub()); - datasource.on('error', errorListener = sinon.stub()); + vi.spyOn(datasource, '_initialize'); + datasource.on('initialized', initializedListener = vi.fn()); + datasource.on('error', errorListener = vi.fn()); datasource.initialize(); }); describe('after the initializer calls the callback', () => { it('should have called the initializer', () => { - datasource._initialize.should.have.been.calledOnce; + expect(datasource._initialize).toHaveBeenCalledOnce(); }); it('should not be initialized', () => { - datasource.initialized.should.be.false; + expect(datasource.initialized).toBe(false); }); it('should not have called "initialized" listeners', () => { - initializedListener.should.not.have.been.called; + expect(initializedListener).not.toHaveBeenCalled(); }); it('should not have called "error" listeners', () => { - errorListener.should.have.been.calledOnce; - errorListener.should.have.been.calledWith(error); + expect(errorListener).toHaveBeenCalledOnce(); + expect(errorListener).toHaveBeenCalledWith(error); }); }); }); describe('A Datasource instance with an initializer that errors asynchronously', () => { let datasource, initializedListener, errorListener, error; - before(() => { + beforeAll(() => { datasource = new Datasource({ dataFactory }); error = new Error('initializer error'); datasource._initialize = () => Promise.reject(error); - sinon.spy(datasource, '_initialize'); - datasource.on('initialized', initializedListener = sinon.stub()); - datasource.on('error', errorListener = sinon.stub()); + vi.spyOn(datasource, '_initialize'); + datasource.on('initialized', initializedListener = vi.fn()); + datasource.on('error', errorListener = vi.fn()); datasource.initialize(); }); describe('after the initializer calls the callback', () => { it('should have called the initializer', () => { - datasource._initialize.should.have.been.calledOnce; + expect(datasource._initialize).toHaveBeenCalledOnce(); }); it('should not be initialized', () => { - datasource.initialized.should.be.false; + expect(datasource.initialized).toBe(false); }); it('should not have called "initialized" listeners', () => { - initializedListener.should.not.have.been.called; + expect(initializedListener).not.toHaveBeenCalled(); }); it('should not have called "error" listeners', () => { - errorListener.should.have.been.calledOnce; - errorListener.should.have.been.calledWith(error); + expect(errorListener).toHaveBeenCalledOnce(); + expect(errorListener).toHaveBeenCalledWith(error); }); }); }); @@ -251,41 +231,41 @@ describe('Datasource', () => { enumerable: true, value: { a: true, b: true, c: false }, }); - datasource._executeQuery = sinon.stub(); + datasource._executeQuery = vi.fn(); datasource.initialize(); it('should support the empty query', () => { - datasource.supportsQuery({}).should.be.true; + expect(datasource.supportsQuery({})).toBe(true); }); it('should support queries with supported features', () => { - datasource.supportsQuery({ features: {} }).should.be.true; - datasource.supportsQuery({ features: { a: true } }).should.be.true; - datasource.supportsQuery({ features: { a: true, b: true } }).should.be.true; - datasource.supportsQuery({ features: { b: true } }).should.be.true; - datasource.supportsQuery({ features: { a: false, b: true } }).should.be.true; - datasource.supportsQuery({ features: { a: true, b: false } }).should.be.true; - datasource.supportsQuery({ features: { a: true, b: true, c: false } }).should.be.true; + expect(datasource.supportsQuery({ features: {} })).toBe(true); + expect(datasource.supportsQuery({ features: { a: true } })).toBe(true); + expect(datasource.supportsQuery({ features: { a: true, b: true } })).toBe(true); + expect(datasource.supportsQuery({ features: { b: true } })).toBe(true); + expect(datasource.supportsQuery({ features: { a: false, b: true } })).toBe(true); + expect(datasource.supportsQuery({ features: { a: true, b: false } })).toBe(true); + expect(datasource.supportsQuery({ features: { a: true, b: true, c: false } })).toBe(true); }); it('should not support queries with unsupported features', () => { - datasource.supportsQuery({ features: { c: true } }).should.be.false; - datasource.supportsQuery({ features: { a: true, c: true } }).should.be.false; - datasource.supportsQuery({ features: { b: true, c: true } }).should.be.false; - datasource.supportsQuery({ features: { a: true, b: true, c: true } }).should.be.false; + expect(datasource.supportsQuery({ features: { c: true } })).toBe(false); + expect(datasource.supportsQuery({ features: { a: true, c: true } })).toBe(false); + expect(datasource.supportsQuery({ features: { b: true, c: true } })).toBe(false); + expect(datasource.supportsQuery({ features: { a: true, b: true, c: true } })).toBe(false); }); it('should not attach an error listener on select if none was passed', () => { let result = datasource.select({ features: {} }); - (function () { result.emit('error', new Error()); }).should.throw(); + expect(() => { result.emit('error', new Error()); }).toThrow(); }); it('should attach an error listener on select if one was passed', () => { - let onError = sinon.stub(), error = new Error(); + let onError = vi.fn(), error = new Error(); let result = datasource.select({ features: {} }, onError); result.emit('error', error); - onError.should.have.been.calledOnce; - onError.should.have.been.calledWith(error); + expect(onError).toHaveBeenCalledOnce(); + expect(onError).toHaveBeenCalledWith(error); }); }); @@ -299,7 +279,7 @@ describe('Datasource', () => { value: { custom: true }, }); datasource.initialize(); - datasource._executeQuery = sinon.spy((query, destination) => { + datasource._executeQuery = vi.fn((query, destination) => { destination._push(dataFactory.quad(dataFactory.namedNode('s'), dataFactory.namedNode('p'), dataFactory.namedNode('o1'))); destination._push(dataFactory.quad(dataFactory.namedNode('s'), dataFactory.namedNode('p'), dataFactory.namedNode('o2'), dataFactory.defaultGraph())); destination._push(dataFactory.quad(dataFactory.namedNode('s'), dataFactory.namedNode('p'), dataFactory.namedNode('o3'), dataFactory.namedNode('g'))); @@ -307,23 +287,21 @@ describe('Datasource', () => { }); beforeEach(() => { - datasource._executeQuery.reset(); + datasource._executeQuery.mockClear(); }); - it('should move triples in the default graph to the given graph', (done) => { - let result = datasource.select({ features: { custom: true } }, done), quads = []; - result.on('data', (q) => { quads.push(q); }); - result.on('end', () => { - let matchingquads = [ - dataFactory.quad(dataFactory.namedNode('s'), dataFactory.namedNode('p'), dataFactory.namedNode('o1'), dataFactory.namedNode('http://example.org/#mygraph')), - dataFactory.quad(dataFactory.namedNode('s'), dataFactory.namedNode('p'), dataFactory.namedNode('o2'), dataFactory.namedNode('http://example.org/#mygraph')), - dataFactory.quad(dataFactory.namedNode('s'), dataFactory.namedNode('p'), dataFactory.namedNode('o3'), dataFactory.namedNode('g')), - ]; - matchingquads.length.should.be.equal(quads.length); - for (let i = 0; i < quads.length; i++) - quads[i].should.deep.equal(matchingquads[i]); - done(); + it('should move triples in the default graph to the given graph', async () => { + let quads = await new Promise((resolve, reject) => { + let collected = []; + let result = datasource.select({ features: { custom: true } }, reject); + result.on('data', (q) => { collected.push(q); }); + result.on('end', () => { resolve(collected); }); }); + expect(quads).toEqual([ + dataFactory.quad(dataFactory.namedNode('s'), dataFactory.namedNode('p'), dataFactory.namedNode('o1'), dataFactory.namedNode('http://example.org/#mygraph')), + dataFactory.quad(dataFactory.namedNode('s'), dataFactory.namedNode('p'), dataFactory.namedNode('o2'), dataFactory.namedNode('http://example.org/#mygraph')), + dataFactory.quad(dataFactory.namedNode('s'), dataFactory.namedNode('p'), dataFactory.namedNode('o3'), dataFactory.namedNode('g')), + ]); }); it('should query the given graph as the default graph', () => { @@ -331,8 +309,8 @@ describe('Datasource', () => { graph: dataFactory.namedNode('http://example.org/#mygraph'), features: { custom: true }, }); - datasource._executeQuery.args[0][0].features.should.deep.equal({ custom: true }), - datasource._executeQuery.args[0][0].graph.equals(dataFactory.defaultGraph()); + expect(datasource._executeQuery.mock.calls[0][0].features).toEqual({ custom: true }), + datasource._executeQuery.mock.calls[0][0].graph.equals(dataFactory.defaultGraph()); }); it('should query the default graph as the empty graph', () => { @@ -340,8 +318,8 @@ describe('Datasource', () => { graph: dataFactory.defaultGraph(), features: { custom: true }, }); - datasource._executeQuery.args[0][0].features.should.deep.equal({ custom: true }), - datasource._executeQuery.args[0][0].graph.equals(dataFactory.namedNode('urn:ldf:emptyGraph')); + expect(datasource._executeQuery.mock.calls[0][0].features).toEqual({ custom: true }), + datasource._executeQuery.mock.calls[0][0].graph.equals(dataFactory.namedNode('urn:ldf:emptyGraph')); }); }); }); diff --git a/packages/core/test/mocha.opts b/packages/core/test/mocha.opts deleted file mode 100644 index 7014624f..00000000 --- a/packages/core/test/mocha.opts +++ /dev/null @@ -1,3 +0,0 @@ ---require ../../test/test-setup ---recursive ---timeout 500 diff --git a/packages/core/test/routers/DatasourceRouter-test.js b/packages/core/test/routers/DatasourceRouter-test.js index af804580..9007716c 100644 --- a/packages/core/test/routers/DatasourceRouter-test.js +++ b/packages/core/test/routers/DatasourceRouter-test.js @@ -1,14 +1,17 @@ /*! @license MIT ©2015-2016 Ruben Verborgh, Ghent University - imec */ + +import { describe, it, expect } from 'vitest'; +import { extractQueryParams } from '../../../../test/test-helpers'; let DatasourceRouter = require('../../lib/routers/DatasourceRouter').DatasourceRouter; // changed to make tests pass, will be revised in follow up pr describe('DatasourceRouter', () => { describe('The DatasourceRouter module', () => { it('should be a function', () => { - DatasourceRouter.should.be.a('function'); + expect(typeof DatasourceRouter).toBe('function'); }); it('should be a DatasourceRouter constructor', () => { - new DatasourceRouter().should.be.an.instanceof(DatasourceRouter); + expect(new DatasourceRouter()).toBeInstanceOf(DatasourceRouter); }); }); @@ -68,7 +71,7 @@ describe('DatasourceRouter', () => { { a: 1, features: { datasource: true }, datasource: '/my/data-source' }, ], ] - .forEach((args) => { test.extractQueryParams.apply(router, args); }); + .forEach((args) => { extractQueryParams(router, ...args); }); }); }); }); @@ -96,7 +99,7 @@ describe('DatasourceRouter', () => { { a: 1, features: { datasource: true }, datasource: '/other/path' }, ], ] - .forEach((args) => { test.extractQueryParams.apply(router, args); }); + .forEach((args) => { extractQueryParams(router, ...args); }); }); }); }); diff --git a/packages/core/test/routers/PageRouter-test.js b/packages/core/test/routers/PageRouter-test.js index 97421e61..66e13811 100644 --- a/packages/core/test/routers/PageRouter-test.js +++ b/packages/core/test/routers/PageRouter-test.js @@ -1,14 +1,17 @@ /*! @license MIT ©2015-2016 Ruben Verborgh, Ghent University - imec */ + +import { describe, it, expect } from 'vitest'; +import { extractQueryParams } from '../../../../test/test-helpers'; let PageRouter = require('../../lib/routers/PageRouter').PageRouter; // changed to make tests pass, will be revised in follow up pr describe('PageRouter', () => { describe('The PageRouter module', () => { it('should be a function', () => { - PageRouter.should.be.a('function'); + expect(typeof PageRouter).toBe('function'); }); it('should be a PageRouter constructor', () => { - new PageRouter().should.be.an.instanceof(PageRouter); + expect(new PageRouter()).toBeInstanceOf(PageRouter); }); }); @@ -75,7 +78,7 @@ describe('PageRouter', () => { { a: 1, features: { a: true, b: true, limit: true, offset: true }, limit: 100, offset: 200 }, ], ] - .forEach((args) => { test.extractQueryParams.apply(router, args); }); + .forEach((args) => { extractQueryParams(router, ...args); }); }); }); }); @@ -143,7 +146,7 @@ describe('PageRouter', () => { { a: 1, features: { a: true, b: true, limit: true, offset: true }, limit: 250, offset: 500 }, ], ] - .forEach((args) => { test.extractQueryParams.apply(router, args); }); + .forEach((args) => { extractQueryParams(router, ...args); }); }); }); }); @@ -162,7 +165,7 @@ describe('PageRouter', () => { { a: 1, features: { limit: true }, limit: 100 }, ], ] - .forEach((args) => { test.extractQueryParams.apply(router, args); }); + .forEach((args) => { extractQueryParams(router, ...args); }); }); }); }); diff --git a/packages/core/test/views/View-test.js b/packages/core/test/views/View-test.js index 345a070b..364362cd 100644 --- a/packages/core/test/views/View-test.js +++ b/packages/core/test/views/View-test.js @@ -1,4 +1,6 @@ /*! @license MIT ©2015-2016 Ruben Verborgh, Ghent University - imec */ + +import { describe, it, expect, vi } from 'vitest'; // changed to make tests pass, will be revised in follow up pr let View = require('../../lib/views/View').View, resolve = require('path').resolve; @@ -6,42 +8,42 @@ let View = require('../../lib/views/View').View, describe('View', () => { describe('The View module', () => { it('should be a function', () => { - View.should.be.a('function'); + expect(typeof View).toBe('function'); }); it('should be a View constructor', () => { - new View().should.be.an.instanceof(View); + expect(new View()).toBeInstanceOf(View); }); }); describe('A View instance', () => { describe('created without a name', () => { it('should have the empty string as name', () => { - new View().should.have.property('name', ''); + expect(new View()).toHaveProperty('name', ''); }); }); describe('created with a name', () => { it('should set the name', () => { - new View('MyView').should.have.property('name', 'MyView'); + expect(new View('MyView')).toHaveProperty('name', 'MyView'); }); }); describe('created without a name', () => { it('should have the empty string as name', () => { - new View().should.have.property('name', ''); + expect(new View()).toHaveProperty('name', ''); }); }); describe('created without content types', () => { it('should have an empty array as supported content types', () => { - new View().supportedContentTypes.should.deep.equal([]); + expect(new View().supportedContentTypes).toEqual([]); }); }); describe('created with one content type', () => { it('should have an array with the supported content types', () => { - new View('', 'text/html').supportedContentTypes.should.deep.equal([ + expect(new View('', 'text/html').supportedContentTypes).toEqual([ { type: 'text/html', responseType: 'text/html;charset=utf-8', quality: 1 }, ]); }); @@ -49,7 +51,7 @@ describe('View', () => { describe('created with two content types', () => { it('should have an array with the supported content types', () => { - new View('', 'text/html,text/plain').supportedContentTypes.should.deep.equal([ + expect(new View('', 'text/html,text/plain').supportedContentTypes).toEqual([ { type: 'text/html', responseType: 'text/html;charset=utf-8', quality: 1 }, { type: 'text/plain', responseType: 'text/plain;charset=utf-8', quality: 1 }, ]); @@ -58,7 +60,7 @@ describe('View', () => { describe('created with two content types with a quality parameter', () => { it('should have an array with the supported content types', () => { - new View('', 'text/html,text/plain;q=0.4').supportedContentTypes.should.deep.equal([ + expect(new View('', 'text/html,text/plain;q=0.4').supportedContentTypes).toEqual([ { type: 'text/html', responseType: 'text/html;charset=utf-8', quality: 1 }, { type: 'text/plain', responseType: 'text/plain;charset=utf-8', quality: 0.4 }, ]); @@ -67,54 +69,54 @@ describe('View', () => { describe('without _render method', () => { it('should throw an error on calling render', () => { - let response = { getHeader: sinon.stub() }; - (function () { new View().render(null, null, response); }) - .should.throw('The _render method is not yet implemented.'); + let response = { getHeader: vi.fn() }; + expect(() => { new View().render(null, null, response); }) + .toThrow('The _render method is not yet implemented.'); }); }); describe('created without defaults', () => { it('should call _render with the given options', () => { let view = new View(), - request = {}, response = { getHeader: sinon.stub().returns('text/html') }, + request = {}, response = { getHeader: vi.fn().mockReturnValue('text/html') }, options = { a: 'b' }; - view._render = sinon.spy(); + view._render = vi.fn(); view.render(options, request, response, noop); - response.getHeader.should.have.been.calledOnce; - response.getHeader.should.have.been.calledWith('Content-Type'); - view._render.getCall(0).args.should.have.length(4); - view._render.should.have.been.calledOnce; - view._render.getCall(0).args[0].should.deep.equal({ + expect(response.getHeader).toHaveBeenCalledOnce(); + expect(response.getHeader).toHaveBeenCalledWith('Content-Type'); + expect(view._render.mock.calls[0]).toHaveLength(4); + expect(view._render).toHaveBeenCalledOnce(); + expect(view._render.mock.calls[0][0]).toEqual({ a: 'b', contentType: 'text/html', viewPathBase: resolve(__dirname, '../../lib/views/base.html'), }); - view._render.getCall(0).args[1].should.equal(request); - view._render.getCall(0).args[2].should.equal(response); - view._render.getCall(0).args[3].should.be.an.instanceof(Function); + expect(view._render.mock.calls[0][1]).toBe(request); + expect(view._render.mock.calls[0][2]).toBe(response); + expect(view._render.mock.calls[0][3]).toBeInstanceOf(Function); }); }); describe('created with defaults', () => { it('should call _render with the combined defaults and options', () => { let view = new View(null, null, { c: 'd' }), - request = {}, response = { getHeader: sinon.stub().returns('text/html') }, + request = {}, response = { getHeader: vi.fn().mockReturnValue('text/html') }, options = { a: 'b' }; - view._render = sinon.spy(); + view._render = vi.fn(); view.render(options, request, response, noop); - response.getHeader.should.have.been.calledOnce; - response.getHeader.should.have.been.calledWith('Content-Type'); - view._render.should.have.been.calledOnce; - view._render.getCall(0).args.should.have.length(4); - view._render.getCall(0).args[0].should.deep.equal({ + expect(response.getHeader).toHaveBeenCalledOnce(); + expect(response.getHeader).toHaveBeenCalledWith('Content-Type'); + expect(view._render).toHaveBeenCalledOnce(); + expect(view._render.mock.calls[0]).toHaveLength(4); + expect(view._render.mock.calls[0][0]).toEqual({ a: 'b', c: 'd', contentType: 'text/html', viewPathBase: resolve(__dirname, '../../lib/views/base.html'), }); - view._render.getCall(0).args[1].should.equal(request); - view._render.getCall(0).args[2].should.equal(response); - view._render.getCall(0).args[3].should.be.an.instanceof(Function); + expect(view._render.mock.calls[0][1]).toBe(request); + expect(view._render.mock.calls[0][2]).toBe(response); + expect(view._render.mock.calls[0][3]).toBeInstanceOf(Function); }); }); }); diff --git a/packages/core/test/views/ViewCollection-test.js b/packages/core/test/views/ViewCollection-test.js index c9b421c0..6fd69bdc 100644 --- a/packages/core/test/views/ViewCollection-test.js +++ b/packages/core/test/views/ViewCollection-test.js @@ -1,4 +1,6 @@ /*! @license MIT ©2015-2016 Ruben Verborgh, Ghent University - imec */ + +import { describe, it, expect, beforeAll } from 'vitest'; let ViewCollection = require('../../lib/views/ViewCollection').ViewCollection; // changed to make tests pass, will be revised in follow up pr let View = require('../../lib/views/View').View; // changed to make tests pass, will be revised in follow up pr @@ -6,72 +8,72 @@ let View = require('../../lib/views/View').View; // changed to make tests pass, describe('ViewCollection', () => { describe('The ViewCollection module', () => { it('should be a function', () => { - ViewCollection.should.be.a('function'); + expect(typeof ViewCollection).toBe('function'); }); it('should be a ViewCollection constructor', () => { - new ViewCollection().should.be.an.instanceof(ViewCollection); + expect(new ViewCollection()).toBeInstanceOf(ViewCollection); }); }); describe('A ViewCollection instance without views', () => { let viewCollection; - before(() => { + beforeAll(() => { viewCollection = new ViewCollection(); }); it('should throw an error when matching a view', () => { - (function () { viewCollection.matchView('Foo'); }) - .should.throw('No view named Foo found.'); + expect(() => { viewCollection.matchView('Foo'); }) + .toThrow('No view named Foo found.'); }); }); describe('A ViewCollection instance with one view', () => { let viewCollection, viewA; - before(() => { + beforeAll(() => { viewA = new View('MyView1', 'text/html,application/trig;q=0.7'); viewCollection = new ViewCollection([viewA]); }); it('should throw an error when matching a view with a non-existing type', () => { - (function () { viewCollection.matchView('Bar'); }) - .should.throw('No view named Bar found.'); + expect(() => { viewCollection.matchView('Bar'); }) + .toThrow('No view named Bar found.'); }); describe('when a client requests HTML', () => { let viewDetails, request, response; - before(() => { + beforeAll(() => { request = { headers: { accept: 'text/html' } }; response = {}; viewDetails = viewCollection.matchView('MyView1', request, response); }); it('should return a match for the view', () => { - viewDetails.should.have.property('view', viewA); - viewDetails.should.have.property('type', 'text/html'); - viewDetails.should.have.property('responseType', 'text/html;charset=utf-8'); + expect(viewDetails).toHaveProperty('view', viewA); + expect(viewDetails).toHaveProperty('type', 'text/html'); + expect(viewDetails).toHaveProperty('responseType', 'text/html;charset=utf-8'); }); }); describe('when a client requests TriG', () => { let viewDetails, request, response; - before(() => { + beforeAll(() => { request = { headers: { accept: 'application/trig' } }; response = {}; viewDetails = viewCollection.matchView('MyView1', request, response); }); it('should return a match for the view', () => { - viewDetails.should.have.property('view', viewA); - viewDetails.should.have.property('type', 'application/trig'); - viewDetails.should.have.property('responseType', 'application/trig;charset=utf-8'); + expect(viewDetails).toHaveProperty('view', viewA); + expect(viewDetails).toHaveProperty('type', 'application/trig'); + expect(viewDetails).toHaveProperty('responseType', 'application/trig;charset=utf-8'); }); }); }); describe('A ViewCollection instance with three views of two types', () => { let viewCollection, viewA, viewB, viewC; - before(() => { + beforeAll(() => { viewA = new View('MyView1', 'text/html,application/trig;q=0.5'); viewB = new View('MyView1', 'text/html;q=1.0,application/trig'); viewC = new View('MyView2', 'text/html'); @@ -79,52 +81,52 @@ describe('ViewCollection', () => { }); it('should throw an error when matching a view with a non-existing type', () => { - (function () { viewCollection.matchView('Bar'); }) - .should.throw('No view named Bar found.'); + expect(() => { viewCollection.matchView('Bar'); }) + .toThrow('No view named Bar found.'); }); describe('when matching a request of one view type as HTML', () => { let viewDetails, request, response; - before(() => { + beforeAll(() => { request = { headers: { accept: 'text/html' } }; response = {}; viewDetails = viewCollection.matchView('MyView1', request, response); }); it('should return a description of the best fitting view', () => { - viewDetails.should.have.property('view', viewA); - viewDetails.should.have.property('type', 'text/html'); - viewDetails.should.have.property('responseType', 'text/html;charset=utf-8'); + expect(viewDetails).toHaveProperty('view', viewA); + expect(viewDetails).toHaveProperty('type', 'text/html'); + expect(viewDetails).toHaveProperty('responseType', 'text/html;charset=utf-8'); }); }); describe('when matching a request of one view type as TriG', () => { let viewDetails, request, response; - before(() => { + beforeAll(() => { request = { headers: { accept: 'application/trig' } }; response = {}; viewDetails = viewCollection.matchView('MyView1', request, response); }); it('should return a description of the best fitting view', () => { - viewDetails.should.have.property('view', viewB); - viewDetails.should.have.property('type', 'application/trig'); - viewDetails.should.have.property('responseType', 'application/trig;charset=utf-8'); + expect(viewDetails).toHaveProperty('view', viewB); + expect(viewDetails).toHaveProperty('type', 'application/trig'); + expect(viewDetails).toHaveProperty('responseType', 'application/trig;charset=utf-8'); }); }); describe('when matching a request of another view type as HTML', () => { let viewDetails, request, response; - before(() => { + beforeAll(() => { request = { headers: { accept: 'text/html' } }; response = {}; viewDetails = viewCollection.matchView('MyView2', request, response); }); it('should return a description of the other view', () => { - viewDetails.should.have.property('view', viewC); - viewDetails.should.have.property('type', 'text/html'); - viewDetails.should.have.property('responseType', 'text/html;charset=utf-8'); + expect(viewDetails).toHaveProperty('view', viewC); + expect(viewDetails).toHaveProperty('type', 'text/html'); + expect(viewDetails).toHaveProperty('responseType', 'text/html;charset=utf-8'); }); }); }); diff --git a/packages/datasource-composite/test/datasources/CompositeDatasource-test.js b/packages/datasource-composite/test/datasources/CompositeDatasource-test.js index 436543c1..a328dd0c 100644 --- a/packages/datasource-composite/test/datasources/CompositeDatasource-test.js +++ b/packages/datasource-composite/test/datasources/CompositeDatasource-test.js @@ -1,4 +1,6 @@ /*! @license MIT ©2015-2016 Ruben Verborgh, Ghent University - imec */ + +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; let CompositeDatasource = require('../../').datasources.CompositeDatasource; let Datasource = require('@ldf/core').datasources.Datasource, @@ -7,6 +9,9 @@ let Datasource = require('@ldf/core').datasources.Datasource, path = require('path'), dataFactory = require('n3').DataFactory; +let EventEmitter = require('events'), + { once } = EventEmitter; + let exampleHdtFile = path.join(__dirname, '../../../../test/assets/test.hdt'); let exampleHdtFileWithBlanks = path.join(__dirname, '../../../../test/assets/test-blank.hdt'); let exampleTurtleUrl = 'file://' + path.join(__dirname, '../../../../test/assets/test.ttl'); @@ -25,47 +30,49 @@ describe('CompositeDatasource', () => { let size = references[datasourceId].size; references[datasourceId] = new DatasourceType(datasource.settings); references[datasourceId].size = size; - references[datasourceId].initialize(); }); let totalSize = Object.keys(references).reduce((acc, key) => { return acc + references[key].size; }, 0); + beforeAll(() => Promise.all(Object.keys(references).map(async (key) => { + references[key].initialize(); + await once(references[key], 'initialized'); + }))); + describe('The CompositeDatasource module', () => { it('should be a function', () => { - CompositeDatasource.should.be.a('function'); + expect(typeof CompositeDatasource).toBe('function'); }); - it('should be an CompositeDatasource constructor', (done) => { + it('should be an CompositeDatasource constructor', async () => { let instance = new CompositeDatasource({ references: references, dataFactory }); - instance.should.be.an.instanceof(CompositeDatasource); - instance.close(done); + expect(instance).toBeInstanceOf(CompositeDatasource); + await new Promise((resolve) => instance.close(resolve)); }); - it('should create CompositeDatasource objects', (done) => { + it('should create CompositeDatasource objects', async () => { let instance = new CompositeDatasource({ references: references, dataFactory }); - instance.should.be.an.instanceof(CompositeDatasource); - instance.close(done); + expect(instance).toBeInstanceOf(CompositeDatasource); + await new Promise((resolve) => instance.close(resolve)); }); - it('should create Datasource objects', (done) => { + it('should create Datasource objects', async () => { let instance = new CompositeDatasource({ references: references, dataFactory }); - instance.should.be.an.instanceof(Datasource); - instance.close(done); + expect(instance).toBeInstanceOf(Datasource); + await new Promise((resolve) => instance.close(resolve)); }); }); describe('A CompositeDatasource instance for 4 Datasources', () => { let datasource; function getDatasource() { return datasource; } - before((done) => { + beforeAll(async () => { datasource = new CompositeDatasource({ references: references, dataFactory }); datasource.initialize(); - datasource.on('initialized', done); - }); - after((done) => { - datasource.close(done); + await once(datasource, 'initialized'); }); + afterAll(() => new Promise((resolve) => datasource.close(resolve))); itShouldExecute(getDatasource, 'the empty query', @@ -158,26 +165,26 @@ function itShouldExecute(getDatasource, name, query, expectedResultsCount, expectedTotalCount, expectedTriples) { describe('executing ' + name, () => { let resultsCount = 0, totalCount, triples = []; - before((done) => { + beforeAll(async () => { let result = getDatasource().select(query); result.getProperty('metadata', (metadata) => { totalCount = metadata.totalCount; }); result.on('data', (triple) => { resultsCount++; expectedTriples && triples.push(triple); }); - result.on('end', done); + await once(result, 'end'); }); it('should return the expected number of triples', () => { - expect(resultsCount).to.equal(expectedResultsCount); + expect(resultsCount).toBe(expectedResultsCount); }); it('should emit the expected total number of triples', () => { - expect(totalCount).to.equal(expectedTotalCount); + expect(totalCount).toBe(expectedTotalCount); }); if (expectedTriples) { it('should emit the expected triples', () => { - expect(triples.length).to.equal(expectedTriples.length); + expect(triples.length).toBe(expectedTriples.length); for (let i = 0; i < expectedTriples.length; i++) - triples[i].should.deep.equal(expectedTriples[i]); + expect(triples[i]).toEqual(expectedTriples[i]); }); } }); diff --git a/packages/datasource-composite/test/mocha.opts b/packages/datasource-composite/test/mocha.opts deleted file mode 100644 index 7014624f..00000000 --- a/packages/datasource-composite/test/mocha.opts +++ /dev/null @@ -1,3 +0,0 @@ ---require ../../test/test-setup ---recursive ---timeout 500 diff --git a/packages/datasource-hdt/test/datasources/HdtDatasource-test.js b/packages/datasource-hdt/test/datasources/HdtDatasource-test.js index eee9169f..6f4aecdb 100644 --- a/packages/datasource-hdt/test/datasources/HdtDatasource-test.js +++ b/packages/datasource-hdt/test/datasources/HdtDatasource-test.js @@ -1,11 +1,14 @@ /*! @license MIT ©2014-2016 Ruben Verborgh, Ghent University - imec */ + +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; let HdtDatasource = require('../../').datasources.HdtDatasource; let Datasource = require('@ldf/core').datasources.Datasource, UrlData = require('@ldf/core').UrlData, path = require('path'), dataFactory = require('n3').DataFactory, - RdfString = require('rdf-string'); + RdfString = require('rdf-string'), + { once } = require('events'); let exampleHdtFile = path.join(__dirname, '../../../../test/assets/test.hdt'); let exampleHdtFileWithBlanks = path.join(__dirname, '../../../../test/assets/test-blank.hdt'); @@ -13,35 +16,33 @@ let exampleHdtFileWithBlanks = path.join(__dirname, '../../../../test/assets/tes describe('HdtDatasource', () => { describe('The HdtDatasource module', () => { it('should be a function', () => { - HdtDatasource.should.be.a('function'); + expect(typeof HdtDatasource).toBe('function'); }); - it('should be an HdtDatasource constructor', (done) => { + it('should be an HdtDatasource constructor', async () => { let instance = new HdtDatasource({ dataFactory, file: exampleHdtFile }); instance.initialize(); - instance.should.be.an.instanceof(HdtDatasource); - instance.close(done); + expect(instance).toBeInstanceOf(HdtDatasource); + await new Promise((resolve) => instance.close(resolve)); }); - it('should create Datasource objects', (done) => { + it('should create Datasource objects', async () => { let instance = new HdtDatasource({ dataFactory, file: exampleHdtFile }); instance.initialize(); - instance.should.be.an.instanceof(Datasource); - instance.close(done); + expect(instance).toBeInstanceOf(Datasource); + await new Promise((resolve) => instance.close(resolve)); }); }); describe('A HdtDatasource instance for an example HDT file', () => { let datasource; function getDatasource() { return datasource; } - before((done) => { + beforeAll(async () => { datasource = new HdtDatasource({ dataFactory, file: exampleHdtFile }); datasource.initialize(); - datasource.on('initialized', done); - }); - after((done) => { - datasource.close(done); + await once(datasource, 'initialized'); }); + afterAll(() => new Promise((resolve) => datasource.close(resolve))); itShouldExecute(getDatasource, 'the empty query', @@ -97,14 +98,12 @@ describe('HdtDatasource', () => { describe('A HdtDatasource instance with blank nodes', () => { let datasource; function getDatasource() { return datasource; } - before((done) => { + beforeAll(async () => { datasource = new HdtDatasource({ dataFactory, file: exampleHdtFileWithBlanks }); datasource.initialize(); - datasource.on('initialized', done); - }); - after((done) => { - datasource.close(done); + await once(datasource, 'initialized'); }); + afterAll(() => new Promise((resolve) => datasource.close(resolve))); itShouldExecute(getDatasource, 'the empty query', @@ -146,18 +145,16 @@ describe('HdtDatasource', () => { describe('A HdtDatasource instance with blank nodes and a blank node prefix', () => { let datasource; function getDatasource() { return datasource; } - before((done) => { + beforeAll(async () => { datasource = new HdtDatasource({ dataFactory, file: exampleHdtFileWithBlanks, urlData: new UrlData({ baseURL: 'http://example.org/' }), }); datasource.initialize(); - datasource.on('initialized', done); - }); - after((done) => { - datasource.close(done); + await once(datasource, 'initialized'); }); + afterAll(() => new Promise((resolve) => datasource.close(resolve))); itShouldExecute(getDatasource, 'the empty query', @@ -201,26 +198,26 @@ function itShouldExecute(getDatasource, name, query, expectedResultsCount, expectedTotalCount, expectedTriples) { describe('executing ' + name, () => { let resultsCount = 0, totalCount, triples = []; - before((done) => { + beforeAll(async () => { let result = getDatasource().select(query); result.getProperty('metadata', (metadata) => { totalCount = metadata.totalCount; }); result.on('data', (triple) => { resultsCount++; expectedTriples && triples.push(triple); }); - result.on('end', done); + await once(result, 'end'); }); it('should return the expected number of triples', () => { - expect(resultsCount).to.equal(expectedResultsCount); + expect(resultsCount).toBe(expectedResultsCount); }); it('should emit the expected total number of triples', () => { - expect(totalCount).to.equal(expectedTotalCount); + expect(totalCount).toBe(expectedTotalCount); }); if (expectedTriples) { it('should emit the expected triples', () => { - expect(triples.length).to.equal(expectedTriples.length); + expect(triples.length).toBe(expectedTriples.length); for (let i = 0; i < expectedTriples.length; i++) - triples[i].should.deep.equal(RdfString.stringQuadToQuad(expectedTriples[i], dataFactory)); + expect(triples[i]).toEqual(RdfString.stringQuadToQuad(expectedTriples[i], dataFactory)); }); } }); diff --git a/packages/datasource-hdt/test/mocha.opts b/packages/datasource-hdt/test/mocha.opts deleted file mode 100644 index 7014624f..00000000 --- a/packages/datasource-hdt/test/mocha.opts +++ /dev/null @@ -1,3 +0,0 @@ ---require ../../test/test-setup ---recursive ---timeout 500 diff --git a/packages/datasource-jsonld/test/datasources/JsonLdDatasource-test.js b/packages/datasource-jsonld/test/datasources/JsonLdDatasource-test.js index 05d48f14..73191087 100644 --- a/packages/datasource-jsonld/test/datasources/JsonLdDatasource-test.js +++ b/packages/datasource-jsonld/test/datasources/JsonLdDatasource-test.js @@ -1,4 +1,7 @@ /*! @license MIT ©2014-2016 Ruben Verborgh, Ghent University - imec */ + +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { once } from 'events'; let JsonLdDatasource = require('../../').datasources.JsonLdDatasource; let Datasource = require('@ldf/core').datasources.Datasource, @@ -10,26 +13,29 @@ let exampleJsonLdUrl = 'file://' + path.join(__dirname, '../../../../test/assets describe('JsonLdDatasource', () => { describe('The JsonLdDatasource module', () => { it('should be a function', () => { - JsonLdDatasource.should.be.a('function'); + expect(typeof JsonLdDatasource).toBe('function'); }); - it('should be a JsonLdDatasource constructor', (done) => { + it('should be a JsonLdDatasource constructor', async () => { let instance = new JsonLdDatasource({ dataFactory, url: exampleJsonLdUrl }); - instance.should.be.an.instanceof(JsonLdDatasource); - instance.close(done); + expect(instance).toBeInstanceOf(JsonLdDatasource); + await new Promise((resolve) => instance.close(resolve)); }); - it('should create Datasource objects', (done) => { + it('should create Datasource objects', async () => { let instance = new JsonLdDatasource({ dataFactory, url: exampleJsonLdUrl }); - instance.should.be.an.instanceof(Datasource); - instance.close(done); + expect(instance).toBeInstanceOf(Datasource); + await new Promise((resolve) => instance.close(resolve)); }); }); describe('A JsonLdDatasource instance for an example JsonLd file', () => { let datasource = new JsonLdDatasource({ dataFactory, url: exampleJsonLdUrl }); - datasource.initialize(); - after((done) => { datasource.close(done); }); + beforeAll(async () => { + datasource.initialize(); + await once(datasource, 'initialized'); + }); + afterAll(() => new Promise((resolve) => datasource.close(resolve))); itShouldExecute(datasource, 'the empty query', @@ -91,19 +97,19 @@ describe('JsonLdDatasource', () => { function itShouldExecute(datasource, name, query, expectedResultsCount, expectedTotalCount) { describe('executing ' + name, () => { let resultsCount = 0, totalCount; - before((done) => { + beforeAll(async () => { let result = datasource.select(query); result.getProperty('metadata', (metadata) => { totalCount = metadata.totalCount; }); result.on('data', (triple) => { resultsCount++; }); - result.on('end', done); + await once(result, 'end'); }); it('should return the expected number of triples', () => { - expect(resultsCount).to.equal(expectedResultsCount); + expect(resultsCount).toBe(expectedResultsCount); }); it('should emit the expected total number of triples', () => { - expect(totalCount).to.equal(expectedTotalCount); + expect(totalCount).toBe(expectedTotalCount); }); }); } diff --git a/packages/datasource-jsonld/test/mocha.opts b/packages/datasource-jsonld/test/mocha.opts deleted file mode 100644 index 7014624f..00000000 --- a/packages/datasource-jsonld/test/mocha.opts +++ /dev/null @@ -1,3 +0,0 @@ ---require ../../test/test-setup ---recursive ---timeout 500 diff --git a/packages/datasource-n3/test/datasources/N3Datasource-test.js b/packages/datasource-n3/test/datasources/N3Datasource-test.js index be97d8fe..bfe8fba2 100644 --- a/packages/datasource-n3/test/datasources/N3Datasource-test.js +++ b/packages/datasource-n3/test/datasources/N3Datasource-test.js @@ -1,4 +1,7 @@ /*! @license MIT ©2014-2016 Ruben Verborgh, Ghent University - imec */ + +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { once } from 'events'; let N3Datasource = require('../../').datasources.N3Datasource; let Datasource = require('@ldf/core').datasources.Datasource, @@ -10,26 +13,29 @@ let exampleTurtleUrl = 'file://' + path.join(__dirname, '../../../../test/assets describe('N3Datasource', () => { describe('The N3Datasource module', () => { it('should be a function', () => { - N3Datasource.should.be.a('function'); + expect(typeof N3Datasource).toBe('function'); }); - it('should be a N3Datasource constructor', (done) => { + it('should be a N3Datasource constructor', async () => { let instance = new N3Datasource({ dataFactory, url: exampleTurtleUrl }); - instance.should.be.an.instanceof(N3Datasource); - instance.close(done); + expect(instance).toBeInstanceOf(N3Datasource); + await new Promise((resolve) => instance.close(resolve)); }); - it('should create Datasource objects', (done) => { + it('should create Datasource objects', async () => { let instance = new N3Datasource({ dataFactory, url: exampleTurtleUrl }); - instance.should.be.an.instanceof(Datasource); - instance.close(done); + expect(instance).toBeInstanceOf(Datasource); + await new Promise((resolve) => instance.close(resolve)); }); }); describe('A N3Datasource instance for an example Turtle file', () => { let datasource = new N3Datasource({ dataFactory, url: exampleTurtleUrl }); - datasource.initialize(); - after((done) => { datasource.close(done); }); + beforeAll(async () => { + datasource.initialize(); + await once(datasource, 'initialized'); + }); + afterAll(() => new Promise((resolve) => datasource.close(resolve))); itShouldExecute(datasource, 'the empty query', @@ -81,19 +87,19 @@ describe('N3Datasource', () => { function itShouldExecute(datasource, name, query, expectedResultsCount, expectedTotalCount) { describe('executing ' + name, () => { let resultsCount = 0, totalCount; - before((done) => { + beforeAll(async () => { let result = datasource.select(query); result.getProperty('metadata', (metadata) => { totalCount = metadata.totalCount; }); result.on('data', (triple) => { resultsCount++; }); - result.on('end', done); + await once(result, 'end'); }); it('should return the expected number of triples', () => { - expect(resultsCount).to.equal(expectedResultsCount); + expect(resultsCount).toBe(expectedResultsCount); }); it('should emit the expected total number of triples', () => { - expect(totalCount).to.equal(expectedTotalCount); + expect(totalCount).toBe(expectedTotalCount); }); }); } diff --git a/packages/datasource-n3/test/mocha.opts b/packages/datasource-n3/test/mocha.opts deleted file mode 100644 index 7014624f..00000000 --- a/packages/datasource-n3/test/mocha.opts +++ /dev/null @@ -1,3 +0,0 @@ ---require ../../test/test-setup ---recursive ---timeout 500 diff --git a/packages/datasource-rdfa/test/datasources/RdfaDatasource-test.js b/packages/datasource-rdfa/test/datasources/RdfaDatasource-test.js index 66961fa6..e54903ff 100644 --- a/packages/datasource-rdfa/test/datasources/RdfaDatasource-test.js +++ b/packages/datasource-rdfa/test/datasources/RdfaDatasource-test.js @@ -1,4 +1,7 @@ /*! @license MIT ©2014-2016 Ruben Verborgh, Ghent University - imec */ + +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { once } from 'events'; let RdfaDatasource = require('../../').datasources.RdfaDatasource; let Datasource = require('@ldf/core').datasources.Datasource, @@ -10,26 +13,29 @@ let exampleRdfaUrl = 'file://' + path.join(__dirname, '../../../../test/assets/t describe('RdfaDatasource', () => { describe('The RdfaDatasource module', () => { it('should be a function', () => { - RdfaDatasource.should.be.a('function'); + expect(typeof RdfaDatasource).toBe('function'); }); - it('should be a RdfaDatasource constructor', (done) => { + it('should be a RdfaDatasource constructor', async () => { let instance = new RdfaDatasource({ dataFactory, url: exampleRdfaUrl }); - instance.should.be.an.instanceof(RdfaDatasource); - instance.close(done); + expect(instance).toBeInstanceOf(RdfaDatasource); + await new Promise((resolve) => instance.close(resolve)); }); - it('should create Datasource objects', (done) => { + it('should create Datasource objects', async () => { let instance = new RdfaDatasource({ dataFactory, url: exampleRdfaUrl }); - instance.should.be.an.instanceof(Datasource); - instance.close(done); + expect(instance).toBeInstanceOf(Datasource); + await new Promise((resolve) => instance.close(resolve)); }); }); describe('A RdfaDatasource instance for an example RDFa HTML file', () => { let datasource = new RdfaDatasource({ dataFactory, url: exampleRdfaUrl }); - datasource.initialize(); - after((done) => { datasource.close(done); }); + beforeAll(async () => { + datasource.initialize(); + await once(datasource, 'initialized'); + }); + afterAll(() => new Promise((resolve) => datasource.close(resolve))); itShouldExecute(datasource, 'the empty query', @@ -81,19 +87,19 @@ describe('RdfaDatasource', () => { function itShouldExecute(datasource, name, query, expectedResultsCount, expectedTotalCount) { describe('executing ' + name, () => { let resultsCount = 0, totalCount; - before((done) => { + beforeAll(async () => { let result = datasource.select(query); result.getProperty('metadata', (metadata) => { totalCount = metadata.totalCount; }); result.on('data', (triple) => { resultsCount++; }); - result.on('end', done); + await once(result, 'end'); }); it('should return the expected number of triples', () => { - expect(resultsCount).to.equal(expectedResultsCount); + expect(resultsCount).toBe(expectedResultsCount); }); it('should emit the expected total number of triples', () => { - expect(totalCount).to.equal(expectedTotalCount); + expect(totalCount).toBe(expectedTotalCount); }); }); } diff --git a/packages/datasource-rdfa/test/mocha.opts b/packages/datasource-rdfa/test/mocha.opts deleted file mode 100644 index 7014624f..00000000 --- a/packages/datasource-rdfa/test/mocha.opts +++ /dev/null @@ -1,3 +0,0 @@ ---require ../../test/test-setup ---recursive ---timeout 500 diff --git a/packages/datasource-sparql/test/datasources/SparqlDatasource-test.js b/packages/datasource-sparql/test/datasources/SparqlDatasource-test.js index 3dc3cf75..b39dcdcb 100644 --- a/packages/datasource-sparql/test/datasources/SparqlDatasource-test.js +++ b/packages/datasource-sparql/test/datasources/SparqlDatasource-test.js @@ -1,4 +1,8 @@ /*! @license MIT ©2013-2016 Ruben Verborgh, Ghent University - imec */ + +import { describe, it, expect, beforeAll, vi } from 'vitest'; +import { createHttpResponse, streamLength } from '../../../../test/test-helpers'; +import { once } from 'events'; let SparqlDatasource = require('../../').datasources.SparqlDatasource; let Datasource = require('@ldf/core').datasources.Datasource, @@ -10,28 +14,39 @@ let Datasource = require('@ldf/core').datasources.Datasource, let jsonResult = fs.readFileSync(path.join(__dirname, '../../../../test/assets/sparql-quads-response.json')); let countResult = '"c"\n12345678\n'; +// Mimics sinon's onFirstCall/onSecondCall: each configured return value stays +// tied to that call index until overridden, and survives mockClear (unlike +// mockReturnValueOnce, which is consumed after a single use). +function createRequestStub() { + let responses = []; + let request = vi.fn(() => responses[request.mock.calls.length - 1]); + request.onFirstCall = (value) => { responses[0] = value; }; + request.onSecondCall = (value) => { responses[1] = value; }; + return request; +} + describe('SparqlDatasource', () => { describe('The SparqlDatasource module', () => { it('should be a function', () => { - SparqlDatasource.should.be.a('function'); + expect(typeof SparqlDatasource).toBe('function'); }); it('should be a SparqlDatasource constructor', () => { - new SparqlDatasource({ dataFactory }).should.be.an.instanceof(SparqlDatasource); + expect(new SparqlDatasource({ dataFactory })).toBeInstanceOf(SparqlDatasource); }); it('should create Datasource objects', () => { - new SparqlDatasource({ dataFactory }).should.be.an.instanceof(Datasource); + expect(new SparqlDatasource({ dataFactory })).toBeInstanceOf(Datasource); }); }); describe('A SparqlDatasource instance', () => { - let request = sinon.stub(); + let request = createRequestStub(); let datasource = new SparqlDatasource({ dataFactory, endpoint: 'http://ex.org/sparql', request: request }); datasource.initialize(); it('should indicate support for its features', () => { - datasource.supportedFeatures.should.deep.equal({ + expect(datasource.supportedFeatures).toEqual({ triplePattern: true, quadPattern: true, limit: true, @@ -41,23 +56,21 @@ describe('SparqlDatasource', () => { }); it('should support the empty query', () => { - datasource.supportsQuery({}).should.be.true; + expect(datasource.supportsQuery({})).toBe(true); }); it('should support a query with supported features', () => { - datasource.supportsQuery({ features: { limit: true, offset: true, b: false } }).should.be.true; + expect(datasource.supportsQuery({ features: { limit: true, offset: true, b: false } })).toBe(true); }); it('should not support a query with unsupported features', () => { - datasource.supportsQuery({ features: { limit: true, b: true } }).should.be.false; + expect(datasource.supportsQuery({ features: { limit: true, b: true } })).toBe(false); }); - it('should throw an error when trying to execute an unsupported query', (done) => { - datasource.select({ features: { a: true, b: true } }, (error) => { - error.should.be.an.instanceOf(Error); - error.should.have.property('message', 'The datasource does not support the given query'); - done(); - }); + it('should throw an error when trying to execute an unsupported query', async () => { + let error = await new Promise((resolve) => datasource.select({ features: { a: true, b: true } }, resolve)); + expect(error).toBeInstanceOf(Error); + expect(error).toHaveProperty('message', 'The datasource does not support the given query'); }); itShouldExecute(datasource, request, @@ -195,69 +208,72 @@ describe('SparqlDatasource', () => { describe('when invalid JSON is returned in response to the data query', () => { let result, error; - before((done) => { - request.reset(); - request.onFirstCall().returns(test.createHttpResponse('invalid', 'application/sparql-results+json')); - request.onSecondCall().returns(test.createHttpResponse(countResult, 'text/csv')); + beforeAll(async () => { + request.mockClear(); + request.onFirstCall(createHttpResponse('invalid', 'application/sparql-results+json')); + request.onSecondCall(createHttpResponse(countResult, 'text/csv')); let query = { subject: dataFactory.namedNode('abcd'), features: { quadPattern: true } }; result = datasource.select(query); - result.on('error', (e) => { error = e; done(); }); + [error] = await once(result, 'error'); }); it('should emit an error', () => { - error.should.have.property('message', 'Error accessing SPARQL endpoint http://ex.org/sparql: The endpoint returned an invalid SPARQL results JSON response.'); + expect(error).toHaveProperty('message', 'Error accessing SPARQL endpoint http://ex.org/sparql: The endpoint returned an invalid SPARQL results JSON response.'); }); }); describe('when invalid JSON is returned in response to the count query', () => { let result, error; - before((done) => { - request.reset(); - request.onFirstCall().returns(test.createHttpResponse(jsonResult, 'application/sparql-results+json')); - request.onSecondCall().returns(test.createHttpResponse('invalid', 'application/trig')); + beforeAll(async () => { + request.mockClear(); + request.onFirstCall(createHttpResponse(jsonResult, 'application/sparql-results+json')); + request.onSecondCall(createHttpResponse('invalid', 'application/trig')); let query = { subject: dataFactory.namedNode('abcde'), features: { quadPattern: true } }; result = datasource.select(query); - result.on('error', (e) => { error = e; done(); }); + [error] = await once(result, 'error'); }); it('should emit an error', () => { - error.should.have.property('message', 'Error accessing SPARQL endpoint http://ex.org/sparql: COUNT query failed.'); + expect(error).toHaveProperty('message', 'Error accessing SPARQL endpoint http://ex.org/sparql: COUNT query failed.'); }); }); describe('when the data query request errors', () => { let result, error; - before((done) => { - request.reset(); + beforeAll(async () => { + request.mockClear(); let query = { subject: dataFactory.namedNode('abcde'), features: { quadPattern: true } }; result = datasource.select(query); - result.on('error', (e) => { error = e; done(); }); - request.getCall(0).callArgWith(1, Error('query response error')); + let errorEvent = once(result, 'error'); + request.mock.calls[0][1](new Error('query response error')); + [error] = await errorEvent; }); it('should emit an error', () => { - error.should.have.property('message', 'Error accessing SPARQL endpoint http://ex.org/sparql: query response error'); + expect(error).toHaveProperty('message', 'Error accessing SPARQL endpoint http://ex.org/sparql: query response error'); }); }); describe('when the count query request errors', () => { - let result, totalCount; - before(() => { - request.reset(); + let totalCount; + beforeAll(async () => { + request.mockClear(); let query = { subject: dataFactory.namedNode('abcdef'), features: { quadPattern: true } }; - result = datasource.select(query); - request.returnValues[1].emit('error', new Error()); - result.getProperty('metadata', (metadata) => { totalCount = metadata.totalCount; }); + let result = datasource.select(query); + request.mock.results[1].value.emit('error', new Error()); + await new Promise((resolve) => { + result.getProperty('metadata', (metadata) => { totalCount = metadata.totalCount; resolve(); }); + }); }); it('should emit a high count estimate', () => { - expect(totalCount).to.equal(1e9); + expect(totalCount).toBe(1e9); }); }); }); describe('A SparqlDatasource instance with forceTypedLiterals true', () => { - let request = sinon.stub(); + let request = createRequestStub(); let datasource = new SparqlDatasource({ dataFactory, endpoint: 'http://ex.org/sparql', request: request, forceTypedLiterals: true }); datasource.initialize(); @@ -296,41 +312,43 @@ describe('SparqlDatasource', () => { function itShouldExecute(datasource, request, name, query, constructQuery, countQuery) { describe('executing ' + name, () => { let result, totalCount; - before(() => { - request.reset(); - request.onFirstCall().returns(test.createHttpResponse(jsonResult, 'application/sparql-results+json')); - request.onSecondCall().returns(test.createHttpResponse(countResult, 'text/csv')); + beforeAll(async () => { + request.mockClear(); + request.onFirstCall(createHttpResponse(jsonResult, 'application/sparql-results+json')); + request.onSecondCall(createHttpResponse(countResult, 'text/csv')); result = datasource.select(query); - result.getProperty('metadata', (metadata) => { totalCount = metadata.totalCount; }); + await new Promise((resolve) => { + result.getProperty('metadata', (metadata) => { totalCount = metadata.totalCount; resolve(); }); + }); }); it('should request a matching CONSTRUCT query', () => { - request.should.have.been.called; - let url = URL.parse(request.firstCall.args[0].url, true); - (url.protocol + '//' + url.host + url.pathname).should.equal('http://ex.org/sparql'); - url.query.query.should.equal(constructQuery); + expect(request).toHaveBeenCalled(); + let url = URL.parse(request.mock.calls[0][0].url, true); + expect(url.protocol + '//' + url.host + url.pathname).toBe('http://ex.org/sparql'); + expect(url.query.query).toBe(constructQuery); }); if (countQuery) { it('should request a matching COUNT query', () => { - request.should.have.been.calledTwice; - let url = URL.parse(request.secondCall.args[0].url, true); - (url.protocol + '//' + url.host + url.pathname).should.equal('http://ex.org/sparql'); - url.query.query.should.equal(countQuery); + expect(request).toHaveBeenCalledTimes(2); + let url = URL.parse(request.mock.calls[1][0].url, true); + expect(url.protocol + '//' + url.host + url.pathname).toBe('http://ex.org/sparql'); + expect(url.query.query).toBe(countQuery); }); } else { it('should use the cached COUNT result', () => { - request.should.have.been.calledOnce; + expect(request).toHaveBeenCalledOnce(); }); } - it('should emit all triples in the SPARQL response', (done) => { - result.should.be.a.streamWithLength(55, done); + it('should emit all triples in the SPARQL response', async () => { + expect(await streamLength(result)).toBe(55); }); it('should emit the extracted count', () => { - expect(totalCount).to.equal(12345678); + expect(totalCount).toBe(12345678); }); }); } diff --git a/packages/datasource-sparql/test/mocha.opts b/packages/datasource-sparql/test/mocha.opts deleted file mode 100644 index 7014624f..00000000 --- a/packages/datasource-sparql/test/mocha.opts +++ /dev/null @@ -1,3 +0,0 @@ ---require ../../test/test-setup ---recursive ---timeout 500 diff --git a/packages/feature-qpf/test/controllers/QuadPatternFragmentsController-test.js b/packages/feature-qpf/test/controllers/QuadPatternFragmentsController-test.js index b2dd19c9..97d463e8 100644 --- a/packages/feature-qpf/test/controllers/QuadPatternFragmentsController-test.js +++ b/packages/feature-qpf/test/controllers/QuadPatternFragmentsController-test.js @@ -1,8 +1,10 @@ /*! @license MIT ©2015-2016 Ruben Verborgh, Ghent University - imec */ + +import { describe, it, expect, beforeAll, vi } from 'vitest'; +import { DummyServer } from '../../../../test/DummyServer'; let QuadPatternFragmentsController = require('../../').controllers.QuadPatternFragmentsController; let request = require('supertest'), - DummyServer = require('../../../../test/DummyServer'), http = require('http'); let QuadPatternFragmentsHtmlView = require('../../').views.quadpatternfragments.QuadPatternFragmentsHtmlView, @@ -13,21 +15,21 @@ let QuadPatternFragmentsHtmlView = require('../../').views.quadpatternfragments. describe('QuadPatternFragmentsController', () => { describe('The QuadPatternFragmentsController module', () => { it('should be a function', () => { - QuadPatternFragmentsController.should.be.a('function'); + expect(typeof QuadPatternFragmentsController).toBe('function'); }); it('should be a QuadPatternFragmentsController constructor', () => { - new QuadPatternFragmentsController().should.be.an.instanceof(QuadPatternFragmentsController); + expect(new QuadPatternFragmentsController()).toBeInstanceOf(QuadPatternFragmentsController); }); }); describe('A QuadPatternFragmentsController instance with 3 routers', () => { let controller, client, routerA, routerB, routerC, datasource, datasources, view, prefixes; - before(() => { - routerA = { extractQueryParams: sinon.stub() }; - routerB = { extractQueryParams: sinon.stub().throws(new Error('second router error')) }; + beforeAll(() => { + routerA = { extractQueryParams: vi.fn() }; + routerB = { extractQueryParams: vi.fn(() => { throw new Error('second router error'); }) }; routerC = { - extractQueryParams: sinon.spy((request, query) => { + extractQueryParams: vi.fn((request, query) => { query.features.datasource = true; query.features.other = true; query.datasource = '/my-datasource'; @@ -36,13 +38,13 @@ describe('QuadPatternFragmentsController', () => { }; datasource = { title: 'My data', - supportsQuery: sinon.stub().returns(true), - select: sinon.stub().returns({ stream: 'items' }), + supportsQuery: vi.fn().mockReturnValue(true), + select: vi.fn().mockReturnValue({ stream: 'items' }), supportedFeatures: { quadPattern: true }, }; datasources = { 'my-datasource': datasource }; view = new QuadPatternFragmentsRdfView({ dataFactory }), - sinon.spy(view, 'render'); + vi.spyOn(view, 'render'); prefixes = { a: 'a' }; controller = new QuadPatternFragmentsController({ urlData: new UrlData({ baseURL: 'https://example.org/base/?bar=foo' }), @@ -51,128 +53,130 @@ describe('QuadPatternFragmentsController', () => { views: [view], prefixes: prefixes, }); - client = request.agent(new DummyServer(controller)); + client = request.agent(new DummyServer(controller), {}); }); function resetAll() { - routerA.extractQueryParams.reset(); - routerB.extractQueryParams.reset(); - routerC.extractQueryParams.reset(); - datasource.supportsQuery.reset(); - datasource.select.reset(); + routerA.extractQueryParams.mockClear(); + routerB.extractQueryParams.mockClear(); + routerC.extractQueryParams.mockClear(); + datasource.supportsQuery.mockClear(); + datasource.select.mockClear(); } describe('receiving a request for a fragment', () => { - before((done) => { + beforeAll(async () => { resetAll(); - client.get('/my-datasource?a=b&c=d').end(done); + await client.get('/my-datasource?a=b&c=d'); }); it('should call the first router with the request and an empty query', () => { - routerA.extractQueryParams.should.have.been.calledOnce; + expect(routerA.extractQueryParams).toHaveBeenCalledOnce(); - let args = routerA.extractQueryParams.firstCall.args; - expect(args[0]).to.have.property('url'); - expect(args[0].url).to.have.property('path', '/my-datasource?a=b&c=d'); - expect(args[0].url).to.have.property('pathname', '/my-datasource'); - expect(args[0].url).to.have.property('query'); - expect(args[0].url.query).to.deep.equal({ a: 'b', c: 'd' }); + let args = routerA.extractQueryParams.mock.calls[0]; + expect(args[0]).toHaveProperty('url'); + expect(args[0].url).toHaveProperty('path', '/my-datasource?a=b&c=d'); + expect(args[0].url).toHaveProperty('pathname', '/my-datasource'); + expect(args[0].url).toHaveProperty('query'); + expect(args[0].url.query).toEqual({ a: 'b', c: 'd' }); - expect(args[1]).to.be.an('object'); - expect(args[1]).to.have.property('features'); - expect(args[1].features).to.be.an('object'); + expect(typeof args[1]).toBe('object'); + expect(args[1]).toHaveProperty('features'); + expect(typeof args[1].features).toBe('object'); }); it('should call the second router with the same request and query', () => { - routerB.extractQueryParams.should.have.been.calledOnce; + expect(routerB.extractQueryParams).toHaveBeenCalledOnce(); - routerB.extractQueryParams.firstCall.args[0].should.equal( - routerA.extractQueryParams.firstCall.args[0]); - routerB.extractQueryParams.firstCall.args[1].should.equal( - routerA.extractQueryParams.firstCall.args[1]); + expect(routerB.extractQueryParams.mock.calls[0][0]).toBe( + routerA.extractQueryParams.mock.calls[0][0]); + expect(routerB.extractQueryParams.mock.calls[0][1]).toBe( + routerA.extractQueryParams.mock.calls[0][1]); }); it('should call the third router with the same request and query', () => { - routerC.extractQueryParams.should.have.been.calledOnce; + expect(routerC.extractQueryParams).toHaveBeenCalledOnce(); - routerC.extractQueryParams.firstCall.args[0].should.equal( - routerA.extractQueryParams.firstCall.args[0]); - routerC.extractQueryParams.firstCall.args[1].should.equal( - routerA.extractQueryParams.firstCall.args[1]); + expect(routerC.extractQueryParams.mock.calls[0][0]).toBe( + routerA.extractQueryParams.mock.calls[0][0]); + expect(routerC.extractQueryParams.mock.calls[0][1]).toBe( + routerA.extractQueryParams.mock.calls[0][1]); }); it('should verify whether the data source supports the query', () => { - let query = routerC.extractQueryParams.firstCall.args[1]; - datasource.supportsQuery.should.have.been.calledOnce; - datasource.supportsQuery.should.have.been.calledWith(query); + let query = routerC.extractQueryParams.mock.calls[0][1]; + expect(datasource.supportsQuery).toHaveBeenCalledOnce(); + expect(datasource.supportsQuery).toHaveBeenCalledWith(query); }); it('should send the query to the right data source', () => { - let query = routerC.extractQueryParams.firstCall.args[1]; - datasource.select.should.have.been.calledOnce; - datasource.select.should.have.been.calledWith(query); + let query = routerC.extractQueryParams.mock.calls[0][1]; + expect(datasource.select).toHaveBeenCalledOnce(); + expect(datasource.select.mock.calls[0][0]).toBe(query); }); it('should pass the query result to the output view', () => { - view.render.should.have.been.calledOnce; - let args = view.render.firstCall.args; + expect(view.render).toHaveBeenCalledOnce(); + let args = view.render.mock.calls[0]; - args[0].should.be.an('object'); // settings - args[1].should.be.an.instanceof(http.IncomingMessage); - args[2].should.be.an.instanceof(http.ServerResponse); + expect(typeof args[0]).toBe('object'); // settings + expect(args[1]).toBeInstanceOf(http.IncomingMessage); + expect(args[2]).toBeInstanceOf(http.ServerResponse); }); it('should pass the correct settings to the view', () => { - view.render.should.have.been.calledOnce; - let query = routerC.extractQueryParams.firstCall.args[1]; - let settings = view.render.firstCall.args[0]; - - settings.datasource.should.have.property('title', 'My data'); - settings.datasource.should.have.property('index', 'https://example.org/#dataset'); - settings.datasource.should.have.property('url', 'https://example.org/my-datasource#dataset'); - settings.datasource.should.have.property('templateUrl', 'https://example.org/my-datasource{?subject,predicate,object,graph}'); - settings.datasource.should.have.property('supportsQuads', true); - settings.fragment.should.deep.equal({ + expect(view.render).toHaveBeenCalledOnce(); + let query = routerC.extractQueryParams.mock.calls[0][1]; + let settings = view.render.mock.calls[0][0]; + + expect(settings.datasource).toHaveProperty('title', 'My data'); + expect(settings.datasource).toHaveProperty('index', 'https://example.org/#dataset'); + expect(settings.datasource).toHaveProperty('url', 'https://example.org/my-datasource#dataset'); + expect(settings.datasource).toHaveProperty('templateUrl', 'https://example.org/my-datasource{?subject,predicate,object,graph}'); + expect(settings.datasource).toHaveProperty('supportsQuads', true); + expect(settings.fragment).toEqual({ url: 'https://example.org/my-datasource?a=b&c=d', pageUrl: 'https://example.org/my-datasource?a=b&c=d', firstPageUrl: 'https://example.org/my-datasource?a=b&c=d&page=1', nextPageUrl: 'https://example.org/my-datasource?a=b&c=d&page=2', previousPageUrl: null, }); - settings.results.should.deep.equal({ + expect(settings.results).toEqual({ stream: 'items', }); - settings.prefixes.should.deep.equal(prefixes); - settings.query.should.deep.equal(query); - settings.datasources.should.deep.equal({ '/my-datasource': datasource }); - query.should.have.property('patternString', '{ ?s ?p ?o ?g. }'); + expect(settings.prefixes).toEqual(prefixes); + expect(settings.query).toEqual(query); + expect(settings.datasources).toEqual({ '/my-datasource': datasource }); + expect(query).toHaveProperty('patternString', '{ ?s ?p ?o ?g. }'); }); }); describe('receiving a request for an unsupported fragment', () => { - before((done) => { + beforeAll(async () => { resetAll(); - datasource.supportsQuery = sinon.stub().returns(false); - client.get('/my-datasource?a=b&c=d').end(done); + datasource.supportsQuery = vi.fn().mockReturnValue(false); + await client.get('/my-datasource?a=b&c=d'); }); it('should verify whether the data source supports the query', () => { - let query = routerC.extractQueryParams.firstCall.args[1]; - datasource.supportsQuery.should.have.been.calledOnce; - datasource.supportsQuery.should.have.been.calledWith(query); + let query = routerC.extractQueryParams.mock.calls[0][1]; + expect(datasource.supportsQuery).toHaveBeenCalledOnce(); + expect(datasource.supportsQuery).toHaveBeenCalledWith(query); }); it('should not send the query to the data source', () => { - datasource.select.should.not.have.been.called; + expect(datasource.select).not.toHaveBeenCalled(); }); }); }); describe('A QuadPatternFragmentsController instance with 2 views', () => { let controller, client, htmlView, rdfView; - before(() => { + beforeAll(() => { let datasource = { - supportsQuery: sinon.stub().returns(true), - select: sinon.stub().returns({ + supportsQuery: vi.fn().mockReturnValue(true), + select: vi.fn().mockReturnValue({ + // Mocks AsyncIterator's own on(event, callback) signature. + // eslint-disable-next-line promise/prefer-await-to-callbacks on: function (event, callback) { if (event === 'end' || event === 'metadata') setImmediate(callback, {}); @@ -188,132 +192,127 @@ describe('QuadPatternFragmentsController', () => { }; htmlView = new QuadPatternFragmentsHtmlView(); rdfView = new QuadPatternFragmentsRdfView({ dataFactory }); - sinon.spy(htmlView, 'render'); - sinon.spy(rdfView, 'render'); + vi.spyOn(htmlView, 'render'); + vi.spyOn(rdfView, 'render'); controller = new QuadPatternFragmentsController({ routers: [router], datasources: { 'my-datasource': datasource }, views: [htmlView, rdfView], }); - client = request.agent(new DummyServer(controller)); + client = request.agent(new DummyServer(controller), {}); }); function resetAll() { - htmlView.render.reset(); - rdfView.render.reset(); + htmlView.render.mockClear(); + rdfView.render.mockClear(); } describe('receiving a request without Accept header', () => { let response; - before((done) => { + beforeAll(async () => { resetAll(); - client.get('/my-datasource') - .end((error, res) => { response = res; done(error); }); + response = await client.get('/my-datasource'); }); it('should call the default view', () => { - htmlView.render.should.have.been.calledOnce; + expect(htmlView.render).toHaveBeenCalledOnce(); }); it('should set the text/html content type', () => { - response.headers.should.have.property('content-type', 'text/html;charset=utf-8'); + expect(response.headers).toHaveProperty('content-type', 'text/html;charset=utf-8'); }); it('should indicate Accept in the Vary header', () => { - response.headers.should.have.property('vary', 'Accept'); + expect(response.headers).toHaveProperty('vary', 'Accept'); }); }); describe('receiving a request with an Accept header of */*', () => { let response; - before((done) => { + beforeAll(async () => { resetAll(); - client.get('/my-datasource').set('Accept', '*/*') - .end((error, res) => { response = res; done(error); }); + response = await client.get('/my-datasource').set('Accept', '*/*'); }); it('should call the HTML view', () => { - htmlView.render.should.have.been.calledOnce; + expect(htmlView.render).toHaveBeenCalledOnce(); }); it('should set the text/html content type', () => { - response.headers.should.have.property('content-type', 'text/html;charset=utf-8'); + expect(response.headers).toHaveProperty('content-type', 'text/html;charset=utf-8'); }); it('should indicate Accept in the Vary header', () => { - response.headers.should.have.property('vary', 'Accept'); + expect(response.headers).toHaveProperty('vary', 'Accept'); }); }); describe('receiving a request with an Accept header of text/html', () => { let response; - before((done) => { + beforeAll(async () => { resetAll(); - client.get('/my-datasource').set('Accept', 'text/html') - .end((error, res) => { response = res; done(error); }); + response = await client.get('/my-datasource').set('Accept', 'text/html'); }); it('should call the HTML view', () => { - htmlView.render.should.have.been.calledOnce; + expect(htmlView.render).toHaveBeenCalledOnce(); }); it('should set the text/html content type', () => { - response.headers.should.have.property('content-type', 'text/html;charset=utf-8'); + expect(response.headers).toHaveProperty('content-type', 'text/html;charset=utf-8'); }); it('should indicate Accept in the Vary header', () => { - response.headers.should.have.property('vary', 'Accept'); + expect(response.headers).toHaveProperty('vary', 'Accept'); }); }); describe('receiving a request with an Accept header of text/turtle', () => { let response; - before((done) => { + beforeAll(async () => { resetAll(); - client.get('/my-datasource').set('Accept', 'text/turtle') - .end((error, res) => { response = res; done(error); }); + response = await client.get('/my-datasource').set('Accept', 'text/turtle'); }); it('should call the Turtle view', () => { - rdfView.render.should.have.been.calledOnce; + expect(rdfView.render).toHaveBeenCalledOnce(); }); it('should set the text/turtle content type', () => { - response.headers.should.have.property('content-type', 'text/turtle;charset=utf-8'); + expect(response.headers).toHaveProperty('content-type', 'text/turtle;charset=utf-8'); }); it('should indicate Accept in the Vary header', () => { - response.headers.should.have.property('vary', 'Accept'); + expect(response.headers).toHaveProperty('vary', 'Accept'); }); }); describe('receiving a request with an Accept header of text/n3', () => { let response; - before((done) => { + beforeAll(async () => { resetAll(); - client.get('/my-datasource').set('Accept', 'text/n3') - .end((error, res) => { response = res; done(error); }); + response = await client.get('/my-datasource').set('Accept', 'text/n3'); }); it('should call the Turtle view', () => { - rdfView.render.should.have.been.calledOnce; + expect(rdfView.render).toHaveBeenCalledOnce(); }); it('should set the text/n3 content type', () => { - response.headers.should.have.property('content-type', 'text/n3;charset=utf-8'); + expect(response.headers).toHaveProperty('content-type', 'text/n3;charset=utf-8'); }); it('should indicate Accept in the Vary header', () => { - response.headers.should.have.property('vary', 'Accept'); + expect(response.headers).toHaveProperty('vary', 'Accept'); }); }); }); describe('A QuadPatternFragmentsController instance without matching view', () => { let controller, client; - before(() => { + beforeAll(() => { let datasource = { - supportsQuery: sinon.stub().returns(true), - select: sinon.stub(), + supportsQuery: vi.fn().mockReturnValue(true), + select: vi.fn(), supportedFeatures: { triplePattern: true }, }; let router = { @@ -326,63 +325,61 @@ describe('QuadPatternFragmentsController', () => { routers: [router], datasources: { 'my-datasource': datasource }, }); - client = request.agent(new DummyServer(controller)); + client = request.agent(new DummyServer(controller), {}); }); describe('receiving a request without Accept header', () => { let response; - before((done) => { - client.get('/my-datasource') - .end((error, res) => { response = res; done(error); }); + beforeAll(async () => { + response = await client.get('/my-datasource'); }); it('should return status code 406', () => { - response.should.have.property('statusCode', 406); + expect(response).toHaveProperty('statusCode', 406); }); it('should set the text/plain content type', () => { - response.headers.should.have.property('content-type', 'text/plain;charset=utf-8'); + expect(response.headers).toHaveProperty('content-type', 'text/plain;charset=utf-8'); }); it('should indicate Accept in the Vary header', () => { - response.headers.should.have.property('vary', 'Accept'); + expect(response.headers).toHaveProperty('vary', 'Accept'); }); }); describe('receiving a request with an Accept header of text/html', () => { let response; - before((done) => { - client.get('/my-datasource').set('Accept', 'text/html') - .end((error, res) => { response = res; done(error); }); + beforeAll(async () => { + response = await client.get('/my-datasource').set('Accept', 'text/html'); }); it('should return status code 406', () => { - response.should.have.property('statusCode', 406); + expect(response).toHaveProperty('statusCode', 406); }); it('should set the text/plain content type', () => { - response.headers.should.have.property('content-type', 'text/plain;charset=utf-8'); + expect(response.headers).toHaveProperty('content-type', 'text/plain;charset=utf-8'); }); it('should indicate Accept in the Vary header', () => { - response.headers.should.have.property('vary', 'Accept'); + expect(response.headers).toHaveProperty('vary', 'Accept'); }); }); }); describe('A QuadPatternFragmentsController instance with a datasource that synchronously errors', () => { let controller, client, router, datasource, error, view; - before(() => { + beforeAll(() => { router = { - extractQueryParams: sinon.spy((request, query) => { + extractQueryParams: vi.fn((request, query) => { query.features.datasource = true; query.datasource = '/my-datasource'; }), }; error = new Error('datasource error'), datasource = { - supportsQuery: sinon.stub().returns(true), - select: sinon.stub().throws(error), + supportsQuery: vi.fn().mockReturnValue(true), + select: vi.fn(() => { throw error; }), supportedFeatures: { triplePattern: true }, }; view = new QuadPatternFragmentsRdfView({ dataFactory }), @@ -391,60 +388,62 @@ describe('QuadPatternFragmentsController', () => { views: [view], datasources: { '/my-datasource': datasource }, }); - client = request.agent(new DummyServer(controller)); + client = request.agent(new DummyServer(controller), {}); }); function resetAll() { - router.extractQueryParams.reset(); + router.extractQueryParams.mockClear(); } describe('receiving a request for a fragment', () => { - before((done) => { + beforeAll(async () => { resetAll(); - client.get('/my-datasource?a=b&c=d').end(done); + await client.get('/my-datasource?a=b&c=d'); }); it('should emit the error', () => { - expect(controller.error).to.equal(error); + expect(controller.error).toBe(error); }); }); }); describe('A QuadPatternFragmentsController instance with a datasource that asynchronously errors', () => { let controller, client, router, datasource, error, view; - before(() => { + beforeAll(() => { router = { - extractQueryParams: sinon.spy((request, query) => { + extractQueryParams: vi.fn((request, query) => { query.features.datasource = true; query.datasource = '/my-datasource'; }), }; error = new Error('datasource error'), datasource = { - supportsQuery: sinon.stub().returns(true), + supportsQuery: vi.fn().mockReturnValue(true), + // Mocks Datasource.select's own callback-based signature. + // eslint-disable-next-line promise/prefer-await-to-callbacks select: function (query, callback) { setImmediate(callback.bind(null, error)); }, supportedFeatures: { triplePattern: true }, }; view = new QuadPatternFragmentsRdfView({ dataFactory }), - view.render = sinon.stub(); // avoid writing a partial body + view.render = vi.fn(); // avoid writing a partial body controller = new QuadPatternFragmentsController({ routers: [router], views: [view], datasources: { 'my-datasource': datasource }, }); - client = request.agent(new DummyServer(controller)); + client = request.agent(new DummyServer(controller), {}); }); function resetAll() { - router.extractQueryParams.reset(); + router.extractQueryParams.mockClear(); } describe('receiving a request for a fragment', () => { - before((done) => { + beforeAll(async () => { resetAll(); - client.get('/my-datasource?a=b&c=d').end(done); + await client.get('/my-datasource?a=b&c=d'); }); it('should emit the error', () => { - expect(controller.error).to.equal(error); + expect(controller.error).toBe(error); }); }); }); diff --git a/packages/feature-qpf/test/mocha.opts b/packages/feature-qpf/test/mocha.opts deleted file mode 100644 index 7014624f..00000000 --- a/packages/feature-qpf/test/mocha.opts +++ /dev/null @@ -1,3 +0,0 @@ ---require ../../test/test-setup ---recursive ---timeout 500 diff --git a/packages/feature-qpf/test/routers/QuadPatternRouter-test.js b/packages/feature-qpf/test/routers/QuadPatternRouter-test.js index 05c9f37e..5b419f3d 100644 --- a/packages/feature-qpf/test/routers/QuadPatternRouter-test.js +++ b/packages/feature-qpf/test/routers/QuadPatternRouter-test.js @@ -1,15 +1,18 @@ /*! @license MIT ©2015-2016 Ruben Verborgh, Ghent University - imec */ + +import { describe, it, expect } from 'vitest'; +import { extractQueryParams } from '../../../../test/test-helpers'; let QuadPatternRouter = require('../../').routers.QuadPatternRouter; const dataFactory = require('n3').DataFactory; describe('QuadPatternRouter', () => { describe('The QuadPatternRouter module', () => { it('should be a function', () => { - QuadPatternRouter.should.be.a('function'); + expect(typeof QuadPatternRouter).toBe('function'); }); it('should be a QuadPatternRouter constructor', () => { - new QuadPatternRouter({}).should.be.an.instanceof(QuadPatternRouter); + expect(new QuadPatternRouter({})).toBeInstanceOf(QuadPatternRouter); }); }); @@ -223,7 +226,7 @@ describe('QuadPatternRouter', () => { { a: 1, features: { quadPattern: true }, graph: dataFactory.defaultGraph() }, ], ] - .forEach((args) => { test.extractQueryParams.apply(router, args); }); + .forEach((args) => { extractQueryParams(router, ...args); }); }); }); }); @@ -465,7 +468,7 @@ describe('QuadPatternRouter', () => { { a: 1, features: { quadPattern: true }, graph: dataFactory.namedNode('foo:bar') }, ], ] - .forEach((args) => { test.extractQueryParams.apply(router, args); }); + .forEach((args) => { extractQueryParams(router, ...args); }); }); }); }); diff --git a/packages/feature-qpf/test/views/quadpatternfragments/QuadPatternFragmentsRdfView-test.js b/packages/feature-qpf/test/views/quadpatternfragments/QuadPatternFragmentsRdfView-test.js index 6316f8c0..642d7405 100644 --- a/packages/feature-qpf/test/views/quadpatternfragments/QuadPatternFragmentsRdfView-test.js +++ b/packages/feature-qpf/test/views/quadpatternfragments/QuadPatternFragmentsRdfView-test.js @@ -1,4 +1,7 @@ /*! @license MIT ©2015-2016 Ruben Verborgh, Ghent University - imec */ + +import { describe, it, expect, beforeAll, vi } from 'vitest'; +import { createStreamCapture } from '../../../../../test/test-helpers'; let QuadPatternFragmentsRdfView = require('../../../').views.quadpatternfragments.QuadPatternFragmentsRdfView; let _ = require('lodash'), @@ -12,11 +15,11 @@ const dataFactory = N3.DataFactory; describe('QuadPatternFragmentsRdfView', () => { describe('The QuadPatternFragmentsRdfView module', () => { it('should be a function', () => { - QuadPatternFragmentsRdfView.should.be.a('function'); + expect(typeof QuadPatternFragmentsRdfView).toBe('function'); }); it('should be a QuadPatternFragmentsRdfView constructor', () => { - new QuadPatternFragmentsRdfView({ dataFactory }).should.be.an.instanceof(QuadPatternFragmentsRdfView); + expect(new QuadPatternFragmentsRdfView({ dataFactory })).toBeInstanceOf(QuadPatternFragmentsRdfView); }); }); @@ -67,16 +70,16 @@ describe('QuadPatternFragmentsRdfView', () => { describe('with an empty triple stream', () => { let results = AsyncIterator.empty(); - let response = test.createStreamCapture(); - before((done) => { + let response = createStreamCapture(); + beforeAll(() => new Promise((resolve) => { settings.results = results; - response.getHeader = sinon.stub().returns(format); - view.render(settings, {}, response, done); + response.getHeader = vi.fn().mockReturnValue(format); + view.render(settings, {}, response, resolve); results.setProperty('metadata', { totalCount: 1234 }); - }); + })); it('should only write data source metadata', () => { - response.buffer.should.equal(readAsset('empty-fragment')); + expect(response.buffer).toBe(readAsset('empty-fragment')); }); }); @@ -86,17 +89,17 @@ describe('QuadPatternFragmentsRdfView', () => { dataFactory.quad(dataFactory.namedNode('a'), dataFactory.namedNode('d'), dataFactory.namedNode('e'), dataFactory.defaultGraph()), dataFactory.quad(dataFactory.namedNode('f'), dataFactory.namedNode('g'), dataFactory.namedNode('h'), dataFactory.defaultGraph()), ]); - let response = test.createStreamCapture(); - before((done) => { + let response = createStreamCapture(); + beforeAll(() => new Promise((resolve) => { settings.results = new AsyncIterator.TransformIterator(); - response.getHeader = sinon.stub().returns(format); - view.render(settings, {}, response, done); + response.getHeader = vi.fn().mockReturnValue(format); + view.render(settings, {}, response, resolve); settings.results.setProperty('metadata', { totalCount: 1234 }); settings.results.source = results; - }); + })); it('should write data and metadata', () => { - response.buffer.should.equal(readAsset('basic-fragment')); + expect(response.buffer).toBe(readAsset('basic-fragment')); }); }); @@ -106,18 +109,18 @@ describe('QuadPatternFragmentsRdfView', () => { dataFactory.quad(dataFactory.namedNode('a'), dataFactory.namedNode('d'), dataFactory.namedNode('e'), dataFactory.defaultGraph()), dataFactory.quad(dataFactory.namedNode('f'), dataFactory.namedNode('g'), dataFactory.namedNode('h'), dataFactory.defaultGraph()), ]); - let response = test.createStreamCapture(); - before((done) => { + let response = createStreamCapture(); + beforeAll(() => new Promise((resolve) => { settings.results = results; - response.getHeader = sinon.stub().returns(format); - view.render(settings, {}, response, done); + response.getHeader = vi.fn().mockReturnValue(format); + view.render(settings, {}, response, resolve); setImmediate(() => { results.setProperty('metadata', { totalCount: 1234 }); }); - }); + })); it('should write data and metadata', () => { - response.buffer.should.equal(readAsset('basic-fragment-metadata-last')); + expect(response.buffer).toBe(readAsset('basic-fragment-metadata-last')); }); }); @@ -133,24 +136,24 @@ describe('QuadPatternFragmentsRdfView', () => { }, query: { limit: 100 }, }; - let response = test.createStreamCapture(); - before((done) => { + let response = createStreamCapture(); + beforeAll(() => new Promise((resolve) => { settings.results = results; - response.getHeader = sinon.stub().returns(format); - view.render(settings, {}, response, done); + response.getHeader = vi.fn().mockReturnValue(format); + view.render(settings, {}, response, resolve); results.setProperty('metadata', { totalCount: 1234 }); - }); + })); it('should write a first page link', () => { - response.buffer.should.contain('myfirst'); + expect(response.buffer).toContain('myfirst'); }); it('should write a next page link', () => { - response.buffer.should.contain('mynext'); + expect(response.buffer).toContain('mynext'); }); it('should not write a previous page link', () => { - response.buffer.should.not.contain('myprevious'); + expect(response.buffer).not.toContain('myprevious'); }); }); @@ -166,24 +169,24 @@ describe('QuadPatternFragmentsRdfView', () => { }, query: { limit: 100, offset: 1133 }, }; - let response = test.createStreamCapture(); - before((done) => { + let response = createStreamCapture(); + beforeAll(() => new Promise((resolve) => { settings.results = results; - response.getHeader = sinon.stub().returns(format); - view.render(settings, {}, response, done); + response.getHeader = vi.fn().mockReturnValue(format); + view.render(settings, {}, response, resolve); results.setProperty('metadata', { totalCount: 1234 }); - }); + })); it('should write a first page link', () => { - response.buffer.should.contain('myfirst'); + expect(response.buffer).toContain('myfirst'); }); it('should write a next page link', () => { - response.buffer.should.contain('mynext'); + expect(response.buffer).toContain('mynext'); }); it('should write a previous page link', () => { - response.buffer.should.contain('myprevious'); + expect(response.buffer).toContain('myprevious'); }); }); @@ -199,24 +202,24 @@ describe('QuadPatternFragmentsRdfView', () => { }, query: { limit: 100, offset: 1135 }, }; - let response = test.createStreamCapture(); - before((done) => { + let response = createStreamCapture(); + beforeAll(() => new Promise((resolve) => { settings.results = results; - response.getHeader = sinon.stub().returns(format); - view.render(settings, {}, response, done); + response.getHeader = vi.fn().mockReturnValue(format); + view.render(settings, {}, response, resolve); results.setProperty('metadata', { totalCount: 1234 }); - }); + })); it('should write a first page link', () => { - response.buffer.should.contain('myfirst'); + expect(response.buffer).toContain('myfirst'); }); it('should not write a next page link', () => { - response.buffer.should.not.contain('mynext'); + expect(response.buffer).not.toContain('mynext'); }); it('should write a previous page link', () => { - response.buffer.should.contain('myprevious'); + expect(response.buffer).toContain('myprevious'); }); }); }); diff --git a/packages/feature-summary/test/controllers/SummaryController-test.js b/packages/feature-summary/test/controllers/SummaryController-test.js index 30487008..4a1f5e1e 100644 --- a/packages/feature-summary/test/controllers/SummaryController-test.js +++ b/packages/feature-summary/test/controllers/SummaryController-test.js @@ -1,8 +1,10 @@ /*! @license MIT ©2015-2016 Ruben Verborgh, Ghent University - imec */ + +import { describe, it, expect, beforeAll } from 'vitest'; +import { DummyServer } from '../../../../test/DummyServer'; let SummaryController = require('../../lib/controllers/SummaryController').SummaryController; // changed to make tests pass, will be revised in follow up pr let request = require('supertest'), - DummyServer = require('../../../../test/DummyServer'), fs = require('fs'), path = require('path'); @@ -13,21 +15,21 @@ let dataFactory = require('n3').DataFactory; describe('SummaryController', () => { describe('The SummaryController module', () => { it('should be a function', () => { - SummaryController.should.be.a('function'); + expect(typeof SummaryController).toBe('function'); }); it('should be an SummaryController constructor', () => { - new SummaryController().should.be.an.instanceof(SummaryController); + expect(new SummaryController()).toBeInstanceOf(SummaryController); }); it('should create new SummaryController objects', () => { - new SummaryController().should.be.an.instanceof(SummaryController); + expect(new SummaryController()).toBeInstanceOf(SummaryController); }); }); describe('An SummaryController instance', () => { let controller, client; - before(() => { + beforeAll(() => { controller = new SummaryController({ views: [new SummaryRdfView({ dataFactory })], summaries: { dir: path.join(__dirname, '/../../../../test/assets') }, @@ -36,52 +38,47 @@ describe('SummaryController', () => { rdf: 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', }, }); - client = request.agent(new DummyServer(controller)); + client = request.agent(new DummyServer(controller), {}); }); - it('should correctly serve summary in Turtle', (done) => { - client.get('/summaries/summary').set('Accept', 'text/turtle').expect((response) => { - let summary = fs.readFileSync(path.join(__dirname, '/../../../../test/assets/summary.ttl'), 'utf8'); - controller.next.should.not.have.been.called; - response.should.have.property('statusCode', 200); - response.headers.should.have.property('content-type', 'text/turtle;charset=utf-8'); - response.headers.should.have.property('cache-control', 'public,max-age=604800'); - response.text.should.equal(summary); - }).end(done); + it('should correctly serve summary in Turtle', async () => { + let response = await client.get('/summaries/summary').set('Accept', 'text/turtle'); + let summary = fs.readFileSync(path.join(__dirname, '/../../../../test/assets/summary.ttl'), 'utf8'); + expect(controller.next).not.toHaveBeenCalled(); + expect(response).toHaveProperty('statusCode', 200); + expect(response.headers).toHaveProperty('content-type', 'text/turtle;charset=utf-8'); + expect(response.headers).toHaveProperty('cache-control', 'public,max-age=604800'); + expect(response.text).toBe(summary); }); - it('should correctly serve summary in Trig', (done) => { - client.get('/summaries/summary').expect((response) => { - let summary = fs.readFileSync(path.join(__dirname, '/../../../../test/assets/summary.ttl'), 'utf8'); - controller.next.should.not.have.been.called; - response.should.have.property('statusCode', 200); - response.headers.should.have.property('content-type', 'application/trig;charset=utf-8'); - response.headers.should.have.property('cache-control', 'public,max-age=604800'); - response.text.should.equal(summary); - }).end(done); + it('should correctly serve summary in Trig', async () => { + let response = await client.get('/summaries/summary'); + let summary = fs.readFileSync(path.join(__dirname, '/../../../../test/assets/summary.ttl'), 'utf8'); + expect(controller.next).not.toHaveBeenCalled(); + expect(response).toHaveProperty('statusCode', 200); + expect(response.headers).toHaveProperty('content-type', 'application/trig;charset=utf-8'); + expect(response.headers).toHaveProperty('cache-control', 'public,max-age=604800'); + expect(response.text).toBe(summary); }); - it('should correctly serve summary in ntriples', (done) => { - client.get('/summaries/summary').set('Accept', 'application/n-triples').expect((response) => { - let summary = fs.readFileSync(path.join(__dirname, '/../../../../test/assets/summary.nt'), 'utf8'); - controller.next.should.not.have.been.called; - response.should.have.property('statusCode', 200); - response.headers.should.have.property('content-type', 'application/n-triples;charset=utf-8'); - response.headers.should.have.property('cache-control', 'public,max-age=604800'); - response.text.should.equal(summary); - }).end(done); + it('should correctly serve summary in ntriples', async () => { + let response = await client.get('/summaries/summary').set('Accept', 'application/n-triples'); + let summary = fs.readFileSync(path.join(__dirname, '/../../../../test/assets/summary.nt'), 'utf8'); + expect(controller.next).not.toHaveBeenCalled(); + expect(response).toHaveProperty('statusCode', 200); + expect(response.headers).toHaveProperty('content-type', 'application/n-triples;charset=utf-8'); + expect(response.headers).toHaveProperty('cache-control', 'public,max-age=604800'); + expect(response.text).toBe(summary); }); - it('should hand over to the next controller if no summary with that name is found', (done) => { - client.get('/summaries/unknown').expect((response) => { - controller.next.should.have.been.calledOnce; - }).end(done); + it('should hand over to the next controller if no summary with that name is found', async () => { + await client.get('/summaries/unknown'); + expect(controller.next).toHaveBeenCalledOnce(); }); - it('should hand over to the next controller for non-summary paths', (done) => { - client.get('/other').expect((response) => { - controller.next.should.have.been.calledOnce; - }).end(done); + it('should hand over to the next controller for non-summary paths', async () => { + await client.get('/other'); + expect(controller.next).toHaveBeenCalledOnce(); }); }); }); diff --git a/packages/feature-summary/test/mocha.opts b/packages/feature-summary/test/mocha.opts deleted file mode 100644 index 7014624f..00000000 --- a/packages/feature-summary/test/mocha.opts +++ /dev/null @@ -1,3 +0,0 @@ ---require ../../test/test-setup ---recursive ---timeout 500 diff --git a/test/DummyServer.js b/test/DummyServer.js index 9f80de1d..23d39f37 100644 --- a/test/DummyServer.js +++ b/test/DummyServer.js @@ -1,13 +1,14 @@ /*! @license MIT ©2015-2016 Ruben Verborgh, Ghent University - imec */ -const http = require('http'); +import * as http from 'http'; +import { vi } from 'vitest'; /* Dummy server that emulates LinkedDataFragmentsServer */ -function DummyServer(controller) { +export function DummyServer(controller) { const server = http.createServer(); - server.on('request', function (request, response) { + server.on('request', (request, response) => { // End the response if the controller did not handle the request - controller.next = sinon.spy(function (error) { + controller.next = vi.fn((error) => { controller.error = error; if (!response.headersSent) response.writeHead(error ? 500 : 200); @@ -18,5 +19,3 @@ function DummyServer(controller) { }); return server; } - -module.exports = DummyServer; diff --git a/test/test-helpers.js b/test/test-helpers.js new file mode 100644 index 00000000..c5318730 --- /dev/null +++ b/test/test-helpers.js @@ -0,0 +1,44 @@ +/*! @license MIT ©2013-2016 Ruben Verborgh, Ghent University - imec */ +import { it, expect } from 'vitest'; +import { parse as parseUrl } from 'url'; +import { Readable, Writable } from 'stream'; +import { once } from 'events'; + +// Generates an `it` block that verifies a router's extractQueryParams behavior +export function extractQueryParams(router, description, url, intent, query, expectedQuery) { + it(description + ' ' + intent, () => { + const result = router.extractQueryParams({ url: parseUrl(url, true) }, query); + expect(result, 'should not return anything').toBeUndefined(); + expect(query, 'should match the expected query').toEqual(expectedQuery); + }); +} + +// Creates a dummy HTTP response +export function createHttpResponse(contents, contentType) { + const response = new Readable(); + response._read = () => {}; + response.statusCode = 200; + response.headers = { 'content-type': contentType }; + response.abort = () => { response.aborted = true; }; + setImmediate(() => { response.push(contents); response.push(null); }); + return response; +} + +// Creates an in-memory stream +export function createStreamCapture() { + const stream = new Writable({ objectMode: true }); + stream.buffer = ''; + stream._write = (chunk, encoding, callback) => { + stream.buffer += chunk; + callback && callback(); + }; + return stream; +} + +// Counts the elements in a stream and resolves once it ends +export async function streamLength(stream) { + let length = 0; + stream.on('data', () => { length++; }); + await once(stream, 'end'); + return length; +} diff --git a/test/test-setup.js b/test/test-setup.js deleted file mode 100644 index 4880bce0..00000000 --- a/test/test-setup.js +++ /dev/null @@ -1,61 +0,0 @@ -/*! @license MIT ©2013-2016 Ruben Verborgh, Ghent University - imec */ - -const URL = require('url'), - Readable = require('stream').Readable, - Writable = require('stream').Writable; - -// Set up the sinon stubbing library -global.sinon = require('sinon'); - -// Set up the Chai assertion library -const chai = require('chai'); -global.test = {}; -global.expect = chai.expect; -global.should = chai.should(); -chai.use(require('sinon-chai')); - -// Test helper for the extractQueryParams function of routers -test.extractQueryParams = function (description, url, intent, query, expectedQuery) { - const router = this; - it(description + ' ' + intent, function () { - const result = router.extractQueryParams({ url: URL.parse(url, true) }, query); - expect(result).to.equal(undefined, 'should not return anything'); - expect(query).to.deep.equal(expectedQuery, 'should match the expected query'); - }); -}; - -// Creates a dummy HTTP response -test.createHttpResponse = function (contents, contentType) { - const response = new Readable(); - response._read = function () {}; - response.statusCode = 200; - response.headers = { 'content-type': contentType }; - response.abort = function () { response.aborted = true; }; - setImmediate(function () { response.push(contents); response.push(null); }); - return response; -}; - -// Creates an in-memory stream -test.createStreamCapture = function () { - const stream = new Writable({ objectMode: true }); - stream.buffer = ''; - stream._write = function (chunk, encoding, callback) { - this.buffer += chunk; - callback && callback(); - }; - return stream; -}; - -chai.use(function (chai, utils) { - // Checks whether the stream contains the given number of elements - chai.Assertion.addMethod('streamWithLength', function (expectedLength, callback) { - let stream = utils.flag(this, 'object'), length = 0, self = this; - stream.on('data', function () { length++; }); - stream.on('end', function () { - self.assert(length === expectedLength, - 'expected #{this} to be a stream of length ' + expectedLength + ', was ' + length, - 'expected #{this} not to be a stream of length ' + expectedLength); - callback(); - }); - }); -}); diff --git a/test/vitest-setup.js b/test/vitest-setup.js new file mode 100644 index 00000000..013cddb4 --- /dev/null +++ b/test/vitest-setup.js @@ -0,0 +1,3 @@ +// qejs reads require.main.filename, which Vitest never sets. +if (!process.mainModule) + process.mainModule = { filename: process.cwd() }; diff --git a/vitest.config.mts b/vitest.config.mts new file mode 100644 index 00000000..92ed70a4 --- /dev/null +++ b/vitest.config.mts @@ -0,0 +1,29 @@ +import { defineConfig } from 'vitest/config'; +import { fileURLToPath } from 'url'; + +const rootDir = fileURLToPath(new URL('.', import.meta.url)); + +export default defineConfig({ + resolve: { + // Prefer .ts so a require()/import never mixes compiled .js and its own + // .ts source into two module instances of the same class (breaks instanceof). + extensions: ['.ts', '.mjs', '.js', '.mts', '.jsx', '.tsx', '.json'], + alias: [ + // Bare `@ldf/x` resolves via package.json's "main" instead, a step the + // extensions list above doesn't cover. Force it onto .ts too, same reason. + { find: /^@ldf\/([^/]+)$/, replacement: `${rootDir}packages/$1/index.ts` }, + ], + }, + test: { + include: ['packages/*/test/**/*-test.js'], + environment: 'node', + testTimeout: 5000, + setupFiles: ['./test/vitest-setup.js'], + coverage: { + provider: 'v8', + reporter: ['text', 'lcov'], + include: ['packages/*/lib/**'], + exclude: ['**/*.html', '**/*.js.map'], + }, + }, +}); diff --git a/yarn.lock b/yarn.lock index 4cef2950..53faed3f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18,82 +18,17 @@ js-tokens "^4.0.0" picocolors "^1.1.1" -"@babel/code-frame@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e" - integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g== - dependencies: - "@babel/highlight" "^7.8.3" - -"@babel/core@^7.7.5": - version "7.8.6" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.6.tgz#27d7df9258a45c2e686b6f18b6c659e563aa4636" - integrity sha512-Sheg7yEJD51YHAvLEV/7Uvw95AeWqYPL3Vk3zGujJKIhJ+8oLw2ALaf3hbucILhKsgSoADOvtKRJuNVdcJkOrg== - dependencies: - "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.8.6" - "@babel/helpers" "^7.8.4" - "@babel/parser" "^7.8.6" - "@babel/template" "^7.8.6" - "@babel/traverse" "^7.8.6" - "@babel/types" "^7.8.6" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.1" - json5 "^2.1.0" - lodash "^4.17.13" - resolve "^1.3.2" - semver "^5.4.1" - source-map "^0.5.0" - -"@babel/generator@^7.8.6": - version "7.8.6" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.6.tgz#57adf96d370c9a63c241cd719f9111468578537a" - integrity sha512-4bpOR5ZBz+wWcMeVtcf7FbjcFzCp+817z2/gHNncIRcM9MmKzUhtWCYAq27RAfUrAFwb+OCG1s9WEaVxfi6cjg== - dependencies: - "@babel/types" "^7.8.6" - jsesc "^2.5.1" - lodash "^4.17.13" - source-map "^0.5.0" - -"@babel/helper-function-name@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz#eeeb665a01b1f11068e9fb86ad56a1cb1a824cca" - integrity sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA== - dependencies: - "@babel/helper-get-function-arity" "^7.8.3" - "@babel/template" "^7.8.3" - "@babel/types" "^7.8.3" - -"@babel/helper-get-function-arity@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz#b894b947bd004381ce63ea1db9f08547e920abd5" - integrity sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA== - dependencies: - "@babel/types" "^7.8.3" - -"@babel/helper-split-export-declaration@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz#31a9f30070f91368a7182cf05f831781065fc7a9" - integrity sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA== - dependencies: - "@babel/types" "^7.8.3" +"@babel/helper-string-parser@^7.29.7": + version "7.29.7" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz#7f0871d99824d23137d60f86fcf6130fd5a1b51f" + integrity sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw== "@babel/helper-validator-identifier@^7.25.9", "@babel/helper-validator-identifier@^7.29.7": version "7.29.7" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz#bd87084ced0c796ec46bda492de6e83d29e89fc2" integrity sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg== -"@babel/helpers@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.8.4.tgz#754eb3ee727c165e0a240d6c207de7c455f36f73" - integrity sha512-VPbe7wcQ4chu4TDQjimHv/5tj73qz88o12EPkO2ValS2QiQS/1F2SsjyIGNnAD0vF/nZS6Cf9i+vW6HIlnaR8w== - dependencies: - "@babel/template" "^7.8.3" - "@babel/traverse" "^7.8.4" - "@babel/types" "^7.8.3" - -"@babel/highlight@^7.10.4", "@babel/highlight@^7.8.3": +"@babel/highlight@^7.10.4": version "7.25.9" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.25.9.tgz#8141ce68fc73757946f983b343f1231f4691acc6" integrity sha512-llL88JShoCsth8fF8R4SJnIn+WLvR6ccFxu1H3FlMhDontdcmZWf2HgIZ7AIqV3Xcck1idlohrN4EUBQz6klbw== @@ -103,43 +38,25 @@ js-tokens "^4.0.0" picocolors "^1.0.0" -"@babel/parser@^7.7.5", "@babel/parser@^7.8.6": - version "7.8.6" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.6.tgz#ba5c9910cddb77685a008e3c587af8d27b67962c" - integrity sha512-trGNYSfwq5s0SgM1BMEB8hX3NDmO7EP2wsDGDexiaKMB92BaRpS+qZfpkMqUBhcsOTBwNy9B/jieo4ad/t/z2g== - -"@babel/template@^7.7.4", "@babel/template@^7.8.3", "@babel/template@^7.8.6": - version "7.8.6" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.6.tgz#86b22af15f828dfb086474f964dcc3e39c43ce2b" - integrity sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg== - dependencies: - "@babel/code-frame" "^7.8.3" - "@babel/parser" "^7.8.6" - "@babel/types" "^7.8.6" - -"@babel/traverse@^7.7.4", "@babel/traverse@^7.8.4", "@babel/traverse@^7.8.6": - version "7.8.6" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.6.tgz#acfe0c64e1cd991b3e32eae813a6eb564954b5ff" - integrity sha512-2B8l0db/DPi8iinITKuo7cbPznLCEk0kCxDoB9/N6gGNg/gxOXiR/IcymAFPiBwk5w6TtQ27w4wpElgp9btR9A== - dependencies: - "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.8.6" - "@babel/helper-function-name" "^7.8.3" - "@babel/helper-split-export-declaration" "^7.8.3" - "@babel/parser" "^7.8.6" - "@babel/types" "^7.8.6" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.13" - -"@babel/types@^7.8.3", "@babel/types@^7.8.6": - version "7.8.6" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.6.tgz#629ecc33c2557fcde7126e58053127afdb3e6d01" - integrity sha512-wqz7pgWMIrht3gquyEFPVXeXCti72Rm8ep9b5tQKz9Yg9LzJA3HxosF1SB3Kc81KD1A3XBkkVYtJvCKS2Z/QrA== +"@babel/parser@^7.29.7": + version "7.29.8" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.29.8.tgz#9653716a2f10c677b98fbc63d4bfb000c302cf17" + integrity sha512-E8lTAYNB1KW+FH+VGJuZM1ioAx2E6oVlvQFRrf5P8ZZmsiJXYAD9vTFV7yyEURNzgh1dFqMZuO6tUwcARbqFCA== dependencies: - esutils "^2.0.2" - lodash "^4.17.13" - to-fast-properties "^2.0.0" + "@babel/types" "^7.29.8" + +"@babel/types@^7.29.7", "@babel/types@^7.29.8": + version "7.29.8" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.29.8.tgz#1229eef31d85156d70fa3f4cd859376d0eaf6863" + integrity sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg== + dependencies: + "@babel/helper-string-parser" "^7.29.7" + "@babel/helper-validator-identifier" "^7.29.7" + +"@bcoe/v8-coverage@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-1.0.2.tgz#bbe12dca5b4ef983a0d0af4b07b9bc90ea0ababa" + integrity sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA== "@bergos/jsonparse@^1.4.0": version "1.4.1" @@ -286,7 +203,7 @@ enabled "2.0.x" kuler "^2.0.0" -"@eslint-community/eslint-utils@^4.2.0": +"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.10.1" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz#8911bd72b2c3640a543609e0400b8c4d2e7e7cb6" integrity sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg== @@ -356,20 +273,23 @@ dependencies: minipass "^7.0.4" -"@istanbuljs/load-nyc-config@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.0.0.tgz#10602de5570baea82f8afbfa2630b24e7a8cfe5b" - integrity sha512-ZR0rq/f/E4f4XcgnDvtMWXCUJpi8eO0rssVhmztsZqLIEFA9UUP9zmpE0VxlM+kv/E1ul2I876Fwil2ayptDVg== - dependencies: - camelcase "^5.3.1" - find-up "^4.1.0" - js-yaml "^3.13.1" - resolve-from "^5.0.0" +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== -"@istanbuljs/schema@^0.1.2": - version "0.1.2" - resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" - integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== +"@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.5.5": + version "1.5.5" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz#6912b00d2c631c0d15ce1a7ab57cd657f2a8f8ba" + integrity sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og== + +"@jridgewell/trace-mapping@^0.3.31": + version "0.3.31" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz#db15d6781c931f3a251a3dac39501c98a6082fd0" + integrity sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" "@lerna/add@4.0.0": version "4.0.0" @@ -1252,6 +1172,11 @@ dependencies: "@octokit/openapi-types" "^12.11.0" +"@oxc-project/types@=0.144.0": + version "0.144.0" + resolved "https://registry.yarnpkg.com/@oxc-project/types/-/types-0.144.0.tgz#7dfbfbfbbb9c24d4abeb6f9856a1eca02aff6468" + integrity sha512-nuhZIOLuI6TFQ32I/WnUx+SCPY7SdSKwgnFHydAuoS1+Z4BRcaP+RRJmGzl9lw+0OFF7UmaESf7KQRXaNLHypg== + "@pkgjs/parseargs@^0.11.0": version "0.11.0" resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" @@ -1278,6 +1203,86 @@ dependencies: "@types/node" "*" +"@rolldown/binding-android-arm64@1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.4.tgz#9ac390255ded738672ad1425bed6423453ff71fd" + integrity sha512-jHC2cnyKz5xU2fhECtFl8OZ83cYNt13GZQD+0uMJ/X3o+ijmd56okHhTUwxVSHPx1IRVIJEZ1/1pPzeLCU6XKA== + +"@rolldown/binding-darwin-arm64@1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.4.tgz#c63cad2f656b672782dd70894af895af9cba35c8" + integrity sha512-Dc5mPD8F5F/FS8i01syd7FTF6yB2fVthH/TRkjwJkzUK6EpoxHtqvZQP5Zwq80/5z19TWYHIg1KOHboCgVx/aQ== + +"@rolldown/binding-darwin-x64@1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.4.tgz#54f6305d6785793c63c1521a4da4412bf7d8e089" + integrity sha512-fpDm4oBo6SqLvWUYCmFhdde3U9KH2fRNNMeAnAPAIwxRL345xutL0EtEUcuoxsoazdJGv/MuDBQHlCDrtbvqOg== + +"@rolldown/binding-freebsd-x64@1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.4.tgz#c069a3ebd4a5dcfffd79a00f33c06bc242d9566b" + integrity sha512-rSJoreDE/HoIzoaib6MTp5jQtCTdMHKIvItAKT/ImS6Y6Ww76oUaeMyp4Vc/fAgd/ehji068IxetHXAnqUwN9A== + +"@rolldown/binding-linux-arm-gnueabihf@1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.4.tgz#cff0d05a56e19f02443313f2abf73cf693173867" + integrity sha512-/jm8OGHgn7oGaJu3i/qZI9spUGcJ+y/lk43ttQ/iO1tOd9NissG6o97bighBCiL+BKRngmcDuR6ikfwYdJmVuQ== + +"@rolldown/binding-linux-arm64-gnu@1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.4.tgz#267605366ba2bf3146609417a6db99253943c96f" + integrity sha512-tIP06BeD9EqvECBrPZ+sqdPlYrT+aYaAiu1wYziVx5elRK/ftm33JxVDy2bXGbr6J0CrtirCkR87/X5a2euEng== + +"@rolldown/binding-linux-arm64-musl@1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.4.tgz#73d47bfdba2a72c16bfb271c23efb8949b2c2018" + integrity sha512-Ql1Q0EQqVThvn9VAVlwNzsUvbSFtCMGjLpRRi4pk5i7NZZ4n5ISiLMjHYtus4VQ2PvkSw24zyaCVsiS+sXPj1w== + +"@rolldown/binding-linux-ppc64-gnu@1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.4.tgz#3ba455c72d3e9efd973df59689d48e75ca6f7559" + integrity sha512-GjbjXD4XXfN19D0LZNbmiCBUoDiRACsYHr0yaIbbn8aFsXjHZifcYqu/W5Er5X2X990WjHXFrxarn5chzItorQ== + +"@rolldown/binding-linux-s390x-gnu@1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.4.tgz#2fddcb48eee12a620735c83a0056307b6ede2edb" + integrity sha512-p5WR0NOwaRmJ/B1b6IjEFLLivwEsf3PrdBIhRbhTCQisbo2SvHHpG4ELB/+FgQNnB88LTOF86upmJmbvZdQ2lw== + +"@rolldown/binding-linux-x64-gnu@1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.4.tgz#97fb91430f78e46f81d4fe82a049a8c47f4ece96" + integrity sha512-4/GyVjmhR+Tc6HLJvwc1sOhPqAZtySiSMesOZyX6JQ5XBxoTDEMKQzvo07NIK6nTon/SivlZqvhzvuVBNQhObQ== + +"@rolldown/binding-linux-x64-musl@1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.4.tgz#71ec9967b5ff546a6d5dda16d1c7a97e50bf647a" + integrity sha512-l9eeLsCNvPpmSXUej0etw/J1eqV0Jj1D5G/xG6YTijmE6dkv6E2QezgWbTfQk63v952DPqrjOCoiqxq7Bw0YUQ== + +"@rolldown/binding-openharmony-arm64@1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.4.tgz#1e19ab28fbdb009cb6d9503e3ff6cbeffd7225ae" + integrity sha512-e0F355MSTMm3+UOqtV3L24gFUp2N5m1f8L/7d56deik6va+AXdrt9F8LbzGpeWGWRbZEDq4m8NVnJDeBtf9DZg== + +"@rolldown/binding-win32-arm64-msvc@1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.4.tgz#9fad167d015c699f4375c2a1d04d1e52e4a32de4" + integrity sha512-AWLi0uBRYh6QlE7OKhiz+phZC0qwtij2QZmhmOdsLdFn64m7oMpooE9ICE3lhm9xMb4SpDo2WbHcxX1iFLFtqw== + +"@rolldown/binding-win32-x64-msvc@1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.4.tgz#7a5f2d3e886c357029332b53f38ad2042e4615c4" + integrity sha512-UwSDJOg3dqCAejWdxclJjCsh3Qq4vLYMDxmyHqo1btz3stK2VqgwNd3mm5tuIwzSlGIQ/1H9Hr+Zn09mrezNqQ== + +"@rolldown/pluginutils@^1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz#e3fcee093fbb5ce765e1ad088ff4de2889f6f9be" + integrity sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw== + +"@standard-schema/spec@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@standard-schema/spec/-/spec-1.1.0.tgz#a79b55dbaf8604812f52d140b2c9ab41bc150bb8" + integrity sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w== + "@tootallnate/once@1": version "1.1.2" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" @@ -1288,11 +1293,29 @@ resolved "https://registry.yarnpkg.com/@types/caseless/-/caseless-0.12.5.tgz#db9468cb1b1b5a925b8f34822f1669df0c5472f5" integrity sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg== +"@types/chai@^5.2.2": + version "5.2.3" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-5.2.3.tgz#8e9cd9e1c3581fa6b341a5aed5588eb285be0b4a" + integrity sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA== + dependencies: + "@types/deep-eql" "*" + assertion-error "^2.0.1" + "@types/color-name@^1.1.1": version "1.1.5" resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.5.tgz#3a3510c4e3661f7707c5ae9c67d726986e6e147d" integrity sha512-j2K5UJqGTxeesj6oQuGpMgifpT5k9HprgQd8D1Y0lOFqKHl3PJu5GMeS4Y5EgjS55AE6OQxf8mPED9uaGbf4Cg== +"@types/deep-eql@*": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@types/deep-eql/-/deep-eql-4.0.2.tgz#334311971d3a07121e7eb91b684a605e7eea9cbd" + integrity sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw== + +"@types/estree@^1.0.0": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.9.tgz#cf3f0e876d7bee15a93ab925b82bf570a3904a24" + integrity sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg== + "@types/http-link-header@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@types/http-link-header/-/http-link-header-1.0.1.tgz#411493fe06da4b9472fa4eeecc990ea92be8cc2a" @@ -1534,6 +1557,82 @@ "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" +"@vitest/coverage-v8@^4.1.10": + version "4.1.10" + resolved "https://registry.yarnpkg.com/@vitest/coverage-v8/-/coverage-v8-4.1.10.tgz#037cd5e7ea8a2f448f4c2e10db1411c2b0c927bd" + integrity sha512-IM49HmthevbgAO4anp1hwtoT9wYe59w0LR00gr+eagHE+ZJ5lK4sLPeO0ubgoJcwLk6dehU3R24N+FbEEKDc8g== + dependencies: + "@bcoe/v8-coverage" "^1.0.2" + "@vitest/utils" "4.1.10" + ast-v8-to-istanbul "^1.0.0" + istanbul-lib-coverage "^3.2.2" + istanbul-lib-report "^3.0.1" + istanbul-reports "^3.2.0" + magicast "^0.5.2" + obug "^2.1.1" + std-env "^4.0.0-rc.1" + tinyrainbow "^3.1.0" + +"@vitest/expect@4.1.10": + version "4.1.10" + resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-4.1.10.tgz#799c06fc44bb0cf7e2784137b627c5cc173285d4" + integrity sha512-YsCn+qAk1GWjQOWFEsEcL2gNQ0zmVmQu3T03qP6UyjhtmdtwtbuI+DASn/7iQB3HGTXkdBwGddzxPlmiql5vlA== + dependencies: + "@standard-schema/spec" "^1.1.0" + "@types/chai" "^5.2.2" + "@vitest/spy" "4.1.10" + "@vitest/utils" "4.1.10" + chai "^6.2.2" + tinyrainbow "^3.1.0" + +"@vitest/mocker@4.1.10": + version "4.1.10" + resolved "https://registry.yarnpkg.com/@vitest/mocker/-/mocker-4.1.10.tgz#2413987ab4cd7fa1c2b614b404c407bf6ad1ead1" + integrity sha512-v0xaezt+DKEmKfaxg133ldzADrwLGd7Ze1MfQQTYfvs8OqZIwbxyxaYURivwV7sWy5fqn3rH5uOrSp07bp44Ow== + dependencies: + "@vitest/spy" "4.1.10" + estree-walker "^3.0.3" + magic-string "^0.30.21" + +"@vitest/pretty-format@4.1.10": + version "4.1.10" + resolved "https://registry.yarnpkg.com/@vitest/pretty-format/-/pretty-format-4.1.10.tgz#75542e7273a08cc10fd4d8dad4e3eb1f16cd958c" + integrity sha512-W1HsjSH4MXQ9YfmmhLAoIYf1HRfekQCGngeIgcei6MP5QQGWUe0gkopdZQaVCFO+JDJMrAJGwa5pRpNpvy4P8Q== + dependencies: + tinyrainbow "^3.1.0" + +"@vitest/runner@4.1.10": + version "4.1.10" + resolved "https://registry.yarnpkg.com/@vitest/runner/-/runner-4.1.10.tgz#febf0a21a9168421422d1955370e606feab60355" + integrity sha512-IKI6kpIH+LmpROplyLwBBaCfMgOZOMsygVa6BARD6ahA04VRuJSa6OaVG7kRvSEMD870Vd91rSSw0eegtWyLGg== + dependencies: + "@vitest/utils" "4.1.10" + pathe "^2.0.3" + +"@vitest/snapshot@4.1.10": + version "4.1.10" + resolved "https://registry.yarnpkg.com/@vitest/snapshot/-/snapshot-4.1.10.tgz#7e3e9fec7d4d47232e493cfdcbd2170de4371c04" + integrity sha512-xRkfOT1qpTAi/Ti4Y1LtfRc3kEuqxGw59eN2jN9pRWMtS/XDevekhcFSqvQqjUNGksfjMJu3Y+oJ+4Ypn2OaJw== + dependencies: + "@vitest/pretty-format" "4.1.10" + "@vitest/utils" "4.1.10" + magic-string "^0.30.21" + pathe "^2.0.3" + +"@vitest/spy@4.1.10": + version "4.1.10" + resolved "https://registry.yarnpkg.com/@vitest/spy/-/spy-4.1.10.tgz#5c0bfa97b56bba9e37403c976db776ff6ab56f65" + integrity sha512-PLf/Ugvoq5wO/b4rwYCR1h2PSIdXz7wnkQFMiUpLdtM7l6pqVFcQIBEHyT1+l+cj7mNwAfZHzqXqDyjvOuwbDw== + +"@vitest/utils@4.1.10": + version "4.1.10" + resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-4.1.10.tgz#ffc71055f18bfccb1fd0586365ebc2824892e403" + integrity sha512-fy9am/HWxbaGt/Sawrp90vt6Y6jQwf1RX77cz3uwoJwJVMli/e1IEwRPnMNJ7vKfPTwo0diXifkpPvwH9v7nGA== + dependencies: + "@vitest/pretty-format" "4.1.10" + convert-source-map "^2.0.0" + tinyrainbow "^3.1.0" + JSONStream@^1.0.4: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" @@ -1638,11 +1737,6 @@ ajv@^8.0.1: json-schema-traverse "^1.0.0" require-from-string "^2.0.2" -ansi-colors@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== - ansi-colors@^4.1.1: version "4.1.3" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" @@ -1660,16 +1754,6 @@ ansi-regex@^2.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" integrity sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA== -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= - -ansi-regex@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.1.tgz#164daac87ab2d6f6db3a29875e2d1766582dabed" - integrity sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g== - ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" @@ -1680,7 +1764,7 @@ ansi-regex@^6.2.2: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.2.2.tgz#60216eea464d864597ce2832000738a0589650c1" integrity sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg== -ansi-styles@^3.2.0, ansi-styles@^3.2.1: +ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== @@ -1707,21 +1791,6 @@ ansi-styles@^6.1.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.3.tgz#c044d5dcc521a076413472597a1acb1f103c4041" integrity sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg== -anymatch@~3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" - integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -append-transform@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-2.0.0.tgz#99d9d29c7b38391e6f428d28ce136551f0b77e12" - integrity sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg== - dependencies: - default-require-extensions "^3.0.0" - aproba@^1.0.3: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" @@ -1732,11 +1801,6 @@ aproba@^2.0.0: resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.1.0.tgz#75500a190313d95c64e871e7e4284c6ac219f0b1" integrity sha512-tLIEcj5GuR2RSTnxNKdkK0dJ/GrC7P38sUkiDmDuHfsHmbagTFAxDVIBltoklXEVIQ/f14IL8IMJ5pn9Hez1Ew== -archy@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" - integrity sha1-+cjBN1fMHde8N5rHeyxipcKGjEA= - are-we-there-yet@~1.1.2: version "1.1.7" resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz#b15474a932adab4ff8a50d9adfa7e4e926f21146" @@ -1797,16 +1861,6 @@ array.prototype.flat@^1.2.3: define-properties "^1.1.3" es-abstract "^1.17.0-next.1" -array.prototype.map@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array.prototype.map/-/array.prototype.map-1.0.2.tgz#9a4159f416458a23e9483078de1106b2ef68f8ec" - integrity sha512-Az3OYxgsa1g7xDYp86l0nnN4bcmuEITGe1rbdEBVkrqkzMgDcbdQ2R7r41pNzti+4NMces3H8gMmuioZUilLgw== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" - es-array-method-boxes-properly "^1.0.0" - is-string "^1.0.4" - array.prototype.reduce@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/array.prototype.reduce/-/array.prototype.reduce-1.0.8.tgz#42f97f5078daedca687d4463fd3c05cbfd83da57" @@ -1866,10 +1920,19 @@ assert-plus@1.0.0, assert-plus@^1.0.0: resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= -assertion-error@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" - integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== +assertion-error@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-2.0.1.tgz#f641a196b335690b1070bf00b6e7593fec190bf7" + integrity sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA== + +ast-v8-to-istanbul@^1.0.0: + version "1.0.5" + resolved "https://registry.yarnpkg.com/ast-v8-to-istanbul/-/ast-v8-to-istanbul-1.0.5.tgz#708baeb6f5c879226d112a341ffa821c43881d2d" + integrity sha512-UPAgKJFSEGMWSDr3LX4tqnAb4f7KGT8O40Tyx8wbYmmZ/yn58lNCm8h3svs3eXgiGd5AXxz8NDOvXWvicq+rJA== + dependencies: + "@jridgewell/trace-mapping" "^0.3.31" + estree-walker "^3.0.3" + js-tokens "^10.0.0" astral-regex@^2.0.0: version "2.0.0" @@ -1940,11 +2003,6 @@ before-after-hook@^2.2.0: resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.3.tgz#c51e809c81a4e354084422b9b26bad88249c517c" integrity sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ== -binary-extensions@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" - integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow== - brace-expansion@^1.1.7: version "1.1.16" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.16.tgz#723d3a30c0558c225abc9fc479a73e14e26c3c2f" @@ -1967,18 +2025,6 @@ braces@^3.0.3: dependencies: fill-range "^7.1.1" -braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -browser-stdout@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" - integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== - buffer-from@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" @@ -2049,16 +2095,6 @@ cacache@^19.0.1: tar "^7.4.3" unique-filename "^4.0.0" -caching-transform@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/caching-transform/-/caching-transform-4.0.0.tgz#00d297a4206d71e2163c39eaffa8157ac0651f0f" - integrity sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA== - dependencies: - hasha "^5.0.0" - make-dir "^3.0.0" - package-hash "^4.0.0" - write-file-atomic "^3.0.0" - call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6" @@ -2113,7 +2149,7 @@ camelcase@^4.1.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= -camelcase@^5.0.0, camelcase@^5.3.1: +camelcase@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== @@ -2128,17 +2164,10 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -chai@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.2.0.tgz#760aa72cf20e3795e84b12877ce0e83737aa29e5" - integrity sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw== - dependencies: - assertion-error "^1.1.0" - check-error "^1.0.2" - deep-eql "^3.0.1" - get-func-name "^2.0.0" - pathval "^1.1.0" - type-detect "^4.0.5" +chai@^6.2.2: + version "6.2.2" + resolved "https://registry.yarnpkg.com/chai/-/chai-6.2.2.tgz#ae41b52c9aca87734505362717f3255facda360e" + integrity sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg== chalk@^2.4.2: version "2.4.2" @@ -2170,26 +2199,6 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== -check-error@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" - integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= - -chokidar@3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.1.tgz#c84e5b3d18d9a4d77558fef466b1bf16bbeb3450" - integrity sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg== - dependencies: - anymatch "~3.1.1" - braces "~3.0.2" - glob-parent "~5.1.0" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.3.0" - optionalDependencies: - fsevents "~2.1.2" - chownr@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" @@ -2227,24 +2236,6 @@ cli-width@^3.0.0: resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== -cliui@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" - integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== - dependencies: - string-width "^3.1.0" - strip-ansi "^5.2.0" - wrap-ansi "^5.1.0" - -cliui@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" - integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^6.2.0" - cliui@^7.0.2: version "7.0.4" resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" @@ -2353,11 +2344,6 @@ commander@~2.20.3: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" - integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= - compare-func@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-2.0.0.tgz#fb65e75edbddfd2e568554e8b5b05fff7a51fcb3" @@ -2515,12 +2501,10 @@ conventional-recommended-bump@^6.1.0: meow "^8.0.0" q "^1.5.1" -convert-source-map@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" - integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== - dependencies: - safe-buffer "~5.1.1" +convert-source-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" + integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== cookiejar@^2.1.2: version "2.1.2" @@ -2570,15 +2554,6 @@ cross-spawn@^5.0.1: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^7.0.0: - version "7.0.1" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.1.tgz#0ab56286e0f7c24e153d04cc2aa027e43a9a5d14" - integrity sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - cross-spawn@^7.0.2, cross-spawn@^7.0.6: version "7.0.6" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" @@ -2655,13 +2630,6 @@ dateformat@^3.0.0: resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== -debug@3.2.6: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - debug@4: version "4.3.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" @@ -2683,7 +2651,7 @@ debug@^4.0.1, debug@^4.3.3, debug@^4.3.4: dependencies: ms "^2.1.3" -debug@^4.1.0, debug@^4.1.1: +debug@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== @@ -2703,7 +2671,7 @@ decamelize-keys@^1.0.0, decamelize-keys@^1.1.0: decamelize "^1.1.0" map-obj "^1.0.0" -decamelize@^1.1.0, decamelize@^1.2.0: +decamelize@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= @@ -2718,25 +2686,11 @@ dedent@^0.7.0: resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA== -deep-eql@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" - integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== - dependencies: - type-detect "^4.0.0" - deep-is@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== -default-require-extensions@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-3.0.0.tgz#e03f93aac9b2b6443fc52e5e4a37b3ad9ad8df96" - integrity sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg== - dependencies: - strip-bom "^4.0.0" - defaults@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" @@ -2794,6 +2748,11 @@ detect-indent@^6.0.0: resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.1.0.tgz#592485ebbbf6b3b1ab2be175c8393d04ca0d57e6" integrity sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA== +detect-libc@^2.0.3: + version "2.1.2" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.1.2.tgz#689c5dcdc1900ef5583a4cb9f6d7b473742074ad" + integrity sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ== + dezalgo@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/dezalgo/-/dezalgo-1.0.4.tgz#751235260469084c132157dfa857f386d4c33d81" @@ -2802,11 +2761,6 @@ dezalgo@^1.0.0: asap "^2.0.0" wrappy "1" -diff@4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" - integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== - dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -2907,11 +2861,6 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" -emoji-regex@^7.0.1: - version "7.0.3" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" - integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== - emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -3013,23 +2962,6 @@ es-abstract@^1.17.0-next.1: string.prototype.trimleft "^2.1.1" string.prototype.trimright "^2.1.1" -es-abstract@^1.17.4: - version "1.17.5" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.5.tgz#d8c9d1d66c8981fb9200e2251d799eee92774ae9" - integrity sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg== - dependencies: - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - is-callable "^1.1.5" - is-regex "^1.0.5" - object-inspect "^1.7.0" - object-keys "^1.1.1" - object.assign "^4.1.0" - string.prototype.trimleft "^2.1.1" - string.prototype.trimright "^2.1.1" - es-abstract@^1.23.5, es-abstract@^1.23.9, es-abstract@^1.24.0, es-abstract@^1.24.2: version "1.24.2" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.24.2.tgz#2dbd38c180735ee983f77585140a2706a963ed9a" @@ -3105,18 +3037,10 @@ es-errors@^1.3.0: resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== -es-get-iterator@^1.0.2: - version "1.1.0" - resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.0.tgz#bb98ad9d6d63b31aacdc8f89d5d0ee57bcb5b4c8" - integrity sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ== - dependencies: - es-abstract "^1.17.4" - has-symbols "^1.0.1" - is-arguments "^1.0.4" - is-map "^2.0.1" - is-set "^2.0.1" - is-string "^1.0.5" - isarray "^2.0.5" +es-module-lexer@^2.0.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-2.3.1.tgz#5bf2df06999dbbe5f006a5f46a11fb9f5b7b391b" + integrity sha512-shc1dbU90Yl/xq1QrC7QRtfcwURZuVRfPhZbDoldJ1cn1gzDvBaBWlv0eFolj5+0znnPJz5TXLxsN77X/12KTA== es-object-atoms@^1.0.0, es-object-atoms@^1.1.1, es-object-atoms@^1.1.2: version "1.1.2" @@ -3156,17 +3080,12 @@ es-to-primitive@^1.3.0: is-date-object "^1.1.0" is-symbol "^1.1.1" -es6-error@^4.0.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d" - integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg== - escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== -escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5: +escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== @@ -3211,6 +3130,13 @@ eslint-plugin-import@^2.22.0: resolve "^1.17.0" tsconfig-paths "^3.9.0" +eslint-plugin-promise@^7.3.0: + version "7.3.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-7.3.0.tgz#7c61e117f5db8d7a300bd5143c15d1d828e4c124" + integrity sha512-6uGiOR0INuujr6PEQmeSSP7GbIMJ/ebEXXiEzb/nOj68LknH5Pxzb/AbZivmr6VE6TkTE8rTjRK9zhKpK6HsRA== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -3325,6 +3251,13 @@ estraverse@^5.1.0, estraverse@^5.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== +estree-walker@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-3.0.3.tgz#67c3e549ec402a487b4fc193d1953a524752340d" + integrity sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g== + dependencies: + "@types/estree" "^1.0.0" + esutils@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" @@ -3360,6 +3293,11 @@ execa@^5.0.0: signal-exit "^3.0.3" strip-final-newline "^2.0.0" +expect-type@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/expect-type/-/expect-type-1.4.0.tgz#24edf7f0cc69a44d008567ba4594ab96f3c3a3d6" + integrity sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA== + exponential-backoff@^3.1.1: version "3.1.3" resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.3.tgz#51cf92c1c0493c766053f9d3abee4434c244d2f6" @@ -3456,13 +3394,6 @@ file-entry-cache@^6.0.1: dependencies: flat-cache "^3.0.4" -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - fill-range@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" @@ -3475,23 +3406,6 @@ filter-obj@^1.1.0: resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b" integrity sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ== -find-cache-dir@^3.2.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.0.tgz#4d74ed1fe9ef1731467ca24378e8f8f5c8b6ed11" - integrity sha512-PtXtQb7IrD8O+h6Cq1dbpJH5NzD8+9keN1zZ0YlpDzl1PwXEJEBj6u1Xa92t1Hwluoozd9TNKul5Hi2iqpsWwg== - dependencies: - commondir "^1.0.1" - make-dir "^3.0.2" - pkg-dir "^4.1.0" - -find-up@4.1.0, find-up@^4.0.0, find-up@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" @@ -3499,12 +3413,13 @@ find-up@^2.0.0, find-up@^2.1.0: dependencies: locate-path "^2.0.0" -find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== +find-up@^4.0.0, find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== dependencies: - locate-path "^3.0.0" + locate-path "^5.0.0" + path-exists "^4.0.0" flat-cache@^3.0.4: version "3.2.0" @@ -3515,13 +3430,6 @@ flat-cache@^3.0.4: keyv "^4.5.3" rimraf "^3.0.2" -flat@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.0.tgz#090bec8b05e39cba309747f1d588f04dbaf98db2" - integrity sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw== - dependencies: - is-buffer "~2.0.3" - flatted@^3.2.9: version "3.4.3" resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.4.3.tgz#be5c21e943b2d7a328bb23795ae28c98f0103a9e" @@ -3544,14 +3452,6 @@ for-each@^0.3.3, for-each@^0.3.5: dependencies: is-callable "^1.2.7" -foreground-child@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-2.0.0.tgz#71b32800c9f15aa8f2f83f4a6bd9bff35d861a53" - integrity sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA== - dependencies: - cross-spawn "^7.0.0" - signal-exit "^3.0.2" - foreground-child@^3.1.0: version "3.3.1" resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.3.1.tgz#32e8e9ed1b68a3497befb9ac2b6adf92a638576f" @@ -3595,13 +3495,6 @@ form-data@~2.3.2: combined-stream "^1.0.6" mime-types "^2.1.12" -formatio@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/formatio/-/formatio-1.1.1.tgz#5ed3ccd636551097383465d996199100e86161e9" - integrity sha512-cPh7is6k3d8tIUh+pnXXuAbD/uhSXGgqLPw0UrYpv5lfdJ+MMMSjx40JNpqP7Top9Nt25YomWEiRmkHbOvkCaA== - dependencies: - samsam "~1.1" - formidable@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/formidable/-/formidable-1.2.2.tgz#bf69aea2972982675f00865342b982986f6b8dd9" @@ -3612,11 +3505,6 @@ forwarded-parse@^2.1.0: resolved "https://registry.yarnpkg.com/forwarded-parse/-/forwarded-parse-2.1.0.tgz#1ae9d7a4be3af884f74d936d856f7d8c6abd0439" integrity sha512-as9a7Xelt0CvdUy7/qxrY73dZq2vMx49F556fwjjFrUyzq5uHHfeLgD2cCq/6P4ZvusGZzjD6aL2NdgGdS5Cew== -fromentries@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/fromentries/-/fromentries-1.2.0.tgz#e6aa06f240d6267f913cea422075ef88b63e7897" - integrity sha512-33X7H/wdfO99GdRLLgkjUrD4geAFdq/Uv0kl3HD4da6HDixd2GUg8Mw7dahLCV9r/EARkmtYBB6Tch4EEokFTQ== - fs-extra@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" @@ -3653,10 +3541,10 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@~2.1.2: - version "2.1.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" - integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== +fsevents@~2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== function-bind@^1.1.1: version "1.1.1" @@ -3712,21 +3600,11 @@ generator-function@^2.0.0: resolved "https://registry.yarnpkg.com/generator-function/-/generator-function-2.0.1.tgz#0e75dd410d1243687a0ba2e951b94eedb8f737a2" integrity sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g== -gensync@^1.0.0-beta.1: - version "1.0.0-beta.1" - resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" - integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg== - -get-caller-file@^2.0.1, get-caller-file@^2.0.5: +get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-func-name@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" - integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= - get-intrinsic@^1.2.4, get-intrinsic@^1.2.5, get-intrinsic@^1.2.6, get-intrinsic@^1.2.7, get-intrinsic@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz#743f0e3b6964a93a5491ed1bffaae054d7f98d01" @@ -3862,25 +3740,6 @@ glob-parent@^5.1.1, glob-parent@^5.1.2: dependencies: is-glob "^4.0.1" -glob-parent@~5.1.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" - integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== - dependencies: - is-glob "^4.0.1" - -glob@7.1.6, glob@^7.1.4, glob@^7.1.6: - version "7.1.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== - 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" - glob@^10.2.2: version "10.5.0" resolved "https://registry.yarnpkg.com/glob/-/glob-10.5.0.tgz#8ec0355919cd3338c28428a23d4f24ecc5fe738c" @@ -3905,10 +3764,17 @@ glob@^7.1.1, glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== +glob@^7.1.4, glob@^7.1.6: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + 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" globals@^13.6.0, globals@^13.9.0: version "13.24.0" @@ -3957,11 +3823,6 @@ graphemer@^1.4.0: resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== -growl@1.10.5: - version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" - integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== - handlebars@^4.7.7: version "4.7.9" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.9.tgz#6f139082ab58dc4e5a0e51efe7db5ae890d56a0f" @@ -4050,14 +3911,6 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" -hasha@^5.0.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/hasha/-/hasha-5.2.0.tgz#33094d1f69c40a4a6ac7be53d5fe3ff95a269e0c" - integrity sha512-2W+jKdQbAdSIrggA8Q35Br8qKadTrqCTC8+XZvBWepKDK6m9XkX6Iz1a2yh2KP01kzAR/dpuMeUnocoLYDcskw== - dependencies: - is-stream "^2.0.0" - type-fest "^0.8.0" - hasown@^2.0.2, hasown@^2.0.3, hasown@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.4.tgz#8c62d8cb90beb2aad5d0a5b67581ad9854c3f003" @@ -4075,11 +3928,6 @@ hdt@^3.3.2: nan "^2.27.0" rdf-string "^2.0.1" -he@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" - integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - hosted-git-info@^2.1.4: version "2.8.6" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.6.tgz#3a6e6d0324c5371fc8c7ba7175e1e5d14578724d" @@ -4342,11 +4190,6 @@ ip-address@^10.1.1: resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-10.3.1.tgz#929f9629d1724f7e1b7485ce89752f3675336a10" integrity sha512-1e9d3kb97NHJTIJDZW9rKqW2h6+dFa50Dy0fpPSMQp2ADje5gvKsXmdiK6dwY5t76TaTt5+P5N1Y/LoToIxP6g== -is-arguments@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3" - integrity sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA== - is-array-buffer@^3.0.4, is-array-buffer@^3.0.5: version "3.0.5" resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.5.tgz#65742e1e687bd2cc666253068fd8707fe4d44280" @@ -4384,13 +4227,6 @@ is-bigint@^1.1.0: dependencies: has-bigints "^1.0.2" -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - is-boolean-object@^1.2.1: version "1.2.2" resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.2.2.tgz#7067f47709809a393c71ff5bb3e135d8a9215d9e" @@ -4399,11 +4235,6 @@ is-boolean-object@^1.2.1: call-bound "^1.0.3" has-tostringtag "^1.0.2" -is-buffer@~2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623" - integrity sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A== - is-callable@^1.1.4, is-callable@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" @@ -4481,17 +4312,12 @@ is-fullwidth-code-point@^1.0.0: dependencies: number-is-nan "^1.0.0" -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w== - is-fullwidth-code-point@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== -is-generator-function@^1.0.10, is-generator-function@^1.0.7: +is-generator-function@^1.0.10: version "1.1.2" resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.1.2.tgz#ae3b61e3d5ea4e4839b90bad22b02335051a17d5" integrity sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA== @@ -4509,23 +4335,11 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: dependencies: is-extglob "^2.1.1" -is-glob@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" - integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== - dependencies: - is-extglob "^2.1.1" - is-lambda@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" integrity sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ== -is-map@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.1.tgz#520dafc4307bb8ebc33b813de5ce7c9400d644a1" - integrity sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw== - is-map@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.3.tgz#ede96b7fe1e270b3c4465e3a465658764926d62e" @@ -4600,11 +4414,6 @@ is-regex@^1.2.1: has-tostringtag "^1.0.2" hasown "^2.0.2" -is-set@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.1.tgz#d1604afdab1724986d30091575f54945da7e5f43" - integrity sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA== - is-set@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.3.tgz#8ab209ea424608141372ded6e0cb200ef1d9d01d" @@ -4634,7 +4443,7 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== -is-string@^1.0.4, is-string@^1.0.5: +is-string@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== @@ -4670,7 +4479,7 @@ is-text-path@^1.0.1: dependencies: text-extensions "^1.0.0" -is-typed-array@^1.1.13, is-typed-array@^1.1.14, is-typed-array@^1.1.15, is-typed-array@^1.1.3: +is-typed-array@^1.1.13, is-typed-array@^1.1.14, is-typed-array@^1.1.15: version "1.1.15" resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.15.tgz#4bfb4a45b61cee83a5a46fba778e4e8d59c0ce0b" integrity sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ== @@ -4702,11 +4511,6 @@ is-weakset@^2.0.3: call-bound "^1.0.3" get-intrinsic "^1.2.6" -is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" - integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -4737,43 +4541,15 @@ isstream@~0.1.2: resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= -istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.0.0-alpha.1: +istanbul-lib-coverage@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz#f5944a37c70b550b02a78a5c3b2055b280cec8ec" integrity sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg== -istanbul-lib-hook@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz#8f84c9434888cc6b1d0a9d7092a76d239ebf0cc6" - integrity sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ== - dependencies: - append-transform "^2.0.0" - -istanbul-lib-instrument@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.1.tgz#61f13ac2c96cfefb076fe7131156cc05907874e6" - integrity sha512-imIchxnodll7pvQBYOqUu88EufLCU56LMeFPZZM/fJZ1irYcYdqroaV+ACK1Ila8ls09iEYArp+nqyC6lW1Vfg== - dependencies: - "@babel/core" "^7.7.5" - "@babel/parser" "^7.7.5" - "@babel/template" "^7.7.4" - "@babel/traverse" "^7.7.4" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.0.0" - semver "^6.3.0" - -istanbul-lib-processinfo@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz#e1426514662244b2f25df728e8fd1ba35fe53b9c" - integrity sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw== - dependencies: - archy "^1.0.0" - cross-spawn "^7.0.0" - istanbul-lib-coverage "^3.0.0-alpha.1" - make-dir "^3.0.0" - p-map "^3.0.0" - rimraf "^3.0.0" - uuid "^3.3.3" +istanbul-lib-coverage@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" + integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== istanbul-lib-report@^3.0.0: version "3.0.0" @@ -4784,36 +4560,23 @@ istanbul-lib-report@^3.0.0: make-dir "^3.0.0" supports-color "^7.1.0" -istanbul-lib-source-maps@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz#75743ce6d96bb86dc7ee4352cf6366a23f0b1ad9" - integrity sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg== +istanbul-lib-report@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" + integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== dependencies: - debug "^4.1.1" istanbul-lib-coverage "^3.0.0" - source-map "^0.6.1" + make-dir "^4.0.0" + supports-color "^7.1.0" -istanbul-reports@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.0.0.tgz#d4d16d035db99581b6194e119bbf36c963c5eb70" - integrity sha512-2osTcC8zcOSUkImzN2EWQta3Vdi4WjjKw99P2yWx5mLnigAM0Rd5uYFn1cf2i/Ois45GkNjaoTqc5CxgMSX80A== +istanbul-reports@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.2.0.tgz#cb4535162b5784aa623cee21a7252cf2c807ac93" + integrity sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA== dependencies: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -iterate-iterator@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/iterate-iterator/-/iterate-iterator-1.0.1.tgz#1693a768c1ddd79c969051459453f082fe82e9f6" - integrity sha512-3Q6tudGN05kbkDQDI4CqjaBf4qf85w6W6GnuZDtUVYwKgtC1q8yxYX7CZed7N+tLzQqS6roujWvszf13T+n9aw== - -iterate-value@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/iterate-value/-/iterate-value-1.0.2.tgz#935115bd37d006a52046535ebc8d07e9c9337f57" - integrity sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ== - dependencies: - es-get-iterator "^1.0.2" - iterate-iterator "^1.0.1" - jackspeak@^3.1.2: version "3.4.3" resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.3.tgz#8833a9d89ab4acde6188942bd1c53b6390ed5a8a" @@ -4823,19 +4586,16 @@ jackspeak@^3.1.2: optionalDependencies: "@pkgjs/parseargs" "^0.11.0" +js-tokens@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-10.0.0.tgz#dffe7599b4a8bb7fe30aff8d0235234dffb79831" + integrity sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q== + js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@3.13.1: - version "3.13.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" - integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - js-yaml@^3.13.1: version "3.15.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.15.0.tgz#586e5214eafe3e893756a41e979b50d89d3e4a67" @@ -4849,11 +4609,6 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - json-buffer@3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" @@ -4901,13 +4656,6 @@ json5@^1.0.1: dependencies: minimist "^1.2.0" -json5@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.1.tgz#81b6cb04e9ba496f1c7005d07b4368a2638f90b6" - integrity sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ== - dependencies: - minimist "^1.2.0" - jsonfile@^6.0.1: version "6.1.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" @@ -5069,6 +4817,80 @@ libnpmpublish@^4.0.0: semver "^7.1.3" ssri "^8.0.1" +lightningcss-android-arm64@1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz#9a6841f88ae50fc83502903892b41af41bc2b907" + integrity sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg== + +lightningcss-darwin-arm64@1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz#c0f2c31c0bfd19fa4dd3f18e957a1f1a152097d6" + integrity sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg== + +lightningcss-darwin-x64@1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz#cb0705965acb538c6683949ce6925fb3cdf7c361" + integrity sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ== + +lightningcss-freebsd-x64@1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz#763538828b26bab2680dadafcc84ee78b0eb502b" + integrity sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg== + +lightningcss-linux-arm-gnueabihf@1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz#6862e3176a331aedbdec1ed352b4d7d0dd0784de" + integrity sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ== + +lightningcss-linux-arm64-gnu@1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz#c6a3a2ed15141daf6bdc2628930f8e39bdf473aa" + integrity sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg== + +lightningcss-linux-arm64-musl@1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz#7fa1334971fc82845f9827df6ef8a0b20914bac6" + integrity sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ== + +lightningcss-linux-x64-gnu@1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz#8b927862ea8c2bbc6831a46509244b50d9936e55" + integrity sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg== + +lightningcss-linux-x64-musl@1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz#0c525bb077dfd94404c059cfe42dad797e96aeaf" + integrity sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw== + +lightningcss-win32-arm64-msvc@1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz#850ee1103dac989cfab50e3ac22d1a69e394e63d" + integrity sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA== + +lightningcss-win32-x64-msvc@1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz#e343ae152eed3609dc6e11949d1a3bf39a1c946f" + integrity sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA== + +lightningcss@^1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/lightningcss/-/lightningcss-1.33.0.tgz#c08867d71a79385c6e190214fd72fef3e5f95f0b" + integrity sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA== + dependencies: + detect-libc "^2.0.3" + optionalDependencies: + lightningcss-android-arm64 "1.33.0" + lightningcss-darwin-arm64 "1.33.0" + lightningcss-darwin-x64 "1.33.0" + lightningcss-freebsd-x64 "1.33.0" + lightningcss-linux-arm-gnueabihf "1.33.0" + lightningcss-linux-arm64-gnu "1.33.0" + lightningcss-linux-arm64-musl "1.33.0" + lightningcss-linux-x64-gnu "1.33.0" + lightningcss-linux-x64-musl "1.33.0" + lightningcss-win32-arm64-msvc "1.33.0" + lightningcss-win32-x64-msvc "1.33.0" + lines-and-columns@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" @@ -5112,14 +4934,6 @@ locate-path@^2.0.0: p-locate "^2.0.0" path-exists "^3.0.0" -locate-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" - integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== - dependencies: - p-locate "^3.0.0" - path-exists "^3.0.0" - locate-path@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" @@ -5132,11 +4946,6 @@ lodash._reinterpolate@^3.0.0: resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= -lodash.flattendeep@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" - integrity sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI= - lodash.ismatch@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37" @@ -5180,7 +4989,7 @@ lodash.uniqwith@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniqwith/-/lodash.uniqwith-4.5.0.tgz#7a0cbf65f43b5928625a9d4d0dc54b18cadc7ef3" integrity sha1-egy/ZfQ7WShiWp1NDcVLGMrcfvM= -lodash@^4.0.0, lodash@^4.17.13: +lodash@^4.0.0: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== @@ -5195,13 +5004,6 @@ log-driver@^1.2.7: resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8" integrity sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg== -log-symbols@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" - integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== - dependencies: - chalk "^2.4.2" - logform@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/logform/-/logform-2.2.0.tgz#40f036d19161fc76b68ab50fdc7fe495544492f2" @@ -5213,11 +5015,6 @@ logform@^2.2.0: ms "^2.1.1" triple-beam "^1.3.0" -lolex@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/lolex/-/lolex-1.3.2.tgz#7c3da62ffcb30f0f5a80a2566ca24e45d8a01f31" - integrity sha512-YYp8cqz7/8eruZ15L1mzcPkvLYxipfdsWIDESvNdNmQP9o7TsDitRhNuV2xb7aFu2ofZngao1jiVrVZ842x4BQ== - loud-rejection@^1.0.0: version "1.6.0" resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" @@ -5253,6 +5050,22 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +magic-string@^0.30.21: + version "0.30.21" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.21.tgz#56763ec09a0fa8091df27879fd94d19078c00d91" + integrity sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ== + dependencies: + "@jridgewell/sourcemap-codec" "^1.5.5" + +magicast@^0.5.2: + version "0.5.4" + resolved "https://registry.yarnpkg.com/magicast/-/magicast-0.5.4.tgz#bbe38dfd6037670057f33abf22b8aa79d5e99d0a" + integrity sha512-llBEhWm1SacoRwgHUoQJYtwp4PBLF4faQi5TCpIGyGs9n4y5+juI0tDgyKIfpqxckRHaHzouUEph3THklWh03w== + dependencies: + "@babel/parser" "^7.29.7" + "@babel/types" "^7.29.7" + source-map-js "^1.2.1" + make-dir@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" @@ -5261,13 +5074,20 @@ make-dir@^2.1.0: pify "^4.0.1" semver "^5.6.0" -make-dir@^3.0.0, make-dir@^3.0.2: +make-dir@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.0.2.tgz#04a1acbf22221e1d6ef43559f43e05a90dbb4392" integrity sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w== dependencies: semver "^6.0.0" +make-dir@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" + integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== + dependencies: + semver "^7.5.3" + make-fetch-happen@^14.0.3: version "14.0.3" resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-14.0.3.tgz#d74c3ecb0028f08ab604011e0bc6baed483fcdcd" @@ -5483,13 +5303,6 @@ min-indent@^1.0.0: resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== -minimatch@3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - minimatch@^3.0.4, minimatch@^3.1.1: version "3.1.5" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.5.tgz#580c88f8d5445f2bd6aa8f3cadefa0de79fbd69e" @@ -5676,37 +5489,6 @@ mkdirp@^1.0.3, mkdirp@^1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -mocha@^8.0.0: - version "8.0.1" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.0.1.tgz#fe01f0530362df271aa8f99510447bc38b88d8ed" - integrity sha512-vefaXfdYI8+Yo8nPZQQi0QO2o+5q9UIMX1jZ1XMmK3+4+CQjc7+B0hPdUeglXiTlr8IHMVRo63IhO9Mzt6fxOg== - dependencies: - ansi-colors "4.1.1" - browser-stdout "1.3.1" - chokidar "3.3.1" - debug "3.2.6" - diff "4.0.2" - escape-string-regexp "1.0.5" - find-up "4.1.0" - glob "7.1.6" - growl "1.10.5" - he "1.2.0" - js-yaml "3.13.1" - log-symbols "3.0.0" - minimatch "3.0.4" - ms "2.1.2" - object.assign "4.1.0" - promise.allsettled "1.0.2" - serialize-javascript "3.0.0" - strip-json-comments "3.0.1" - supports-color "7.1.0" - which "2.0.2" - wide-align "1.1.3" - workerpool "6.0.0" - yargs "13.3.2" - yargs-parser "13.1.2" - yargs-unparser "1.6.0" - modify-values@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" @@ -5782,6 +5564,11 @@ nan@^2.27.0: resolved "https://registry.yarnpkg.com/nan/-/nan-2.28.0.tgz#126717fd359d5a03d3edf7c44e6ce9b707fb57f5" integrity sha512-fTsDz99OTq2sVePhGdp4qQhggZFtKr64ZNVyVajRKtMOkJxYekplBh577PiJB12v/D3s2E5cGtOI45LWp6rnLQ== +nanoid@^3.3.17: + version "3.3.18" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.18.tgz#f66a2de1199ffde0fcf21c8a5f13106b1c081913" + integrity sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w== + natural-compare-lite@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" @@ -5873,13 +5660,6 @@ node-gyp@^7.1.0: tar "^6.0.2" which "^2.0.2" -node-preload@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/node-preload/-/node-preload-0.2.1.tgz#c03043bb327f417a18fee7ab7ee57b408a144301" - integrity sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ== - dependencies: - process-on-spawn "^1.0.0" - nopt@^4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" @@ -5932,11 +5712,6 @@ normalize-package-data@^3.0.2: semver "^7.3.4" validate-npm-package-license "^3.0.1" -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - normalize-url@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" @@ -6052,40 +5827,6 @@ number-is-nan@^1.0.0: resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= -nyc@^15.0.0: - version "15.0.0" - resolved "https://registry.yarnpkg.com/nyc/-/nyc-15.0.0.tgz#eb32db2c0f29242c2414fe46357f230121cfc162" - integrity sha512-qcLBlNCKMDVuKb7d1fpxjPR8sHeMVX0CHarXAVzrVWoFrigCkYR8xcrjfXSPi5HXM7EU78L6ywO7w1c5rZNCNg== - dependencies: - "@istanbuljs/load-nyc-config" "^1.0.0" - "@istanbuljs/schema" "^0.1.2" - caching-transform "^4.0.0" - convert-source-map "^1.7.0" - decamelize "^1.2.0" - find-cache-dir "^3.2.0" - find-up "^4.1.0" - foreground-child "^2.0.0" - glob "^7.1.6" - istanbul-lib-coverage "^3.0.0" - istanbul-lib-hook "^3.0.0" - istanbul-lib-instrument "^4.0.0" - istanbul-lib-processinfo "^2.0.2" - istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^4.0.0" - istanbul-reports "^3.0.0" - js-yaml "^3.13.1" - make-dir "^3.0.0" - node-preload "^0.2.0" - p-map "^3.0.0" - process-on-spawn "^1.0.0" - resolve-from "^5.0.0" - rimraf "^3.0.0" - signal-exit "^3.0.2" - spawn-wrap "^2.0.0" - test-exclude "^6.0.0" - uuid "^3.3.3" - yargs "^15.0.2" - oauth-sign@~0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" @@ -6111,7 +5852,7 @@ object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object.assign@4.1.0, object.assign@^4.1.0: +object.assign@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== @@ -6156,6 +5897,11 @@ object.values@^1.1.1: function-bind "^1.1.1" has "^1.0.3" +obug@^2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/obug/-/obug-2.1.4.tgz#9090d8a548a522517915d2aa6aae907197ac6cf8" + integrity sha512-4a+OsYv9UktOJKE+l1A4OufDgdRF9PifWj+tJnHURo/P+WOxpG4GzUFL9qCalmWauao6ogiG+QvnCovwPoyAWA== + once@^1.3.0, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -6234,7 +5980,7 @@ p-limit@^1.1.0: dependencies: p-try "^1.0.0" -p-limit@^2.0.0, p-limit@^2.2.0: +p-limit@^2.2.0: version "2.2.2" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.2.tgz#61279b67721f5287aa1c13a9a7fbbc48c9291b1e" integrity sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ== @@ -6248,13 +5994,6 @@ p-locate@^2.0.0: dependencies: p-limit "^1.1.0" -p-locate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" - integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== - dependencies: - p-limit "^2.0.0" - p-locate@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" @@ -6267,13 +6006,6 @@ p-map-series@^2.1.0: resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-2.1.0.tgz#7560d4c452d9da0c07e692fdbfe6e2c81a2a91f2" integrity sha512-RpYIIK1zXSNEOdwxcfe7FdvGcs7+y5n8rifMhMNWvaxRNMPINJHF5GDeuVxWqnfrcHPSCnp7Oo5yNXHId9Av2Q== -p-map@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-3.0.0.tgz#d704d9af8a2ba684e2600d9a215983d4141a979d" - integrity sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ== - dependencies: - aggregate-error "^3.0.0" - p-map@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" @@ -6328,16 +6060,6 @@ p-waterfall@^2.1.1: dependencies: p-reduce "^2.0.0" -package-hash@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/package-hash/-/package-hash-4.0.0.tgz#3537f654665ec3cc38827387fc904c163c54f506" - integrity sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ== - dependencies: - graceful-fs "^4.1.15" - hasha "^5.0.0" - lodash.flattendeep "^4.4.0" - release-zalgo "^1.0.0" - package-json-from-dist@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz#4f1471a010827a86f94cfd9b0727e36d267de505" @@ -6484,10 +6206,10 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -pathval@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" - integrity sha1-uULm1L3mUwBe9rcTYd74cn0GReA= +pathe@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/pathe/-/pathe-2.0.3.tgz#3ecbec55421685b70a9da872b2cff3e1cbed1716" + integrity sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w== performance-now@^2.1.0: version "2.1.0" @@ -6499,17 +6221,12 @@ picocolors@^1.0.0, picocolors@^1.1.1: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== -picomatch@^2.0.4, picomatch@^2.0.7: - version "2.2.2" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" - integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== - picomatch@^2.3.1: version "2.3.2" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.2.tgz#5a942915e26b372dc0f0e6753149a16e6b1c5601" integrity sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA== -picomatch@^4.0.4: +picomatch@^4.0.3, picomatch@^4.0.4, picomatch@^4.0.5: version "4.0.5" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.5.tgz#51ea57a17d86f605f81039595fbc40ed06a55fab" integrity sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A== @@ -6541,7 +6258,7 @@ pkg-dir@^2.0.0: dependencies: find-up "^2.1.0" -pkg-dir@^4.1.0, pkg-dir@^4.2.0: +pkg-dir@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== @@ -6553,6 +6270,15 @@ possible-typed-array-names@^1.0.0, possible-typed-array-names@^1.1.0: resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz#93e3582bc0e5426586d9d07b79ee40fc841de4ae" integrity sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg== +postcss@^8.5.25: + version "8.5.26" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.5.26.tgz#6e75135780c7e10df3433bf2266c552d35c8c620" + integrity sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ== + dependencies: + nanoid "^3.3.17" + picocolors "^1.1.1" + source-map-js "^1.2.1" + pre-commit@^1.1.3: version "1.2.2" resolved "https://registry.yarnpkg.com/pre-commit/-/pre-commit-1.2.2.tgz#dbcee0ee9de7235e57f79c56d7ce94641a69eec6" @@ -6577,13 +6303,6 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -process-on-spawn@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/process-on-spawn/-/process-on-spawn-1.0.0.tgz#95b05a23073d30a17acfdc92a440efd2baefdc93" - integrity sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg== - dependencies: - fromentries "^1.2.0" - process@^0.11.10: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" @@ -6612,17 +6331,6 @@ promise-retry@^2.0.1: err-code "^2.0.2" retry "^0.12.0" -promise.allsettled@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/promise.allsettled/-/promise.allsettled-1.0.2.tgz#d66f78fbb600e83e863d893e98b3d4376a9c47c9" - integrity sha512-UpcYW5S1RaNKT6pd+s9jp9K9rlQge1UXKskec0j6Mmuq7UJCvlS2J2/s/yuPN8ehftf9HXMxWlKiPbGGUzpoRg== - dependencies: - array.prototype.map "^1.0.1" - define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" - function-bind "^1.1.1" - iterate-value "^1.0.0" - promzard@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/promzard/-/promzard-0.3.0.tgz#26a5d6ee8c7dee4cb12208305acfb93ba382a9ee" @@ -7044,13 +6752,6 @@ readdir-scoped-modules@^1.0.0: graceful-fs "^4.1.2" once "^1.3.0" -readdirp@~3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.3.0.tgz#984458d13a1e42e2e9f5841b129e162f369aff17" - integrity sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ== - dependencies: - picomatch "^2.0.7" - redent@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-2.0.0.tgz#c1b2007b42d57eb1389079b3c8333639d5e1ccaa" @@ -7108,13 +6809,6 @@ relative-to-absolute-iri@^1.0.5: resolved "https://registry.yarnpkg.com/relative-to-absolute-iri/-/relative-to-absolute-iri-1.0.5.tgz#9ddc91cad85898d10724864a62aacfb35caf5766" integrity sha512-sHpUlpF3fRWtTcBa8uBIwQ+Z/YnjDjerocV3q0FrP8T9oZ3z6d61I12ZcGlGr9jW2cQbcCkErCT9XLcN18ZLaQ== -release-zalgo@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/release-zalgo/-/release-zalgo-1.0.0.tgz#09700b7e5074329739330e535c5a90fb67851730" - integrity sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA= - dependencies: - es6-error "^4.0.1" - request@^2.88.0, request@^2.88.2: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" @@ -7151,11 +6845,6 @@ require-from-string@^2.0.2: resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== -require-main-filename@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" - integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== - resolve-cwd@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" @@ -7173,7 +6862,7 @@ resolve-from@^5.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== -resolve@^1.10.0, resolve@^1.3.2: +resolve@^1.10.0: version "1.15.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8" integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w== @@ -7212,13 +6901,36 @@ rimraf@^2.6.3: dependencies: glob "^7.1.3" -rimraf@^3.0.0, rimraf@^3.0.2: +rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== dependencies: glob "^7.1.3" +rolldown@~1.2.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/rolldown/-/rolldown-1.2.4.tgz#a70655fdd305b829bbc0fc598b3dd1765b4a87dc" + integrity sha512-rSr7irW0K7QRWzjdJXqZowkcRdDtjRduh43rBltnVKd0VFq839l1lJoDvGJb6gl7+4rTTCrPWu+YfujUL8Ug7w== + dependencies: + "@oxc-project/types" "=0.144.0" + "@rolldown/pluginutils" "^1.0.0" + optionalDependencies: + "@rolldown/binding-android-arm64" "1.2.4" + "@rolldown/binding-darwin-arm64" "1.2.4" + "@rolldown/binding-darwin-x64" "1.2.4" + "@rolldown/binding-freebsd-x64" "1.2.4" + "@rolldown/binding-linux-arm-gnueabihf" "1.2.4" + "@rolldown/binding-linux-arm64-gnu" "1.2.4" + "@rolldown/binding-linux-arm64-musl" "1.2.4" + "@rolldown/binding-linux-ppc64-gnu" "1.2.4" + "@rolldown/binding-linux-s390x-gnu" "1.2.4" + "@rolldown/binding-linux-x64-gnu" "1.2.4" + "@rolldown/binding-linux-x64-musl" "1.2.4" + "@rolldown/binding-openharmony-arm64" "1.2.4" + "@rolldown/binding-win32-arm64-msvc" "1.2.4" + "@rolldown/binding-win32-x64-msvc" "1.2.4" + run-async@^2.4.0: version "2.4.1" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" @@ -7286,22 +6998,12 @@ safe-regex-test@^1.1.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -samsam@1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/samsam/-/samsam-1.1.2.tgz#bec11fdc83a9fda063401210e40176c3024d1567" - integrity sha512-iVL7LibpM3tl4rQPweOXXrmjGegxx27flTOjQEZD3PXe4oZNFzuz6Si4mgleK/JWU/hyCvtV01RUovjvBEpDmw== - -samsam@~1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/samsam/-/samsam-1.1.3.tgz#9f5087419b4d091f232571e7fa52e90b0f552621" - integrity sha512-t9rCPskf50hZ53eH8Z+cSWD4LfJBac+8vSSuzi1Y2HzygyXxtAl0BaR3hr6iI6A+nFQbkmJNC/brQLNEeVnrmg== - sax@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== -"semver@2 || 3 || 4 || 5", semver@^5.4.1: +"semver@2 || 3 || 4 || 5": version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -7311,7 +7013,7 @@ semver@^5.6.0, semver@^5.7.1: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== -semver@^6.0.0, semver@^6.3.0: +semver@^6.0.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -7323,7 +7025,7 @@ semver@^7.1.1, semver@^7.3.4: dependencies: lru-cache "^6.0.0" -semver@^7.1.3, semver@^7.2.1, semver@^7.3.5, semver@^7.3.7: +semver@^7.1.3, semver@^7.2.1, semver@^7.3.5, semver@^7.3.7, semver@^7.5.3: version "7.8.5" resolved "https://registry.yarnpkg.com/semver/-/semver-7.8.5.tgz#39b646037dd50c14fb451e7e4cac58ed8b863f69" integrity sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA== @@ -7333,12 +7035,7 @@ semver@^7.3.2: resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== -serialize-javascript@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-3.0.0.tgz#492e489a2d77b7b804ad391a5f5d97870952548e" - integrity sha512-skZcHYw2vEX4bw90nAr2iTTsz6x2SrHEnfxgKYmZlvJYBEZrvbKtobJWlQ20zczKb3bsHHXXTYt48zBA7ni9cw== - -set-blocking@^2.0.0, set-blocking@~2.0.0: +set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== @@ -7445,6 +7142,11 @@ side-channel@^1.1.0: side-channel-map "^1.0.1" side-channel-weakmap "^1.0.2" +siginfo@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/siginfo/-/siginfo-2.0.0.tgz#32e76c70b79724e3bb567cb9d543eb858ccfaf30" + integrity sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g== + signal-exit@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" @@ -7472,21 +7174,6 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" -sinon-chai@^2.14.0: - version "2.14.0" - resolved "https://registry.yarnpkg.com/sinon-chai/-/sinon-chai-2.14.0.tgz#da7dd4cc83cd6a260b67cca0f7a9fdae26a1205d" - integrity sha512-9stIF1utB0ywNHNT7RgiXbdmen8QDCRsrTjw+G9TgKt1Yexjiv8TOWZ6WHsTPz57Yky3DIswZvEqX8fpuHNDtQ== - -sinon@^1.17.4: - version "1.17.7" - resolved "https://registry.yarnpkg.com/sinon/-/sinon-1.17.7.tgz#4542a4f49ba0c45c05eb2e9dd9d203e2b8efe0bf" - integrity sha512-M9rtyQxKfcTTdB64rpPSRaTzOvunb+HHPv/3PxvNPrEDnFSny95Pi6/3VoD471ody0ay0IHyzT3BErfcLXj6NA== - dependencies: - formatio "1.1.1" - lolex "1.3.2" - samsam "1.1.2" - util ">=0.10.3 <1" - slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" @@ -7560,10 +7247,10 @@ sort-keys@^4.0.0: dependencies: is-plain-obj "^2.0.0" -source-map@^0.5.0: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= +source-map-js@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46" + integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== source-map@^0.6.1, source-map@~0.6.1: version "0.6.1" @@ -7590,18 +7277,6 @@ spawn-sync@^1.0.15: concat-stream "^1.4.7" os-shim "^0.1.2" -spawn-wrap@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-2.0.0.tgz#103685b8b8f9b79771318827aa78650a610d457e" - integrity sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg== - dependencies: - foreground-child "^2.0.0" - is-windows "^1.0.2" - make-dir "^3.0.0" - rimraf "^3.0.0" - signal-exit "^3.0.2" - which "^2.0.1" - spdx-correct@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" @@ -7693,6 +7368,16 @@ stack-trace@0.0.x: resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" integrity sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA= +stackback@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/stackback/-/stackback-0.0.2.tgz#1ac8a0d9483848d1695e418b6d031a3c3ce68e3b" + integrity sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw== + +std-env@^4.0.0-rc.1: + version "4.2.0" + resolved "https://registry.yarnpkg.com/std-env/-/std-env-4.2.0.tgz#8ebe0ec60485668ab47227b312f4254cdf80c9d3" + integrity sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw== + stop-iteration-iterator@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz#f481ff70a548f6124d0312c3aa14cbfa7aa542ad" @@ -7741,14 +7426,6 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.2 || 2": - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" @@ -7758,15 +7435,6 @@ string-width@^1.0.1: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" -string-width@^3.0.0, string-width@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" - integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== - dependencies: - emoji-regex "^7.0.1" - is-fullwidth-code-point "^2.0.0" - strip-ansi "^5.1.0" - string-width@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" @@ -7878,20 +7546,6 @@ strip-ansi@^3.0.0, strip-ansi@^3.0.1: dependencies: ansi-regex "^2.0.0" -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= - dependencies: - ansi-regex "^3.0.0" - -strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" - integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== - dependencies: - ansi-regex "^4.1.0" - strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" @@ -7933,11 +7587,6 @@ strip-indent@^3.0.0: dependencies: min-indent "^1.0.0" -strip-json-comments@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7" - integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw== - strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" @@ -7977,13 +7626,6 @@ supertest@^6.0.0: methods "1.1.2" superagent "6.1.0" -supports-color@7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" - integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== - dependencies: - has-flag "^4.0.0" - supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -8061,15 +7703,6 @@ temp-write@^4.0.0: temp-dir "^1.0.0" uuid "^3.3.2" -test-exclude@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" - integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== - dependencies: - "@istanbuljs/schema" "^0.1.2" - glob "^7.1.4" - minimatch "^3.0.4" - text-extensions@^1.0.0: version "1.9.0" resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.9.0.tgz#1853e45fee39c945ce6f6c36b2d659b5aabc2a26" @@ -8112,7 +7745,17 @@ through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== -tinyglobby@^0.2.12: +tinybench@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/tinybench/-/tinybench-2.9.0.tgz#103c9f8ba6d7237a47ab6dd1dcff77251863426b" + integrity sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg== + +tinyexec@^1.0.2: + version "1.3.0" + resolved "https://registry.yarnpkg.com/tinyexec/-/tinyexec-1.3.0.tgz#aacc1dbb1d4e93e6ad8dd64944e09f9ad147a474" + integrity sha512-QKAl9m8gWWGHV8jZcPeym6j+XULi6tOf1mT83WYJ4Lk2ytW/uwAWkrP0uFsdoYMdueVJ0qs26wZ+23xeB4ibNQ== + +tinyglobby@^0.2.12, tinyglobby@^0.2.15, tinyglobby@^0.2.17: version "0.2.17" resolved "https://registry.yarnpkg.com/tinyglobby/-/tinyglobby-0.2.17.tgz#562a9a6c9eb2b3b123d39719f9af5bb44fcd7631" integrity sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g== @@ -8120,6 +7763,11 @@ tinyglobby@^0.2.12: fdir "^6.5.0" picomatch "^4.0.4" +tinyrainbow@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/tinyrainbow/-/tinyrainbow-3.1.1.tgz#c0168387d3d8d70b6b3c2c0936de5fee738cea20" + integrity sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw== + tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -8127,11 +7775,6 @@ tmp@^0.0.33: dependencies: os-tmpdir "~1.0.2" -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= - to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" @@ -8215,11 +7858,6 @@ type-check@^0.4.0, type-check@~0.4.0: dependencies: prelude-ls "^1.2.1" -type-detect@^4.0.0, type-detect@^4.0.5: - version "4.0.8" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" - integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== - type-fest@^0.18.0: version "0.18.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" @@ -8245,7 +7883,7 @@ type-fest@^0.6.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== -type-fest@^0.8.0, type-fest@^0.8.1: +type-fest@^0.8.1: version "0.8.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== @@ -8417,18 +8055,7 @@ util-promisify@^2.1.0: dependencies: object.getownpropertydescriptors "^2.0.3" -"util@>=0.10.3 <1": - version "0.12.5" - resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" - integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== - dependencies: - inherits "^2.0.3" - is-arguments "^1.0.4" - is-generator-function "^1.0.7" - is-typed-array "^1.1.3" - which-typed-array "^1.1.2" - -uuid@^3.3.2, uuid@^3.3.3: +uuid@^3.3.2: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== @@ -8462,6 +8089,45 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" +"vite@^6.0.0 || ^7.0.0 || ^8.0.0": + version "8.2.1" + resolved "https://registry.yarnpkg.com/vite/-/vite-8.2.1.tgz#6fc8d8bb843bd52353091fac978e194d4de5b31d" + integrity sha512-EU/eS7BH3XROHh2YnBefjM6DBKA6ZeMZEYQbj7NLWg5wHYlhB8B/Mayd5XsgWq+NFYccDOTemRpdETWR6Ka/lw== + dependencies: + lightningcss "^1.33.0" + picomatch "^4.0.5" + postcss "^8.5.25" + rolldown "~1.2.1" + tinyglobby "^0.2.17" + optionalDependencies: + fsevents "~2.3.3" + +vitest@^4.1.10: + version "4.1.10" + resolved "https://registry.yarnpkg.com/vitest/-/vitest-4.1.10.tgz#7e9285efe264b1167050b7a3a7ff34788e1b7afc" + integrity sha512-R9jUTe5S4Qb0HCd4TNqpC7oGcrMssMRGXLW80ubjWsW9VH5GF8y1Y0SFLY9AbqSk6nt0PnOx4H4WNJYZ13GUPw== + dependencies: + "@vitest/expect" "4.1.10" + "@vitest/mocker" "4.1.10" + "@vitest/pretty-format" "4.1.10" + "@vitest/runner" "4.1.10" + "@vitest/snapshot" "4.1.10" + "@vitest/spy" "4.1.10" + "@vitest/utils" "4.1.10" + es-module-lexer "^2.0.0" + expect-type "^1.3.0" + magic-string "^0.30.21" + obug "^2.1.1" + pathe "^2.0.3" + picomatch "^4.0.3" + std-env "^4.0.0-rc.1" + tinybench "^2.9.0" + tinyexec "^1.0.2" + tinyglobby "^0.2.15" + tinyrainbow "^3.1.0" + vite "^6.0.0 || ^7.0.0 || ^8.0.0" + why-is-node-running "^2.3.0" + wcwidth@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" @@ -8550,12 +8216,7 @@ which-collection@^1.0.2: is-weakmap "^2.0.2" is-weakset "^2.0.3" -which-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" - integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= - -which-typed-array@^1.1.16, which-typed-array@^1.1.19, which-typed-array@^1.1.2: +which-typed-array@^1.1.16, which-typed-array@^1.1.19: version "1.1.22" resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.22.tgz#8f3cc78aefb40b437346dd40a1dbfa5d1da43fe9" integrity sha512-fvO4ExWMFsqyhG3AiPAObMuY1lxaqgYcxbc49CNdWDDECOJNgQyvsOWVwbZc+qf3rzRtxojBK+CMEv0Ld5CYpw== @@ -8575,13 +8236,6 @@ which@1.2.x: dependencies: isexe "^2.0.0" -which@2.0.2, which@^2.0.1, which@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - which@^1.2.9, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" @@ -8589,6 +8243,13 @@ which@^1.2.9, which@^1.3.1: dependencies: isexe "^2.0.0" +which@^2.0.1, which@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + which@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/which/-/which-5.0.0.tgz#d93f2d93f79834d4363c7d0c23e00d07c466c8d6" @@ -8596,12 +8257,13 @@ which@^5.0.0: dependencies: isexe "^3.1.1" -wide-align@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== +why-is-node-running@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/why-is-node-running/-/why-is-node-running-2.3.0.tgz#a3f69a97107f494b3cdc3bdddd883a7d65cebf04" + integrity sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w== dependencies: - string-width "^1.0.2 || 2" + siginfo "^2.0.0" + stackback "0.0.2" wide-align@^1.1.0: version "1.1.5" @@ -8643,11 +8305,6 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= -workerpool@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.0.0.tgz#85aad67fa1a2c8ef9386a1b43539900f61d03d58" - integrity sha512-fU2OcNA/GVAJLLyKUoHkAgIhKb0JoCpSjLC/G2vYKxUjVmQwGbRVeoPJ1a8U4pnVofz4AQV5Y/NEw8oKqxEBtA== - "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" @@ -8657,24 +8314,6 @@ workerpool@6.0.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" - integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== - dependencies: - ansi-styles "^3.2.0" - string-width "^3.0.0" - strip-ansi "^5.0.0" - -wrap-ansi@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" - integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" @@ -8755,11 +8394,6 @@ xtend@~4.0.1: resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== -y18n@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" - integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== - y18n@^5.0.5: version "5.0.5" resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.5.tgz#8769ec08d03b1ea2df2500acef561743bbb9ab18" @@ -8790,14 +8424,6 @@ yaml@^1.10.0: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.3.tgz#76e407ed95c42684fb8e14641e5de62fe65bbcb3" integrity sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA== -yargs-parser@13.1.2, yargs-parser@^13.1.2: - version "13.1.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" - integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - yargs-parser@20.2.4: version "20.2.4" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" @@ -8810,61 +8436,11 @@ yargs-parser@^10.0.0: dependencies: camelcase "^4.1.0" -yargs-parser@^16.1.0: - version "16.1.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-16.1.0.tgz#73747d53ae187e7b8dbe333f95714c76ea00ecf1" - integrity sha512-H/V41UNZQPkUMIT5h5hiwg4QKIY1RPvoBV4XcjUbRM8Bk2oKqqyZ0DIEbTFZB0XjbtSPG8SAa/0DxCQmiRgzKg== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - yargs-parser@^20.2.2, yargs-parser@^20.2.3: version "20.2.6" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.6.tgz#69f920addf61aafc0b8b89002f5d66e28f2d8b20" integrity sha512-AP1+fQIWSM/sMiET8fyayjx/J+JmTPt2Mr0FkrgqB4todtfa53sOsrSAcIrJRD5XS20bKUwaDIuMkWKCEiQLKA== -yargs-unparser@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" - integrity sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== - dependencies: - flat "^4.1.0" - lodash "^4.17.15" - yargs "^13.3.0" - -yargs@13.3.2, yargs@^13.3.0: - version "13.3.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" - integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== - dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.1.2" - -yargs@^15.0.2: - version "15.1.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.1.0.tgz#e111381f5830e863a89550bd4b136bb6a5f37219" - integrity sha512-T39FNN1b6hCW4SOIk1XyTOWxtXdcen0t+XYrysQmChzSipvhBO8Bj0nK1ozAasdk24dNWuMZvr4k24nz+8HHLg== - dependencies: - cliui "^6.0.0" - decamelize "^1.2.0" - find-up "^4.1.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^4.2.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^16.1.0" - yargs@^16.2.0: version "16.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"