From d8f93ec5c3fe8e5e0e78f4c23c60f71ce3300e3a Mon Sep 17 00:00:00 2001 From: uttk-dev <97154037+uttk-dev@users.noreply.github.com> Date: Thu, 14 Sep 2023 13:34:05 +0900 Subject: [PATCH 01/14] =?UTF-8?q?chore:=20zenn-cli=20=E3=81=AE=E3=83=86?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=81=AE=E3=82=BF=E3=82=A4=E3=83=88=E3=83=AB?= =?UTF-8?q?=E3=82=92=E6=97=A5=E6=9C=AC=E8=AA=9E=E3=81=AB=E7=B5=B1=E4=B8=80?= =?UTF-8?q?=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/client/__tests__/lib/helper.test.ts | 6 +- .../src/common/__tests__/helper.test.ts | 20 ++--- .../server/__tests__/commands/help.test.ts | 4 +- .../server/__tests__/commands/init.test.ts | 12 +-- .../__tests__/commands/new-article.test.ts | 28 +++---- .../__tests__/commands/new-book.test.ts | 18 ++--- .../server/__tests__/commands/preview.test.ts | 18 ++--- .../server/__tests__/commands/version.test.ts | 4 +- .../src/server/__tests__/lib/helper.test.ts | 74 ++++++++++--------- .../src/server/__tests__/lib/log.test.ts | 10 +-- 10 files changed, 93 insertions(+), 101 deletions(-) diff --git a/packages/zenn-cli/src/client/__tests__/lib/helper.test.ts b/packages/zenn-cli/src/client/__tests__/lib/helper.test.ts index 39eed687..e087ef7c 100644 --- a/packages/zenn-cli/src/client/__tests__/lib/helper.test.ts +++ b/packages/zenn-cli/src/client/__tests__/lib/helper.test.ts @@ -1,14 +1,14 @@ import { encodeUrlPeriod, decodeUrlPeriod } from '../../lib/helper'; -describe('pair of encodeUrlPeriod and decodeUrlPeriod', () => { - test('return original text `a.b.c` throgh encoding and decoding', () => { +describe('encodeUrlPeriod と decodeUrlPeriod を使った処理のテスト', () => { + test('エンコードしてデコードすると元のテキスト"a.b.c"を返す', () => { const original = 'a.b.c'; const encoded = encodeUrlPeriod(original); expect(encoded).not.toContain('.'); const decoded = decodeUrlPeriod(encoded); expect(decoded).toEqual(original); }); - test('return original text `2E.` throgh encoding and decoding', () => { + test('エンコードしてデコードすると元のテキスト"2E."を返す', () => { const original = '2E.'; const encoded = encodeUrlPeriod(original); expect(encoded).not.toContain('.'); diff --git a/packages/zenn-cli/src/common/__tests__/helper.test.ts b/packages/zenn-cli/src/common/__tests__/helper.test.ts index 0ec6cad7..48b87155 100644 --- a/packages/zenn-cli/src/common/__tests__/helper.test.ts +++ b/packages/zenn-cli/src/common/__tests__/helper.test.ts @@ -1,30 +1,30 @@ import * as helper from '../helper'; -describe('validateSlug', () => { - test('should return true with 12 valid characters', () => { +describe('validateSlug() のテスト', () => { + test('12文字の有効な文字列には true を返す', () => { const result = helper.validateSlug('abcd-efg_123'); expect(result).toBe(true); }); - test('should return false with 12 invalid characters', () => { + test('12文字の無効な文字列には false を返す', () => { expect(helper.validateSlug('abcd-efg%12')).toBe(false); expect(helper.validateSlug('abcd-efg/12')).toBe(false); expect(helper.validateSlug('abcd-efg"12')).toBe(false); }); - test('should return false with 11 valid characters', () => { + test('11文字の有効な文字列には false を返す', () => { const result = helper.validateSlug('abcd-efg_12'); expect(result).toBe(false); }); - test('should return false with 50 valid characters', () => { + test('50文字の有効な文字列には false を返す', () => { const result = helper.validateSlug( 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwx' ); expect(result).toBe(true); }); - test('should return false with 51 valid characters', () => { + test('51文字の有効な文字列には false を返す', () => { const result = helper.validateSlug( 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxy' ); @@ -32,18 +32,18 @@ describe('validateSlug', () => { }); }); -describe('validateChapterSlug', () => { - test('should return true with 12 valid characters', () => { +describe('validateChapterSlug()のテスト', () => { + test('12文字の有効な文字列には true を返す', () => { const result = helper.validateSlug('abcd-efg_123'); expect(result).toBe(true); }); - test('should return false with single valid character', () => { + test('1文字の有効な文字列には false を返す', () => { const result = helper.validateSlug('a'); expect(result).toBe(false); }); - test('should return false with 51 valid characters', () => { + test('51文字の有効な文字列には false を返す', () => { const result = helper.validateSlug( 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxy' ); diff --git a/packages/zenn-cli/src/server/__tests__/commands/help.test.ts b/packages/zenn-cli/src/server/__tests__/commands/help.test.ts index 8de6a19e..fe16ec2b 100644 --- a/packages/zenn-cli/src/server/__tests__/commands/help.test.ts +++ b/packages/zenn-cli/src/server/__tests__/commands/help.test.ts @@ -1,12 +1,12 @@ import { exec } from '../../commands/help'; import { commandListText } from '../../lib/messages'; -describe('cli exec help', () => { +describe('helpコマンドのテスト', () => { beforeEach(() => { console.log = jest.fn(); }); - test('should log help message', () => { + test('ヘルプメッセージを表示する', () => { exec([]); expect(console.log).toHaveBeenCalledWith( expect.stringContaining(commandListText) diff --git a/packages/zenn-cli/src/server/__tests__/commands/init.test.ts b/packages/zenn-cli/src/server/__tests__/commands/init.test.ts index 3ca4ace1..72d3ea8c 100644 --- a/packages/zenn-cli/src/server/__tests__/commands/init.test.ts +++ b/packages/zenn-cli/src/server/__tests__/commands/init.test.ts @@ -3,7 +3,7 @@ import { exec } from '../../commands/init'; import * as helper from '../../lib/helper'; import { initHelpText } from '../../lib/messages'; -describe('cli exec init', () => { +describe('initコマンドのテスト', () => { beforeEach(() => { // mock jest.spyOn(helper, 'generateFileIfNotExist').mockImplementation(); @@ -11,7 +11,7 @@ describe('cli exec init', () => { console.error = jest.fn(); }); - test('should call generateFileIfNotExist for directories', () => { + test('ディレクトリに対して generateFileIfNotExist を実行する', () => { exec([]); expect(helper.generateFileIfNotExist).toHaveBeenCalledWith( expect.stringContaining(path.join(process.cwd(), 'articles/.keep')), @@ -23,7 +23,7 @@ describe('cli exec init', () => { ); }); - test('should call generateFileIfNotExist for .gitignore', () => { + test('.gitignore に対して generateFileIfNotExist を実行する', () => { exec([]); expect(helper.generateFileIfNotExist).toHaveBeenCalledWith( expect.stringContaining(path.join(process.cwd(), '.gitignore')), @@ -31,7 +31,7 @@ describe('cli exec init', () => { ); }); - test('should call generateFileIfNotExist for README', () => { + test('README に対して generateFileIfNotExist を実行する', () => { exec([]); expect(helper.generateFileIfNotExist).toHaveBeenCalledWith( expect.stringContaining(path.join(process.cwd(), 'README.md')), @@ -39,14 +39,14 @@ describe('cli exec init', () => { ); }); - test('should log success message', () => { + test('成功メッセージを表示する', () => { exec([]); expect(console.log).toHaveBeenCalledWith( expect.stringContaining('🎉 Done!') ); }); - test('should log help text with --help', () => { + test('--helpでもヘルプメッセージを表示する', () => { exec(['--help']); expect(console.log).toHaveBeenCalledWith( expect.stringContaining(initHelpText) diff --git a/packages/zenn-cli/src/server/__tests__/commands/new-article.test.ts b/packages/zenn-cli/src/server/__tests__/commands/new-article.test.ts index 212449a6..34b217b4 100644 --- a/packages/zenn-cli/src/server/__tests__/commands/new-article.test.ts +++ b/packages/zenn-cli/src/server/__tests__/commands/new-article.test.ts @@ -4,7 +4,7 @@ import * as helper from '../../lib/helper'; import * as Log from '../../lib/log'; import { newArticleHelpText } from '../../lib/messages'; -describe('cli exec new:article', () => { +describe('new:articleコマンドのテスト', () => { const expectedArticlesDirpath = path.join(process.cwd(), 'articles'); beforeEach(() => { @@ -14,7 +14,7 @@ describe('cli exec new:article', () => { console.log = jest.fn(); }); - test('should call generateFileIfNotExist with proper arguments', () => { + test('有効な引数に generateFileIfNotExist を実行する', () => { exec(['--emoji', '💭']); expect(helper.generateFileIfNotExist).toHaveBeenCalledWith( @@ -33,7 +33,7 @@ describe('cli exec new:article', () => { ); }); - test('should call generateFileIfNotExist with specified title', () => { + test('指定されたタイトルで generateFileIfNotExist を実行する', () => { exec(['--title', 'A"B/C']); expect(helper.generateFileIfNotExist).toHaveBeenCalledWith( expect.stringContaining(expectedArticlesDirpath), @@ -41,7 +41,7 @@ describe('cli exec new:article', () => { ); }); - test('should call generateFileIfNotExist with specified published value true', () => { + test('`published: true` で generateFileIfNotExist を実行する', () => { exec(['--published', 'true']); expect(helper.generateFileIfNotExist).toHaveBeenCalledWith( expect.stringContaining(expectedArticlesDirpath), @@ -49,7 +49,7 @@ describe('cli exec new:article', () => { ); }); - test('should call generateFileIfNotExist with specified published value false', () => { + test('`published: false` で generateFileIfNotExist を実行する', () => { exec(['--published', 'false']); expect(helper.generateFileIfNotExist).toHaveBeenCalledWith( expect.stringContaining(expectedArticlesDirpath), @@ -57,7 +57,7 @@ describe('cli exec new:article', () => { ); }); - test('should call generateFileIfNotExist with the path including slug', () => { + test('指定した slug を含むパスで generateFileIfNotExist を実行する', () => { const slug = 'example-article'; exec(['--slug', slug]); @@ -67,17 +67,7 @@ describe('cli exec new:article', () => { ); }); - test('should call generateFileIfNotExist with the path including slug', () => { - const slug = 'example-article'; - exec(['--slug', slug]); - - expect(helper.generateFileIfNotExist).toHaveBeenCalledWith( - expect.stringMatching(`${expectedArticlesDirpath}/${slug}.md`), - expect.stringContaining(`---`) - ); - }); - - test('should call generateFileIfNotExist with specified publication name', () => { + test('指定された Publication 名で generateFileIfNotExist を実行する', () => { exec(['--publication-name', 'myPublication']); expect(helper.generateFileIfNotExist).toHaveBeenCalledWith( expect.stringContaining(expectedArticlesDirpath), @@ -85,14 +75,14 @@ describe('cli exec new:article', () => { ); }); - test('should log help text with --help', () => { + test('--help オプションを渡すとヘルプメッセージを表示する', () => { exec(['--help']); expect(console.log).toHaveBeenCalledWith( expect.stringContaining(newArticleHelpText) ); }); - test('should log error with invalid slug', () => { + test('無効な slug が渡されたらエラーメッセージを表示する', () => { exec(['--slug', 'invalid/slug']); expect(Log.error).toHaveBeenCalledWith( expect.stringContaining( diff --git a/packages/zenn-cli/src/server/__tests__/commands/new-book.test.ts b/packages/zenn-cli/src/server/__tests__/commands/new-book.test.ts index 19ac01f9..0153a163 100644 --- a/packages/zenn-cli/src/server/__tests__/commands/new-book.test.ts +++ b/packages/zenn-cli/src/server/__tests__/commands/new-book.test.ts @@ -4,7 +4,7 @@ import * as helper from '../../lib/helper'; import * as Log from '../../lib/log'; import { newBookHelpText } from '../../lib/messages'; -describe('cli exec new:book', () => { +describe('new:book コマンドのテスト', () => { const expectedBooksDirpath = path.join(process.cwd(), 'books'); const anyConfigYamlPathRegex = new RegExp( `${expectedBooksDirpath}/[a-zA-Z0-9-_]+/config.yaml` @@ -20,7 +20,7 @@ describe('cli exec new:book', () => { console.log = jest.fn(); }); - test('should call generateFileIfNotExist for config.yaml with proper arguments', () => { + test('config.yaml のデフォルト値で generateFileIfNotExist を実行する', () => { exec([]); expect(helper.generateFileIfNotExist).toHaveBeenCalledWith( expect.stringMatching(anyConfigYamlPathRegex), @@ -40,7 +40,7 @@ describe('cli exec new:book', () => { ); }); - test('should call generateFileIfNotExist for chapter files with proper arguments', () => { + test('チャプターの初期値で generateFileIfNotExist を2回実行する', () => { const expectedChapterBody = [`---`, `title: ""`, `---`].join('\n'); exec([]); expect(helper.generateFileIfNotExist).toHaveBeenNthCalledWith( @@ -55,7 +55,7 @@ describe('cli exec new:book', () => { ); }); - test('should call generateFileIfNotExist with the path including slug', () => { + test('指定した slug を含むパスで generateFileIfNotExist を実装する', () => { const slug = 'example-book'; exec(['--slug', slug]); @@ -75,7 +75,7 @@ describe('cli exec new:book', () => { ); }); - test('should call generateFileIfNotExist for config.yaml with specified title', () => { + test('指定したタイトル文字列と config.yaml のパスで generateFileIfNotExist を実行する', () => { exec(['--title', 'A"B/C']); expect(helper.generateFileIfNotExist).toHaveBeenCalledWith( expect.stringMatching(anyConfigYamlPathRegex), @@ -83,7 +83,7 @@ describe('cli exec new:book', () => { ); }); - test('should call generateFileIfNotExist for config.yaml with specified published value true', () => { + test('`published: true` と config.yaml のパスで generateFileIfNotExist を実行する', () => { exec(['--published', 'true']); expect(helper.generateFileIfNotExist).toHaveBeenCalledWith( expect.stringMatching(anyConfigYamlPathRegex), @@ -91,7 +91,7 @@ describe('cli exec new:book', () => { ); }); - test('should call generateFileIfNotExist for config.yaml with specified published value false', () => { + test('`published: false` と config.yaml のパスで generateFileIfNotExist を実行する', () => { exec(['--published', 'false']); expect(helper.generateFileIfNotExist).toHaveBeenCalledWith( expect.stringMatching(anyConfigYamlPathRegex), @@ -99,14 +99,14 @@ describe('cli exec new:book', () => { ); }); - test('should log help text with --help', () => { + test('--help オプションを渡すとヘルプメッセージを表示する', () => { exec(['--help']); expect(console.log).toHaveBeenCalledWith( expect.stringContaining(newBookHelpText) ); }); - test('should log error with invalid slug', () => { + test('無効な slug が渡されたらエラーメッセージを表示する', () => { exec(['--slug', 'invalid/slug']); expect(Log.error).toHaveBeenCalledWith( expect.stringContaining( diff --git a/packages/zenn-cli/src/server/__tests__/commands/preview.test.ts b/packages/zenn-cli/src/server/__tests__/commands/preview.test.ts index 479946e8..d5a4b0e2 100644 --- a/packages/zenn-cli/src/server/__tests__/commands/preview.test.ts +++ b/packages/zenn-cli/src/server/__tests__/commands/preview.test.ts @@ -2,19 +2,19 @@ import { exec } from '../../commands/preview'; import { previewHelpText } from '../../lib/messages'; import * as server from '../../lib/server'; -describe('cli exec preview', () => { +describe('preview コマンドのテスト', () => { beforeEach(() => { console.log = jest.fn(); jest.spyOn(server, 'startServer').mockImplementation(); jest.spyOn(server, 'startLocalChangesWatcher').mockImplementation(); }); - test('should log help message with --help args', async () => { + test('--help オプションを渡すとヘルプメッセージを表示する', async () => { await exec(['--help']); expect(console.log).toHaveBeenCalledWith(previewHelpText); }); - test('should listen with port 8000', async () => { + test('8000 ポートでサーバーを起動する', async () => { await exec([]); expect(server.startServer).toHaveBeenCalledWith({ port: 8000, @@ -23,7 +23,7 @@ describe('cli exec preview', () => { }); }); - test('should listen with spcified port', async () => { + test('--port オプションで特定のポートを指定してサーバーを起動できる', async () => { await exec(['--port', '8001']); expect(server.startServer).toHaveBeenCalledWith({ port: 8001, @@ -32,7 +32,7 @@ describe('cli exec preview', () => { }); }); - test('should not open browser by default', async () => { + test('デフォルトではサーバー起動時にブラウザを開かない', async () => { await exec([]); expect(server.startServer).toHaveBeenCalledWith({ port: expect.anything(), @@ -41,7 +41,7 @@ describe('cli exec preview', () => { }); }); - test('should open browser if specified', async () => { + test('--open オプションを渡すとブラウザを開く', async () => { await exec(['--open']); expect(server.startServer).toHaveBeenCalledWith({ port: expect.anything(), @@ -50,7 +50,7 @@ describe('cli exec preview', () => { }); }); - test('should listen with passed hostname', async () => { + test('--host オプションで hostname を指定してサーバーを起動できる', async () => { await exec(['--host', '0.0.0.0']); expect(server.startServer).toHaveBeenCalledWith({ hostname: '0.0.0.0', @@ -60,7 +60,7 @@ describe('cli exec preview', () => { }); }); - test('should call startLocalChangesWatcher by default', async () => { + test('デフォルトでは startLocalChangesWatcher を実行する', async () => { await exec([]); expect(server.startLocalChangesWatcher).toHaveBeenCalledWith( undefined, @@ -68,7 +68,7 @@ describe('cli exec preview', () => { ); }); - test('should not call startLocalChangesWatcher if --no-watch specified', async () => { + test('--no-watch オプションを渡した場合は startLocalChangesWatcher を実行しない', async () => { await exec(['--no-watch']); expect(server.startLocalChangesWatcher).toHaveBeenCalledTimes(0); }); diff --git a/packages/zenn-cli/src/server/__tests__/commands/version.test.ts b/packages/zenn-cli/src/server/__tests__/commands/version.test.ts index 10dcd4ad..2904dd74 100644 --- a/packages/zenn-cli/src/server/__tests__/commands/version.test.ts +++ b/packages/zenn-cli/src/server/__tests__/commands/version.test.ts @@ -1,12 +1,12 @@ import { exec } from '../../commands/version'; -describe('cli exec version', () => { +describe('version コマンドのテスト', () => { console.log = jest.fn(); beforeEach(() => { console.log = jest.fn(); }); - test('should log version', () => { + test('バージョン情報をコンソールに出力する', () => { exec([]); expect(console.log).toHaveBeenCalledWith( expect.stringMatching(/^0\.[0-9.]+/) diff --git a/packages/zenn-cli/src/server/__tests__/lib/helper.test.ts b/packages/zenn-cli/src/server/__tests__/lib/helper.test.ts index 581af15d..cedee3cd 100644 --- a/packages/zenn-cli/src/server/__tests__/lib/helper.test.ts +++ b/packages/zenn-cli/src/server/__tests__/lib/helper.test.ts @@ -6,22 +6,22 @@ import { validateSlug } from '../../../common/helper'; const fixtureDirPath = path.resolve(__dirname, '..', 'fixtures'); -describe('generateSlug', () => { - test('should return valid slug', () => { +describe('generateSlug() のテスト', () => { + test('有効な slug を返す', () => { const str = helper.generateSlug(); const result = validateSlug(str); expect(result).toBe(true); }); }); -describe('getCurrentCliVersion', () => { - test('should return version number', () => { +describe('getCurrentCliVersion() のテスト', () => { + test('バージョン番号を返す', () => { const str = helper.getCurrentCliVersion(); expect(str).toMatch(/^0\.[0-9.]+/); }); }); -describe('getWorkingPath', () => { +describe('getWorkingPath() のテスト', () => { beforeEach(() => { // mock jest.spyOn(process, 'cwd').mockReturnValue('foo'); @@ -29,12 +29,12 @@ describe('getWorkingPath', () => { jest.spyOn(Log, 'error').mockImplementation(); }); - test('should return joined path properly', () => { + test('結合されたパスを返す', () => { expect(helper.getWorkingPath('bar')).toEqual('foo/bar'); expect(helper.getWorkingPath('/bar')).toEqual('foo/bar'); }); - test('should exit if ../ is included to prevent directory traversal', () => { + test('ディレクトリトラバーサルを防ぐために "../" が含まれている場合はエラーを出す', () => { helper.getWorkingPath('../foo'); expect(process.exit).toHaveBeenCalledWith(1); expect(Log.error).toHaveBeenCalledWith( @@ -43,61 +43,61 @@ describe('getWorkingPath', () => { }); }); -describe('getFileRaw', () => { - test('should return file content with valid path to file', () => { +describe('getFileRaw() のテスト', () => { + test('有効なパスの場合はファイル内容を返す', () => { const result = helper.getFileRaw(`${fixtureDirPath}/markdown-body-only.md`); expect(result).toContain(`# Hello\n\nHola!`); }); - test('should return null with invalid path', () => { + test('無効なパスの場合は `null` を返す', () => { const result = helper.getFileRaw('invalid-path'); expect(result).toBe(null); }); }); -describe('getImageRaw', () => { - test('should return file binary with valid path to image', () => { +describe('getImageRaw() のテスト', () => { + test('有効なパスの場合は画像のバイナリデータを返す', () => { const result = helper.getFileRaw(`${fixtureDirPath}/images/test.jpg`); expect(result?.length).toBeGreaterThanOrEqual(500); }); - test('should return null with invalid path', () => { + test('無効なパスの場合は `null` を返す', () => { const result = helper.getFileRaw('invalid-path'); expect(result).toBe(null); }); }); -describe('listDirnames', () => { - test('should return dir names in the dir', () => { +describe('listDirnames() のテスト', () => { + test('有効なパスの場合はディレクトリ名の配列を返す', () => { const result = helper.listDirnames(`${fixtureDirPath}/books`); expect(result).toEqual(['my-first-book', 'my-second-book']); }); - test('should return null with invalid path', () => { + test('無効なパスの場合は `null` を返す', () => { const result = helper.listDirnames('invalid-path'); expect(result).toBe(null); }); }); -describe('listFilenames', () => { - test('should return file names in the dir ', () => { +describe('listFilenames() のテスト', () => { + test('指定したディレクトリ内のファイル名の配列を返す', () => { const result = helper.listFilenames(`${fixtureDirPath}/articles`); // use sort() to ignore array position expect(result?.sort()).toEqual( ['my-first-post.md', 'my-second-post.md'].sort() ); }); - test('should return null with invalid path', () => { + test('無効なパスの場合は `null` を返す', () => { const result = helper.listFilenames('invalid-path'); expect(result).toBe(null); }); }); -describe('listFilenamesOrderByModified', () => { +describe('listFilenamesOrderByModified() のテスト', () => { function touchFile(articleFilename: string) { const fullpath = path.join(fixtureDirPath, `articles/${articleFilename}`); const currentTime = new Date().getTime() / 1000; // The value should be a Unix timestamp in seconds. For example, Date.now() returns milliseconds, so it should be divided by 1000 before passing it in. fs.utimesSync(fullpath, currentTime, currentTime); } - test('should return file names order by modified time', () => { + test('変更時刻順にファイル名を返す', () => { // update my-second-post.md mtime touchFile('my-second-post.md'); expect( @@ -110,20 +110,22 @@ describe('listFilenamesOrderByModified', () => { ).toEqual(['my-first-post.md', 'my-second-post.md']); }); - test('should return null with invalid path', () => { + test('無効なパスの場合は `null` を返す', () => { const result = helper.listFilenamesOrderByModified('invalid-path'); expect(result).toBe(null); }); }); -describe('getImageSize', () => { - const result = helper.getImageSize( - `${fixtureDirPath}/images/test-1036bytes.jpg` - ); - expect(result).toEqual(1036); +describe('getImageSize() のテスト', () => { + test('指定した画像のサイズ', () => { + const result = helper.getImageSize( + `${fixtureDirPath}/images/test-1036bytes.jpg` + ); + expect(result).toEqual(1036); + }); }); -describe('generateFileIfNotExist', () => { +describe('generateFileIfNotExist() のテスト', () => { const tempFilepath = path.join(process.cwd(), '.temp/test/example.md'); afterEach(() => { // clean up @@ -132,14 +134,14 @@ describe('generateFileIfNotExist', () => { }); }); - test('should generate file with specified body', () => { + test('指定された本文を持つファイルを生成する', () => { const body = 'Hello!'; helper.generateFileIfNotExist(tempFilepath, body); const result = fs.readFileSync(tempFilepath, 'utf8'); expect(result).toEqual(body); }); - test('should not overwrite if already exists', () => { + test('既に存在するファイルを上書きしない', () => { helper.generateFileIfNotExist(tempFilepath, 'Hello!'); // trying to write same file should throw error expect(() => @@ -151,35 +153,35 @@ describe('generateFileIfNotExist', () => { }); }); -describe('completeHtml', () => { +describe('completeHtml() のテスト', () => { beforeEach(() => { // process.cwdがfixturesディレクトリを指すようにする jest.spyOn(process, 'cwd').mockReturnValue(fixtureDirPath); }); - test('If src is a URL, validation succeeds.', () => { + test.only('src の値が URL なら検証に成功する', () => { const html = helper.completeHtml( '' ); expect(html).not.toContain('表示できません'); }); - test('If src is a valid path, validation succeeds.', () => { + test('src の値が有効なパスなら検証に成功する', () => { const html = helper.completeHtml(''); // fixtures/images/test.jpgを参照 expect(html).not.toContain('表示できません'); }); - test('If src is pointing nonexistent image, validation fails.', () => { + test('src に指定された画像がなければ "ファイルが存在しません" を出力する', () => { const html = helper.completeHtml(''); // fixtures/images/notexist.jpgを参照 expect(html).toContain('ファイルが存在しません'); }); - test('If src is a invalid path, validation fails.', () => { + test('src の値が無効なパスなら "表示できません" を出力する', () => { const html = helper.completeHtml(''); expect(html).toContain('表示できません'); }); - test('If src is a path with invalid extension, validation fails.', () => { + test('src の値が無効な拡張子なら "表示できません" を出力する', () => { const html = helper.completeHtml(''); expect(html).toContain('表示できません'); }); diff --git a/packages/zenn-cli/src/server/__tests__/lib/log.test.ts b/packages/zenn-cli/src/server/__tests__/lib/log.test.ts index 583ac987..04ba0f36 100644 --- a/packages/zenn-cli/src/server/__tests__/lib/log.test.ts +++ b/packages/zenn-cli/src/server/__tests__/lib/log.test.ts @@ -1,7 +1,7 @@ import * as Log from '../../lib/log'; import colors from 'colors/safe'; -describe('log.error', () => { +describe('Log のテスト', () => { beforeEach(() => { // mock console.log = jest.fn(); @@ -9,12 +9,12 @@ describe('log.error', () => { console.error = jest.fn(); }); - test('should log error message', () => { + test('エラーメッセージを表示する', () => { Log.error('message'); expect(console.error).toHaveBeenCalledWith(colors.red('error:'), 'message'); }); - test('should log warn message', () => { + test('警告メッセージを表示する', () => { Log.warn('message'); expect(console.warn).toHaveBeenCalledWith( colors.yellow('warn:'), @@ -22,7 +22,7 @@ describe('log.error', () => { ); }); - test('should log success message', () => { + test('成功メッセージを表示する', () => { Log.success('message'); expect(console.log).toHaveBeenCalledWith( colors.green('success:'), @@ -30,7 +30,7 @@ describe('log.error', () => { ); }); - test('should log created message', () => { + test('作成成功メッセージを表示する', () => { Log.created('filename'); expect(console.log).toHaveBeenCalledWith( 'created:', From 299d8afb0839ac3dcb3e44150257a9b730408c6c Mon Sep 17 00:00:00 2001 From: uttk-dev <97154037+uttk-dev@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:46:15 +0900 Subject: [PATCH 02/14] =?UTF-8?q?chore:=20zenn-model=20=E3=81=AE=E3=83=86?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=81=AE=E3=82=BF=E3=82=A4=E3=83=88=E3=83=AB?= =?UTF-8?q?=E3=82=92=E6=97=A5=E6=9C=AC=E8=AA=9E=E3=81=AB=E7=B5=B1=E4=B8=80?= =?UTF-8?q?=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zenn-model/__tests__/validator.test.ts | 226 ++++++++---------- 1 file changed, 106 insertions(+), 120 deletions(-) diff --git a/packages/zenn-model/__tests__/validator.test.ts b/packages/zenn-model/__tests__/validator.test.ts index 4c5d5974..b37eb583 100644 --- a/packages/zenn-model/__tests__/validator.test.ts +++ b/packages/zenn-model/__tests__/validator.test.ts @@ -4,7 +4,7 @@ import { validateBookChapter, } from '../src/index'; -describe('validateArticle', () => { +describe('validateArticle()のテスト', () => { const validArticle = { slug: 'example-slug', title: 'title', @@ -16,13 +16,13 @@ describe('validateArticle', () => { publication_name: 'team_publisher', }; - test('return no errors with valid article', () => { + test('有効な記事ならエラーを返さない', () => { const errors = validateArticle(validArticle); expect(errors).toEqual([]); }); - describe('validateItemSlug', () => { - test('return error with too short slug', () => { + describe('validateItemSlug()のテスト', () => { + test('短すぎる slug ならエラーを返す', () => { const errors = validateArticle({ ...validArticle, slug: 'too-short', @@ -30,7 +30,7 @@ describe('validateArticle', () => { expect(errors.length).toEqual(1); expect(errors[0].message).toContain('12〜50字の組み合わせ'); }); - test('return error with slug which includes invalid letters', () => { + test('slug に使えない文字が含まれている場合はエラーを返す', () => { const errors = validateArticle({ ...validArticle, slug: 'invalid/slug', @@ -40,8 +40,8 @@ describe('validateArticle', () => { }); }); - describe('validateMissingTitle', () => { - test('return error without title', () => { + describe('validateMissingTitle()のテスト', () => { + test('タイトルが無かったらエラーを返す', () => { const errors = validateArticle({ ...validArticle, title: undefined, @@ -51,7 +51,7 @@ describe('validateArticle', () => { 'title(タイトル)を文字列で入力してください' ); }); - test('return error with empty title', () => { + test('タイトルが空文字列ならエラーを返す', () => { const errors = validateArticle({ ...validArticle, title: '', @@ -63,8 +63,8 @@ describe('validateArticle', () => { }); }); - describe('validateTitleLength', () => { - test('return error with too long title', () => { + describe('validateTitleLength()のテスト', () => { + test('タイトルが長すぎる場合はエラーを返す', () => { const errors = validateArticle({ ...validArticle, title: @@ -75,8 +75,8 @@ describe('validateArticle', () => { }); }); - describe('validatePublishedStatus', () => { - test('return error if published is specified as string', () => { + describe('validatePublishedStatus()のテスト', () => { + test('published の値が string 型ならエラーを返す', () => { const errors = validateArticle({ ...validArticle, published: 'true' as any, @@ -86,7 +86,7 @@ describe('validateArticle', () => { 'published(公開設定)を true か false で指定してください(クオテーション " で囲まないでください)' ); }); - test('return error if published is specified as string', () => { + test('published の値が number 型ならエラーを返す', () => { const errors = validateArticle({ ...validArticle, published: 1 as any, @@ -98,8 +98,8 @@ describe('validateArticle', () => { }); }); - describe('validateArticleType', () => { - test('return error if articleType is neither tech or idea', () => { + describe('validateArticleType()のテスト', () => { + test('articleType が "tech" または "idea" 以外ならエラーを返す', () => { const errors = validateArticle({ ...validArticle, type: 'hello' as any, @@ -109,7 +109,7 @@ describe('validateArticle', () => { 'type(記事のタイプ)に tech もしくは idea を指定してください。技術記事の場合は tech を指定してください' ); }); - test('return error if articleType is missing', () => { + test('articleType が指定されてなければエラーを返す', () => { const errors = validateArticle({ ...validArticle, type: undefined, @@ -121,8 +121,8 @@ describe('validateArticle', () => { }); }); - describe('validateMissingEmoji', () => { - test('return error with undefined emoji', () => { + describe('validateMissingEmoji()のテスト', () => { + test('emoji の値が undefined ならエラーを返す', () => { const errors = validateArticle({ ...validArticle, emoji: undefined, @@ -132,7 +132,7 @@ describe('validateArticle', () => { 'アイキャッチとなる emoji(絵文字)を指定してください' ); }); - test('return error with empty emoji', () => { + test('emoji の値が空文字列ならエラーを返す', () => { const errors = validateArticle({ ...validArticle, emoji: '', @@ -144,8 +144,8 @@ describe('validateArticle', () => { }); }); - describe('validateEmojiFormat', () => { - test('return error with non emoji string for emoji property', () => { + describe('validateEmojiFormat()のテスト', () => { + test('絵文字以外の文字列ならエラーを返す', () => { const errors = validateArticle({ ...validArticle, emoji: '絵', @@ -156,8 +156,8 @@ describe('validateArticle', () => { ); }); }); - describe('validateMissingTopics', () => { - test('return error with undefined topics', () => { + describe('validateMissingTopics()のテスト', () => { + test('topics の値が undefined ならエラーを返す', () => { const errors = validateArticle({ ...validArticle, topics: undefined, @@ -167,7 +167,7 @@ describe('validateArticle', () => { 'topics(記事に関連する言語や技術)を配列で指定してください。' ); }); - test('return error with empty topics', () => { + test('topics の値が空配列ならエラーを返す', () => { const errors = validateArticle({ ...validArticle, topics: [], @@ -178,8 +178,8 @@ describe('validateArticle', () => { ); }); }); - describe('validateTooManyTopics', () => { - test('return error with 6 topics', () => { + describe('validateTooManyTopics()のテスト', () => { + test('topics の数が 6 以上ならエラーを返す', () => { const errors = validateArticle({ ...validArticle, topics: ['a', 'b', 'c', 'd', 'e', 'f'], @@ -188,8 +188,8 @@ describe('validateArticle', () => { expect(errors[0].message).toContain('topicsは最大5つまで指定できます'); }); }); - describe('validateInvalidTopicLetters', () => { - test('return error with topic including symbols', () => { + describe('validateInvalidTopicLetters()のテスト', () => { + test('topics に記号が含まれている場合はエラーを返す', () => { const errors = validateArticle({ ...validArticle, topics: ['a', 'vue.js'], @@ -200,8 +200,8 @@ describe('validateArticle', () => { ); }); }); - describe('validateTopicType', () => { - test('return error with number value', () => { + describe('validateTopicType()のテスト', () => { + test('topics の配列に number 型があればエラーを返す', () => { const errors = validateArticle({ ...validArticle, topics: [123] as any, @@ -211,7 +211,7 @@ describe('validateArticle', () => { 'topicsは全て文字列で指定してください' ); }); - test('return error with empty string topic', () => { + test('topics の配列に空文字列があればエラーを返す', () => { const errors = validateArticle({ ...validArticle, topics: [''], @@ -222,8 +222,8 @@ describe('validateArticle', () => { ); }); }); - describe('validateUseTags', () => { - test('return error with tag property', () => { + describe('validateUseTags()のテスト', () => { + test('tags プロパティを使っている場合はエラーを返す', () => { const errors = validateArticle({ ...validArticle, tags: ['a', 'b'], @@ -232,8 +232,8 @@ describe('validateArticle', () => { expect(errors[0].message).toContain('tagsではなくtopicsを使ってください'); }); }); - describe('validatePublicationName', () => { - test('return error with too short publication name', () => { + describe('validatePublicationName()のテスト', () => { + test('Publication 名が短すぎる場合はエラーを返す', () => { const errors = validateArticle({ ...validArticle, publication_name: 't', @@ -241,7 +241,7 @@ describe('validateArticle', () => { expect(errors.length).toEqual(1); expect(errors[0].message).toContain('2〜15字の組み合わせ'); }); - test('return error with publication name which includes invalid letters', () => { + test('Publication 名に使えない文字列が含まれる場合はエラーを返す', () => { const errors = validateArticle({ ...validArticle, publication_name: 'invalid/name', @@ -252,7 +252,7 @@ describe('validateArticle', () => { }); }); -describe('validateBook', () => { +describe('validateBook()のテスト', () => { const validBook = { slug: 'example-slug', title: 'title', @@ -268,34 +268,32 @@ describe('validateBook', () => { coverHeight: 700, }; - test('return no errors with valid book', () => { + test('有効な本であればエラーを返さない', () => { const errors = validateBook(validBook); expect(errors).toEqual([]); }); - describe('validateItemSlug', () => { - describe('validateItemSlug', () => { - test('return error with too short slug', () => { - const errors = validateBook({ - ...validBook, - slug: 'too-short', - }); - expect(errors.length).toEqual(1); - expect(errors[0].message).toContain('12〜50字の組み合わせ'); + describe('validateItemSlug()のテスト', () => { + test('slug が短すぎる場合はエラーを返す', () => { + const errors = validateBook({ + ...validBook, + slug: 'too-short', }); - test('return error with slug which includes invalid letters', () => { - const errors = validateBook({ - ...validBook, - slug: 'invalid/slug', - }); - expect(errors.length).toEqual(1); - expect(errors[0].message).toContain('半角英数字'); + expect(errors.length).toEqual(1); + expect(errors[0].message).toContain('12〜50字の組み合わせ'); + }); + test('slug に使えない文字列が含まれる場合はエラーを返す', () => { + const errors = validateBook({ + ...validBook, + slug: 'invalid/slug', }); + expect(errors.length).toEqual(1); + expect(errors[0].message).toContain('半角英数字'); }); }); - describe('validateMissingTitle', () => { - test('return error without title', () => { + describe('validateMissingTitle()のテスト', () => { + test('title が無い場合はエラーを返す', () => { const errors = validateBook({ ...validBook, title: undefined, @@ -305,7 +303,7 @@ describe('validateBook', () => { 'title(タイトル)を文字列で入力してください' ); }); - test('return error with empty title', () => { + test('title が空文字列の場合はエラーを返す', () => { const errors = validateBook({ ...validBook, title: '', @@ -317,8 +315,8 @@ describe('validateBook', () => { }); }); - describe('validateTitleLength', () => { - test('return error with too long title', () => { + describe('validateTitleLength()のテスト', () => { + test('title が長すぎる場合はエラーを返す', () => { const errors = validateBook({ ...validBook, title: @@ -329,8 +327,8 @@ describe('validateBook', () => { }); }); - describe('validatePublishedStatus', () => { - test('return error if published is specified as string', () => { + describe('validatePublishedStatus()のテスト', () => { + test('published の値が string 型の場合はエラーを返す', () => { const errors = validateBook({ ...validBook, published: 'true' as any, @@ -340,7 +338,7 @@ describe('validateBook', () => { 'published(公開設定)を true か false で指定してください(クオテーション " で囲まないでください)' ); }); - test('return error if published is specified as string', () => { + test('published の値が number 型の場合はエラーを返す', () => { const errors = validateBook({ ...validBook, published: 1 as any, @@ -352,8 +350,8 @@ describe('validateBook', () => { }); }); - describe('validateMissingTopics', () => { - test('return error with undefined topics', () => { + describe('validateMissingTopics()のテスト', () => { + test('topics の値が undefined ならエラーを返す', () => { const errors = validateBook({ ...validBook, topics: undefined, @@ -363,7 +361,7 @@ describe('validateBook', () => { 'topics(記事に関連する言語や技術)を配列で指定してください。' ); }); - test('return error with empty topics', () => { + test('topics の値が空配列ならエラーを返す', () => { const errors = validateBook({ ...validBook, topics: [], @@ -375,8 +373,8 @@ describe('validateBook', () => { }); }); - describe('validateTooManyTopics', () => { - test('return error with 6 topics', () => { + describe('validateTooManyTopics()のテスト', () => { + test('topics の数が 6 以上ならエラーを返す', () => { const errors = validateBook({ ...validBook, topics: ['a', 'b', 'c', 'd', 'e', 'f'], @@ -386,8 +384,8 @@ describe('validateBook', () => { }); }); - describe('validateInvalidTopicLetters', () => { - test('return error with topic including symbols', () => { + describe('validateInvalidTopicLetters()のテスト', () => { + test('topics に記号が含まれている場合はエラーを返す', () => { const errors = validateBook({ ...validBook, topics: ['a', 'vue.js'], @@ -399,8 +397,8 @@ describe('validateBook', () => { }); }); - describe('validateTopicType', () => { - test('return error with number value', () => { + describe('validateTopicType()のテスト', () => { + test('topics の配列に number 型があればエラーを返す', () => { const errors = validateBook({ ...validBook, topics: [123] as any, @@ -410,7 +408,7 @@ describe('validateBook', () => { 'topicsは全て文字列で指定してください' ); }); - test('return error with empty string topic', () => { + test('topics の配列に空文字列があればエラーを返す', () => { const errors = validateBook({ ...validBook, topics: [''], @@ -422,8 +420,8 @@ describe('validateBook', () => { }); }); - describe('validateUseTags', () => { - test('return error with tag property', () => { + describe('validateUseTags()のテスト', () => { + test('tags プロパティを使っている場合はエラーを返す', () => { const errors = validateBook({ ...validBook, tags: ['a', 'b'], @@ -433,8 +431,8 @@ describe('validateBook', () => { }); }); - describe('validateBookSummary', () => { - test('return error with undefined summary', () => { + describe('validateBookSummary()のテスト', () => { + test('summary が undefined の場合はエラーを返す', () => { const errors = validateBook({ ...validBook, summary: undefined, @@ -446,8 +444,8 @@ describe('validateBook', () => { }); }); - describe('validateBookPriceType', () => { - test('return error with undefined price', () => { + describe('validateBookPriceType()のテスト', () => { + test('price が undefined の場合はエラーを返す', () => { const errors = validateBook({ ...validBook, price: undefined, @@ -459,8 +457,8 @@ describe('validateBook', () => { }); }); - describe('validateBookPriceRange', () => { - test('return error with price more than 6000', () => { + describe('validateBookPriceRange()のテスト', () => { + test('price が 5000 よりも大きいならエラーを返す', () => { const errors = validateBook({ ...validBook, price: 6000, @@ -470,7 +468,7 @@ describe('validateBook', () => { 'price(本の価格)を有料にする場合、200〜5000の間で指定してください' ); }); - test('return error with price less than 200', () => { + test('price が 200 よりも小さいならエラーを返す', () => { const errors = validateBook({ ...validBook, price: 100, @@ -482,8 +480,8 @@ describe('validateBook', () => { }); }); - describe('validateBookPriceFraction', () => { - test('return error if price is not divisible by 100', () => { + describe('validateBookPriceFraction()のテスト', () => { + test('price が 100 で割り切れない場合はエラーを返す', () => { const errors = validateBook({ ...validBook, price: 1050, @@ -495,8 +493,8 @@ describe('validateBook', () => { }); }); - describe('validateMissingBookCover', () => { - test('return error with undefined coverDataUrl', () => { + describe('validateMissingBookCover()のテスト', () => { + test('coverDataUrl が undefined の場合はエラーを返す', () => { const errors = validateBook({ ...validBook, coverDataUrl: undefined, @@ -508,8 +506,8 @@ describe('validateBook', () => { }); }); - describe('validateBookCoverSize', () => { - test('return error with undefined coverDataUrl', () => { + describe('validateBookCoverSize()のテスト', () => { + test('カバー画像のサイズが1MBより大きい場合はエラーを返す', () => { const errors = validateBook({ ...validBook, coverFilesize: 1024 * 1024 * 2, @@ -521,8 +519,8 @@ describe('validateBook', () => { }); }); - describe('validateBookCoverAspectRatio', () => { - test('return error if cover aspect ratios is not 1.4', () => { + describe('validateBookCoverAspectRatio()のテスト', () => { + test('カバー画像のアスペクト比が 1 : 1.4 でない場合はエラーを返す', () => { const errors = validateBook({ ...validBook, coverHeight: 800, @@ -534,19 +532,7 @@ describe('validateBook', () => { ); }); - test('return error if cover aspect ratios is not 1.4', () => { - const errors = validateBook({ - ...validBook, - coverHeight: 500, - coverWidth: 700, - }); - expect(errors.length).toEqual(1); - expect(errors[0].message).toContain( - `カバー画像の「幅 : 高さ」の比率は「1 : 1.4」にすることをおすすめします` - ); - }); - - test('return no errors with allowable aspect ratio', () => { + test('カバー画像のアスペクト比が有効な場合はエラーを返さない', () => { const errors = validateBook({ ...validBook, coverHeight: 710, @@ -556,8 +542,8 @@ describe('validateBook', () => { }); }); - describe('validateBookChapterSlugs', () => { - test('return no errors with undefined specifiedChapterSlugs', () => { + describe('validateBookChapterSlugs()のテスト', () => { + test('specifiedChapterSlugs が undefined ならエラーを返さない', () => { // specifiedChapterSlugs is optional const errors = validateBook({ ...validBook, @@ -566,7 +552,7 @@ describe('validateBook', () => { }); expect(errors).toEqual([]); }); - test('return error if specifiedChapterSlugs is not array of string', () => { + test('specifiedChapterSlugsが文字列の配列でない場合はエラーを返します', () => { // specifiedChapterSlugs is optional const errors = validateBook({ ...validBook, @@ -579,8 +565,8 @@ describe('validateBook', () => { }); }); - describe('validateBookChaptersFormat', () => { - test('return error if specifiedChapterSlugs includes .md', () => { + describe('validateBookChaptersFormat()のテスト', () => { + test('specifiedChapterSlugsに".md"が含まれている場合はエラーを返す', () => { const errors = validateBook({ ...validBook, specifiedChapterSlugs: ['example1.md', 'example2.md'], @@ -593,7 +579,7 @@ describe('validateBook', () => { }); }); -describe('validateBookChapter', () => { +describe('validateBookChapter()のテスト', () => { const validChapter = { slug: 'example', filename: 'example.md', @@ -603,20 +589,20 @@ describe('validateBookChapter', () => { position: 0, }; - test('return no errors with valid chapter', () => { + test('有効なチャプターならエラーを返さない', () => { const errors = validateBookChapter(validChapter); expect(errors).toEqual([]); }); - describe('validateChapterItemSlug', () => { - test('return no errors with short slug', () => { + describe('validateChapterItemSlug()のテスト', () => { + test('slug が短すぎる場合はエラーを返す', () => { const errors = validateBookChapter({ ...validChapter, slug: 's', }); expect(errors).toEqual([]); }); - test('return error with slug which includes invalid letters', () => { + test('slug に使えない文字を含む場合はエラーを返す', () => { const errors = validateBookChapter({ ...validChapter, slug: 'invalid/slug', @@ -626,8 +612,8 @@ describe('validateBookChapter', () => { }); }); - describe('validateMissingTitle', () => { - test('return error without title', () => { + describe('validateMissingTitle()のテスト', () => { + test('title が無ければエラーを返す', () => { const errors = validateBookChapter({ ...validChapter, title: undefined, @@ -637,7 +623,7 @@ describe('validateBookChapter', () => { 'title(タイトル)を文字列で入力してください' ); }); - test('return error with empty title', () => { + test('title が空文字列ならエラーを返す', () => { const errors = validateBookChapter({ ...validChapter, title: '', @@ -649,8 +635,8 @@ describe('validateBookChapter', () => { }); }); - describe('validateTitleLength', () => { - test('return error with too long title', () => { + describe('validateTitleLength()のテスト', () => { + test('title が長すぎる場合はエラーを返す', () => { const errors = validateBookChapter({ ...validChapter, title: @@ -661,8 +647,8 @@ describe('validateBookChapter', () => { }); }); - describe('validateChapterFreeType', () => { - test('return error if free property is not boolean', () => { + describe('validateChapterFreeType()のテスト', () => { + test('free が boolean 型じゃ無ければエラーを返す', () => { const errors = validateBookChapter({ ...validChapter, free: 'true' as any, @@ -673,7 +659,7 @@ describe('validateBookChapter', () => { ); }); - test('return no error if free property is undefined', () => { + test('free が undefined ならエラーを返さない', () => { const errors = validateBookChapter({ ...validChapter, free: undefined, From 1a457e36df9ee1b2f2be2fe25f7083162fdf0d4d Mon Sep 17 00:00:00 2001 From: uttk-dev <97154037+uttk-dev@users.noreply.github.com> Date: Fri, 15 Sep 2023 14:35:34 +0900 Subject: [PATCH 03/14] =?UTF-8?q?chore:=20zenn-markdown-html=20=E3=81=AE?= =?UTF-8?q?=E3=83=86=E3=82=B9=E3=83=88=E3=81=AE=E3=82=BF=E3=82=A4=E3=83=88?= =?UTF-8?q?=E3=83=AB=E3=82=92=E6=97=A5=E6=9C=AC=E8=AA=9E=E3=81=AB=E7=B5=B1?= =?UTF-8?q?=E4=B8=80=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../__tests__/basic.test.ts | 10 +-- .../zenn-markdown-html/__tests__/br.test.ts | 10 +-- .../__tests__/dollar.test.ts | 26 +++---- .../__tests__/highlight.test.ts | 30 ++++---- .../zenn-markdown-html/__tests__/link.test.ts | 70 +++++++++---------- .../zenn-markdown-html/__tests__/xss.test.ts | 22 +++--- 6 files changed, 84 insertions(+), 84 deletions(-) diff --git a/packages/zenn-markdown-html/__tests__/basic.test.ts b/packages/zenn-markdown-html/__tests__/basic.test.ts index 865fc42a..de138f48 100644 --- a/packages/zenn-markdown-html/__tests__/basic.test.ts +++ b/packages/zenn-markdown-html/__tests__/basic.test.ts @@ -1,7 +1,7 @@ import markdownToHtml from '../src/index'; -describe('Convert markdown to html properly', () => { - test('should convert markdown to html properly', () => { +describe('MarkdownからHTMLへの変換テスト', () => { + test('markdownからhtmlへ変換する', () => { const html = markdownToHtml('Hello\n## hey\n\n- first\n- second\n'); expect(html).toContain(`

Hello

`); expect(html).toContain( @@ -10,12 +10,12 @@ describe('Convert markdown to html properly', () => { expect(html).toContain(`\n`); }); - test('should allow inline comment', () => { + test('インラインコメントはhtmlに変換しない', () => { const html = markdownToHtml(``); expect(html).not.toContain('hey'); }); - test('should append docId to footnote', () => { + test('脚注に docId を設定する', () => { const html = markdownToHtml(`Hello[^1]World!\n\n[^1]: hey`); // expect(html).toContain('[1]'); expect(html).toEqual( @@ -25,7 +25,7 @@ describe('Convert markdown to html properly', () => { ); }); - test('should remove data scheme img tag', () => { + test('dataスキーマの画像は除外する', () => { const html = markdownToHtml(`![](data:image/png;base64,xxxx)`); expect(html).toContain(''); }); diff --git a/packages/zenn-markdown-html/__tests__/br.test.ts b/packages/zenn-markdown-html/__tests__/br.test.ts index 02fe31d8..1a0b0b21 100644 --- a/packages/zenn-markdown-html/__tests__/br.test.ts +++ b/packages/zenn-markdown-html/__tests__/br.test.ts @@ -1,14 +1,14 @@ import markdownToHtml from '../src/index'; -describe('Handle br tag properly', () => { - test('should preserve br tag inside paragraph', () => { +describe('
のテスト', () => { + test('段落内の
は保持する', () => { const patterns = ['foo
bar', 'foo
bar', 'foo
bar']; patterns.forEach((pattern) => { const html = markdownToHtml(pattern); expect(html).toMatch(/

foo
bar<\/p>/); }); }); - test('should preserve br tag inside table', () => { + test('テーブル内の
は保持する', () => { const tableString = [ `| a | b |`, `| --- | --- |`, @@ -17,11 +17,11 @@ describe('Handle br tag properly', () => { const html = markdownToHtml(tableString); expect(html).toContain('foo
bar'); }); - test('should escape br tag inside inline code', () => { + test('インラインコード内の
はエスケープする', () => { const html = markdownToHtml('foo`
`bar'); expect(html).toMatch(/

foo<br><\/code>bar<\/p>/); }); - test('should escape br tag inside code block', () => { + test('コードブロック内の
はエスケープする', () => { const html = markdownToHtml('```\n
\n```'); expect(html).toContain('<br>'); }); diff --git a/packages/zenn-markdown-html/__tests__/dollar.test.ts b/packages/zenn-markdown-html/__tests__/dollar.test.ts index 823a72b5..1720e24f 100644 --- a/packages/zenn-markdown-html/__tests__/dollar.test.ts +++ b/packages/zenn-markdown-html/__tests__/dollar.test.ts @@ -1,27 +1,27 @@ import markdownToHtml from '../src/index'; -describe('Handle $ mark properly', () => { - test('should keep $ around link href', () => { +describe('$ マークのテスト', () => { + test('リンクと同じ行にある $ は katex に変換される', () => { const html = markdownToHtml('$a,b,c$foo[foo](https://foo.bar)bar'); expect(html).toEqual( '

a,b,cfoofoobar

\n' ); }); - test('should keep $ around link href', () => { + test('リンクの後に無効な $ が続く場合はそのままにする', () => { const html = markdownToHtml('$a,b,c$foo[foo](http://foo.bar)$bar'); expect(html).toEqual( '

a,b,cfoofoo$bar

\n' ); }); - test('should keep $ around link href', () => { + test('リンク名に $ が含まれる場合はそのままにする', () => { const html = markdownToHtml('$a,b,c$foo[$bar](http://foo.bar)bar'); expect(html).toEqual( '

a,b,cfoo$barbar

\n' ); }); - test('should keep $ around link href', () => { + test('リンクのhrefに $ が含まれる場合はそのままにする', () => { const html = markdownToHtml( '[this $ should be escaped](https://docs.angularjs.org/api/ng/service/$http)' ); @@ -31,8 +31,8 @@ describe('Handle $ mark properly', () => { }); }); -describe('should escape html tag', () => { - test('should escape script tag', () => { +describe('HTMLタグにエスケープするテスト', () => { + test('katex内のをエスケープする', () => { const html = markdownToHtml('$a,,c$'); expect(html).toEqual( `

a,<script>alert("XSS")</script>,c

\n` @@ -40,14 +40,14 @@ describe('should escape html tag', () => { }); }); -describe('Handle twice $ pairs properly', () => { - test('should keep $ single character expression around link href', () => { +describe('$ のペアのテスト', () => { + test('リンクの前後にある一文字だけを含む$のペアをkatexに変換する', () => { const html = markdownToHtml('$a$foo[foo](https://foo.bar)bar,refs:$(2)$'); expect(html).toEqual( '

afoofoobar,refs:(2)

\n' ); }); - test('should keep $ around link href', () => { + test('リンク前後にある$のペアをkatexに変換する', () => { const html = markdownToHtml( '$a,b,c$foo[foo](https://foo.bar)bar,refs:$(2)$' ); @@ -55,7 +55,7 @@ describe('Handle twice $ pairs properly', () => { '

a,b,cfoofoobar,refs:(2)

\n' ); }); - test('should keep $ around link href three times', () => { + test('リンク前後にある三つの$のペアをkatexに変換する', () => { const html = markdownToHtml( '$a,b,c$foo[foo](https://foo.bar)bar,refs:$(2)$,and:$(3)$' ); @@ -63,13 +63,13 @@ describe('Handle twice $ pairs properly', () => { '

a,b,cfoofoobar,refs:(2),and:(3)

\n' ); }); - test('should keep $ around link href without parentheses', () => { + test('リンク周りにある$のペアをkatexに変換する', () => { const html = markdownToHtml('$a,b,c$foo[foo](https://foo.bar)bar,refs:$2$'); expect(html).toEqual( '

a,b,cfoofoobar,refs:2

\n' ); }); - test('should keep $ pairs two times', () => { + test('二つの$のペアをkatexに変換する', () => { const html = markdownToHtml('$a,b,c$foobar,refs:$(2)$'); expect(html).toEqual( '

a,b,cfoobar,refs:(2)

\n' diff --git a/packages/zenn-markdown-html/__tests__/highlight.test.ts b/packages/zenn-markdown-html/__tests__/highlight.test.ts index 9470e7ee..eacfae7e 100644 --- a/packages/zenn-markdown-html/__tests__/highlight.test.ts +++ b/packages/zenn-markdown-html/__tests__/highlight.test.ts @@ -1,7 +1,7 @@ import markdownToHtml from '../src/index'; -describe('Code highlight propley', () => { - test('should generate valid code format html', () => { +describe('コードハイライトのテスト', () => { + test('コードブロックを正しいに変換する', () => { const html = markdownToHtml( `\`\`\`js:foo.js\nconsole.log("hello")\n\`\`\`` ); @@ -9,13 +9,13 @@ describe('Code highlight propley', () => { expect(html).toContain('foo.js'); }); - test('should highlight js syntax', () => { + test('js のコードブロックをハイライトする', () => { const jsString = ['```js', "console.log('foo')", '```'].join('\n'); const html = markdownToHtml(jsString); expect(html).toContain('language-js'); }); - test('should ignore additonal langInfo separated with whitespace', () => { + test('スペースで区切られた追加の言語は無視する', () => { const jsString = ['```js some-info', "console.log('foo')", '```'].join( '\n' ); @@ -23,18 +23,18 @@ describe('Code highlight propley', () => { expect(html).toContain('language-js'); }); - test('should highlight html syntax', () => { + test('htmlのコードブロックをハイライトできる', () => { const jsString = ['```html', '', '```'].join('\n'); const html = markdownToHtml(jsString); expect(html).toContain('language-html'); }); - test('should highlight js syntax and show filename', () => { + test('js のコードブロックをハイライトしてファイル名を表示する', () => { const jsString = ['```js:index.js', "console.log('foo')", '```'].join('\n'); const html = markdownToHtml(jsString); expect(html).toContain('index.js'); expect(html).toContain('language-js'); }); - test('should highlight html syntax and show filename', () => { + test('html のコードブロックをハイライトしてファイル名を表示する', () => { const jsString = ['```html:index.html', '', '```'].join('\n'); const html = markdownToHtml(jsString); expect(html).toContain( @@ -42,7 +42,7 @@ describe('Code highlight propley', () => { ); expect(html).toContain('language-html'); }); - test('should highlight js syntax', () => { + test('js diff のコードブロックをハイライトする', () => { const jsString = [ '```js diff', "- console.log('foo')", @@ -52,7 +52,7 @@ describe('Code highlight propley', () => { const html = markdownToHtml(jsString); expect(html).toContain('diff-highlight language-diff-js'); }); - test('should highlight html syntax', () => { + test('html diff のコードブロックをハイライトする', () => { const jsString = [ '```html diff', '- ', @@ -62,7 +62,7 @@ describe('Code highlight propley', () => { const html = markdownToHtml(jsString); expect(html).toContain('diff-highlight language-diff-html'); }); - test('should highlight js syntax with diff js order', () => { + test('diff js の順番でハイライトする', () => { const jsString = [ '```diff js', "- console.log('foo')", @@ -72,7 +72,7 @@ describe('Code highlight propley', () => { const html = markdownToHtml(jsString); expect(html).toContain('diff-highlight language-diff-js'); }); - test('should highlight html syntax with diff html order', () => { + test('diff html の順番でハイライトする', () => { const jsString = [ '```diff html', '- ', @@ -82,7 +82,7 @@ describe('Code highlight propley', () => { const html = markdownToHtml(jsString); expect(html).toContain('diff-highlight language-diff-html'); }); - test('should highlight js syntax and show filename', () => { + test('js diff のコードブロックをハイライトしてファイル名を表示する', () => { const jsString = [ '```js diff:index.js', "- console.log('foo')", @@ -93,7 +93,7 @@ describe('Code highlight propley', () => { expect(html).toContain('diff-highlight language-diff-js'); expect(html).toContain('index.js'); }); - test('should highlight html syntax and show filename', () => { + test('html diff のコードブロックをハイライトしてファイル名を表示する', () => { const jsString = [ '```html diff:index.html', '- ', @@ -106,7 +106,7 @@ describe('Code highlight propley', () => { 'index.html' ); }); - test('should highlight js syntax and show filename even if space exists before :', () => { + test('":" の前にスペースが存在しても js をハイライトしてファイル名を表示する', () => { const jsString = [ '```js diff :index.js', "- console.log('foo')", @@ -117,7 +117,7 @@ describe('Code highlight propley', () => { expect(html).toContain('diff-highlight language-diff-js'); expect(html).toContain('index.js'); }); - test('should highlight html syntax and show filename even if space exists before :', () => { + test('":" の前にスペースが存在しても html をハイライトしてファイル名を表示する', () => { const jsString = [ '```html diff :index.html', '- ', diff --git a/packages/zenn-markdown-html/__tests__/link.test.ts b/packages/zenn-markdown-html/__tests__/link.test.ts index ac3970bc..e49ca6a2 100644 --- a/packages/zenn-markdown-html/__tests__/link.test.ts +++ b/packages/zenn-markdown-html/__tests__/link.test.ts @@ -10,26 +10,26 @@ const renderLink = (src: string) => { return markdownToHtml(src, options); }; -describe('Link syntax', () => { - test('should convert link syntax properly', () => { +describe('Linkシンタックスのテスト', () => { + test('リンクに変換する', () => { const html = renderLink('[example](https://example.com)'); expect(html).toContain( 'example' ); }); - test('should convert link with no attributes if href starts with slash', () => { + test('hrefが"/"から始まる場合は属性のないリンクに変換する', () => { const html = renderLink('[Articles](/articles)'); expect(html).toContain('Articles'); }); - test('should convert link with no attributes if href starts with #', () => { + test('hrefが"#"で始まる場合は属性のないリンクに変換する', () => { const html = renderLink('[Example](#example)'); expect(html).toContain('Example'); }); }); -describe('Linkify properly', () => { - describe('Raw Link', () => { - test('should linkify url with nofollow if hostname is not zenn.dev', () => { +describe('Linkifyのテスト', () => { + describe('直書きのリンクのテスト', () => { + test('ホスト名が"zenn.dev"じゃない場合はURLを nofollow のリンクに変換する', () => { expect(renderLink('URL is https://example.com')).toContain( 'URL is https://example.com' ); @@ -41,42 +41,42 @@ describe('Linkify properly', () => { ); }); - test('should linkify url without rel if hostname is zenn.dev', () => { + test('ホスト名が"zenn.dev"ならrel無しのリンクに変換する', () => { const html = renderLink('URL is https://zenn.dev'); expect(html).toContain( 'URL is https://zenn.dev' ); }); - test('should not convert links to card if text exists before url', () => { + test('URLの前にテキストが存在する場合はリンクをリンクカードに変換しない', () => { const html = renderLink('foo https://example.com'); expect(html).toEqual( '

foo https://example.com

\n' ); }); - test('should not convert intentional links to card', () => { + test('意図的にリンクしているURLはリンクカードに変換しない', () => { const html = renderLink('[https://example.com](https://example.com)'); expect(html).toEqual( '

https://example.com

\n' ); }); - test('should not convert links inside list', () => { + test('リンク内のリンクを変換しない', () => { const html = renderLink('- https://example.com\n- second'); expect(html).toEqual( '\n' ); }); - test('should not convert links inside block', () => { + test('
内のリンクはリンクカードに変換しない', () => { const html = renderLink(':::message alert\nhttps://example.com\n:::'); expect(html).toEqual( '\n' ); }); - test('should not convert links inside block with 2 paragraphs', () => { + test('
内の2段落空いたリンクをリンクカードに変換しない', () => { const html = renderLink( ':::message alert\nhello\n\nhttps://example.com\n:::' ); @@ -85,35 +85,35 @@ describe('Linkify properly', () => { ); }); - test('should not convert links inside list', () => { + test('リスト内のリンクをリンクカードに変換しない', () => { const html = renderLink('- https://example.com\n- second'); expect(html).toEqual( '\n' ); }); - test('should not convert links if text follows', () => { + test('URLにテキストが続く場合はリンクカードに変換しない', () => { const html = renderLink('https://example.com foo'); expect(html).toEqual( '

https://example.com foo

\n' ); }); - test('should not convert a link with any text in same paragraph', () => { + test('同じ段落内のテキストを含むリンクをリンクカードに変換しない', () => { const html = renderLink(`a: https://example.com\nb: https://example.com`); expect(html).toEqual( '

a: https://example.com
\nb: https://example.com

\n' ); }); - test('should not convert links even when the links are the start of the line unless the next elements are texts', () => { + test('URLにテキストが続くならリンクが先頭であってもリンクカードに変換しない', () => { const html = renderLink('\n\nhttps://example.com text'); expect(html).toEqual( '

https://example.com text

\n' ); }); - test('should not convert links even when the links are the end of the line, unless previous elements are texts', () => { + test('URLの前にテキストがあるならリンクが行末でもリンクカードに変換しない', () => { const html = renderLink('text https://example.com\n\n'); expect(html).toEqual( '

text https://example.com

\n' @@ -121,8 +121,8 @@ describe('Linkify properly', () => { }); }); - describe('Embedded Iframe', () => { - describe('LinkCard', () => { + describe('埋め込みiframeのテスト', () => { + describe('LinkCardのテスト', () => { const validateConvertLinkCardEmbeddedIframe = ( html: string, url: string @@ -138,37 +138,37 @@ describe('Linkify properly', () => { ); }; - test('should convert links to card if prev elem is br', () => { + test('前の要素が
の場合はリンクカードに変換する', () => { const url = 'https://example.com'; const html = renderLink(`foo\n${url}`); validateConvertLinkCardEmbeddedIframe(html, url); }); - test('should convert links when surrounded by softbreaks', () => { + test('改行で囲まれている場合はリンクカードに変換する', () => { const url = 'https://example.com'; const html = renderLink(`\n\n${url}\n\n`); validateConvertLinkCardEmbeddedIframe(html, url); }); - test('should convert links when previous element is a softbreak and the links are end of the paragraph', () => { + test('前に改行があってリンクが段落の終わりならリンクカードに変換する', () => { const url = 'https://example.com'; const html = renderLink(`text\n${url}\n\n`); validateConvertLinkCardEmbeddedIframe(html, url); }); - test('should convert links when the links are the start of the line and the next elements are softbreaks', () => { + test('リンクが段落の先頭でその後に開業が続く場合はリンクカードに変換する', () => { const url = 'https://example.com'; const html = renderLink(`\n\n${url}\ntext`); validateConvertLinkCardEmbeddedIframe(html, url); }); - test('should convert links when previous and next elements are softbreaks', () => { + test('リンクの前後に改行があるならリンクカードに変換する', () => { const url = 'https://example.com'; const html = renderLink(`text\n${url}\ntext`); validateConvertLinkCardEmbeddedIframe(html, url); }); - test('should convert links to card if first element in p', () => { + test('

の最初の要素ならリンクカードに変換する', () => { const url = 'https://example.com'; const html = renderLink(`foo\n\n${url}`); const root = parse(html); @@ -180,7 +180,7 @@ describe('Linkify properly', () => { ).toBeDefined(); }); - test('should convert links even when some links exist in the line, unless softbreaks exist before and after the each links', () => { + test('各リンクの前後に改行があればリンクカードに変換する', () => { const linkCardUrls = ['https://example1.com', 'https://example2.com']; const rawLinkUrls = ['https://example3.com', 'https://example4.com']; // prettier-ignore @@ -199,7 +199,7 @@ describe('Linkify properly', () => { ); }); - test('should convert links even when some links exist in the line, when each links are separated by linebreaks', () => { + test('行内にリンクが存在する場合でも、各リンクが改行で区切られている場合は、リンクを変換する', () => { const linkCardUrls = ['https://example1.com', 'https://example2.com']; const html = renderLink(`${linkCardUrls[0]}\n${linkCardUrls[1]}\n`); const iframes = parse(html).querySelectorAll( @@ -213,8 +213,8 @@ describe('Linkify properly', () => { }); }); - describe('Tweet', () => { - test('should convert a tweet-link to embedded iframe', () => { + describe('Tweet埋め込みのテスト', () => { + test('ツイートリンクを)`; const html = markdownToHtml(content); expect(html).toContain( From c714387c42f6325588c103ec4f89dc536b905b1c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 20 Sep 2023 00:35:35 +0000 Subject: [PATCH 04/14] v0.1.147-alpha.0 --- lerna.json | 2 +- packages/zenn-cli/package.json | 2 +- packages/zenn-content-css/package.json | 2 +- packages/zenn-embed-elements/package.json | 2 +- packages/zenn-markdown-html/package.json | 2 +- packages/zenn-model/package.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lerna.json b/lerna.json index 7b3af8a9..cfa3985c 100644 --- a/lerna.json +++ b/lerna.json @@ -2,6 +2,6 @@ "packages": [ "packages/*" ], - "version": "0.1.146", + "version": "0.1.147-alpha.0", "npmClient": "pnpm" } diff --git a/packages/zenn-cli/package.json b/packages/zenn-cli/package.json index 0fb11b30..b5470bd2 100644 --- a/packages/zenn-cli/package.json +++ b/packages/zenn-cli/package.json @@ -1,6 +1,6 @@ { "name": "zenn-cli", - "version": "0.1.146", + "version": "0.1.147-alpha.0", "description": "Preview Zenn content locally.", "repository": { "type": "git", diff --git a/packages/zenn-content-css/package.json b/packages/zenn-content-css/package.json index 74750823..cb95e99e 100644 --- a/packages/zenn-content-css/package.json +++ b/packages/zenn-content-css/package.json @@ -1,6 +1,6 @@ { "name": "zenn-content-css", - "version": "0.1.146", + "version": "0.1.147-alpha.0", "license": "MIT", "description": "Zenn flavor content style.", "repository": { diff --git a/packages/zenn-embed-elements/package.json b/packages/zenn-embed-elements/package.json index 1ed69d00..70989f7d 100644 --- a/packages/zenn-embed-elements/package.json +++ b/packages/zenn-embed-elements/package.json @@ -1,6 +1,6 @@ { "name": "zenn-embed-elements", - "version": "0.1.146", + "version": "0.1.147-alpha.0", "license": "MIT", "description": "Web components for embedded contents.", "repository": { diff --git a/packages/zenn-markdown-html/package.json b/packages/zenn-markdown-html/package.json index f695e00a..941e257b 100644 --- a/packages/zenn-markdown-html/package.json +++ b/packages/zenn-markdown-html/package.json @@ -1,6 +1,6 @@ { "name": "zenn-markdown-html", - "version": "0.1.146", + "version": "0.1.147-alpha.0", "license": "MIT", "description": "Convert markdown to zenn flavor html.", "main": "lib/index.js", diff --git a/packages/zenn-model/package.json b/packages/zenn-model/package.json index b971d47b..d235f719 100644 --- a/packages/zenn-model/package.json +++ b/packages/zenn-model/package.json @@ -1,6 +1,6 @@ { "name": "zenn-model", - "version": "0.1.146", + "version": "0.1.147-alpha.0", "license": "MIT", "description": "Model utils for Zenn contents", "main": "lib/index.js", From 081d90e127590e01879eb1964b823ea6d3dff2d2 Mon Sep 17 00:00:00 2001 From: uttk-dev <97154037+uttk-dev@users.noreply.github.com> Date: Wed, 20 Sep 2023 14:17:07 +0900 Subject: [PATCH 05/14] =?UTF-8?q?feat:=20zenn-cli=20=E3=81=AE=20`test:clie?= =?UTF-8?q?nt`=20=E3=82=92=20vitest=20=E3=81=A7=E5=AE=9F=E8=A1=8C=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/zenn-cli/jest.config.client.js | 12 - packages/zenn-cli/package.json | 4 +- .../src/client/__tests__/lib/helper.test.ts | 1 + .../src/common/__tests__/helper.test.ts | 1 + packages/zenn-cli/vitest.client.config.ts | 20 ++ pnpm-lock.yaml | 329 +++++++++++++++++- 6 files changed, 339 insertions(+), 28 deletions(-) delete mode 100644 packages/zenn-cli/jest.config.client.js create mode 100644 packages/zenn-cli/vitest.client.config.ts diff --git a/packages/zenn-cli/jest.config.client.js b/packages/zenn-cli/jest.config.client.js deleted file mode 100644 index f3cab0b9..00000000 --- a/packages/zenn-cli/jest.config.client.js +++ /dev/null @@ -1,12 +0,0 @@ -module.exports = { - testEnvironment: 'jsdom', - moduleFileExtensions: ['js', 'json', 'ts'], - transform: { - '^.+\\.ts$': '@swc/jest', - }, - testMatch: [ - '/src/client/__tests__/**/*.test.ts', - '/src/common/__tests__/**/*.test.ts', - ], - resetMocks: true, -}; diff --git a/packages/zenn-cli/package.json b/packages/zenn-cli/package.json index b5470bd2..128348b0 100644 --- a/packages/zenn-cli/package.json +++ b/packages/zenn-cli/package.json @@ -30,7 +30,7 @@ "fix:eslint": "eslint --fix 'src/**/*.{ts,tsx}'", "strict:lint": "eslint 'src/**/*.{ts,tsx}' --max-warnings 0", "test": "run-s test:client test:server", - "test:client": "jest --config=jest.config.client.js", + "test:client": "vitest run --config vitest.client.config.ts", "test:server": "jest --config=jest.config.server.js", "exec:zenn": "node ./dist/server/zenn.js" }, @@ -95,6 +95,8 @@ "ts-loader": "^9.4.2", "typescript": "^4.9.5", "vite": "^4.2.1", + "vite-tsconfig-paths": "^4.2.1", + "vitest": "^0.34.4", "wait-on": "^7.0.1", "webpack": "^5.75.0", "webpack-cli": "^5.0.1", diff --git a/packages/zenn-cli/src/client/__tests__/lib/helper.test.ts b/packages/zenn-cli/src/client/__tests__/lib/helper.test.ts index e087ef7c..3c9b6e01 100644 --- a/packages/zenn-cli/src/client/__tests__/lib/helper.test.ts +++ b/packages/zenn-cli/src/client/__tests__/lib/helper.test.ts @@ -1,3 +1,4 @@ +import { describe, test, expect } from 'vitest'; import { encodeUrlPeriod, decodeUrlPeriod } from '../../lib/helper'; describe('encodeUrlPeriod と decodeUrlPeriod を使った処理のテスト', () => { diff --git a/packages/zenn-cli/src/common/__tests__/helper.test.ts b/packages/zenn-cli/src/common/__tests__/helper.test.ts index 48b87155..4d31f4f1 100644 --- a/packages/zenn-cli/src/common/__tests__/helper.test.ts +++ b/packages/zenn-cli/src/common/__tests__/helper.test.ts @@ -1,3 +1,4 @@ +import { describe, test, expect } from 'vitest'; import * as helper from '../helper'; describe('validateSlug() のテスト', () => { diff --git a/packages/zenn-cli/vitest.client.config.ts b/packages/zenn-cli/vitest.client.config.ts new file mode 100644 index 00000000..169fb02c --- /dev/null +++ b/packages/zenn-cli/vitest.client.config.ts @@ -0,0 +1,20 @@ +/// + +import react from '@vitejs/plugin-react'; // React の auto import jsx を有効にするプラグイン +import { defineConfig } from 'vitest/config'; + +export default defineConfig({ + build: { + target: 'esnext', + }, + + plugins: [react()], + + test: { + environment: 'jsdom', + include: [ + './src/client/__tests__/**/*.test.ts', + './src/common/__tests__/**/*.test.ts', + ], + }, +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9c701138..b792df6f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -200,6 +200,9 @@ importers: vite: specifier: ^4.2.1 version: 4.2.1(@types/node@18.13.0) + vitest: + specifier: ^0.34.4 + version: 0.34.4 wait-on: specifier: ^7.0.1 version: 7.0.1 @@ -1997,7 +2000,7 @@ packages: jest-validate: 29.4.2 jest-watcher: 29.4.2 micromatch: 4.0.5 - pretty-format: 29.4.2 + pretty-format: 29.7.0 slash: 3.0.0 strip-ansi: 6.0.1 transitivePeerDependencies: @@ -2107,6 +2110,13 @@ packages: '@sinclair/typebox': 0.25.21 dev: true + /@jest/schemas@29.6.3: + resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@sinclair/typebox': 0.27.8 + dev: true + /@jest/source-map@29.4.2: resolution: {integrity: sha512-tIoqV5ZNgYI9XCKXMqbYe5JbumcvyTgNN+V5QW4My033lanijvCD0D4PI9tBw4pRTqWOc00/7X3KVvUh+qnF4Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -2220,6 +2230,10 @@ packages: resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} dev: true + /@jridgewell/sourcemap-codec@1.4.15: + resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + dev: true + /@jridgewell/trace-mapping@0.3.17: resolution: {integrity: sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==} dependencies: @@ -2714,6 +2728,10 @@ packages: resolution: {integrity: sha512-gFukHN4t8K4+wVC+ECqeqwzBDeFeTzBXroBTqE6vcWrQGbEUpHO7LYdG0f4xnvYq4VOEwITSlHlp0JBAIFMS/g==} dev: true + /@sinclair/typebox@0.27.8: + resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} + dev: true + /@sinonjs/commons@2.0.0: resolution: {integrity: sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==} dependencies: @@ -3037,6 +3055,16 @@ packages: '@types/node': 18.13.0 dev: true + /@types/chai-subset@1.3.3: + resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} + dependencies: + '@types/chai': 4.3.6 + dev: true + + /@types/chai@4.3.6: + resolution: {integrity: sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw==} + dev: true + /@types/configstore@6.0.0: resolution: {integrity: sha512-GUvNiia85zTDDIx0iPrtF3pI8dwrQkfuokEqxqPDE55qxH0U5SZz4awVZjiJLWN2ZZRkXCUqgsMUbygXY+kytA==} dev: true @@ -3140,7 +3168,7 @@ packages: resolution: {integrity: sha512-VaywcGQ9tPorCX/Jkkni7RWGFfI11whqzs8dvxF41P17Z+z872thvEvlIbznjPJ02kl1HMX3LmLOonsj2n7HeQ==} dependencies: expect: 29.4.2 - pretty-format: 29.4.2 + pretty-format: 29.7.0 dev: true /@types/js-yaml@4.0.5: @@ -3452,6 +3480,44 @@ packages: - supports-color dev: true + /@vitest/expect@0.34.4: + resolution: {integrity: sha512-XlMKX8HyYUqB8dsY8Xxrc64J2Qs9pKMt2Z8vFTL4mBWXJsg4yoALHzJfDWi8h5nkO4Zua4zjqtapQ/IluVkSnA==} + dependencies: + '@vitest/spy': 0.34.4 + '@vitest/utils': 0.34.4 + chai: 4.3.8 + dev: true + + /@vitest/runner@0.34.4: + resolution: {integrity: sha512-hwwdB1StERqUls8oV8YcpmTIpVeJMe4WgYuDongVzixl5hlYLT2G8afhcdADeDeqCaAmZcSgLTLtqkjPQF7x+w==} + dependencies: + '@vitest/utils': 0.34.4 + p-limit: 4.0.0 + pathe: 1.1.1 + dev: true + + /@vitest/snapshot@0.34.4: + resolution: {integrity: sha512-GCsh4coc3YUSL/o+BPUo7lHQbzpdttTxL6f4q0jRx2qVGoYz/cyTRDJHbnwks6TILi6560bVWoBpYC10PuTLHw==} + dependencies: + magic-string: 0.30.3 + pathe: 1.1.1 + pretty-format: 29.7.0 + dev: true + + /@vitest/spy@0.34.4: + resolution: {integrity: sha512-PNU+fd7DUPgA3Ya924b1qKuQkonAW6hL7YUjkON3wmBwSTIlhOSpy04SJ0NrRsEbrXgMMj6Morh04BMf8k+w0g==} + dependencies: + tinyspy: 2.1.1 + dev: true + + /@vitest/utils@0.34.4: + resolution: {integrity: sha512-yR2+5CHhp/K4ySY0Qtd+CAL9f5Yh1aXrKfAT42bq6CtlGPh92jIDDDSg7ydlRow1CP+dys4TrOrbELOyNInHSg==} + dependencies: + diff-sequences: 29.6.3 + loupe: 2.3.6 + pretty-format: 29.7.0 + dev: true + /@webassemblyjs/ast@1.11.1: resolution: {integrity: sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==} dependencies: @@ -3667,6 +3733,12 @@ packages: engines: {node: '>=0.4.0'} dev: true + /acorn@8.10.0: + resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==} + engines: {node: '>=0.4.0'} + hasBin: true + dev: true + /acorn@8.8.2: resolution: {integrity: sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==} engines: {node: '>=0.4.0'} @@ -3832,6 +3904,10 @@ packages: resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==} dev: true + /assertion-error@1.1.0: + resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} + dev: true + /asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} dev: true @@ -4130,6 +4206,11 @@ packages: engines: {node: '>= 0.8'} dev: true + /cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + dev: true + /cacache@16.1.3: resolution: {integrity: sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} @@ -4216,6 +4297,19 @@ packages: resolution: {integrity: sha512-Lkp0vFjMkBB3GTpLR8zk4NwW5EdRdnitwYJHDOOKIU85x4ckYCPQ+9WlVvSVClHxVReefkUMtWZH2l9KGlD51w==} dev: true + /chai@4.3.8: + resolution: {integrity: sha512-vX4YvVVtxlfSZ2VecZgFUTU5qPCYsobVI2O9FmwEXBhDigYGQA6jRXCycIs1yJnnWbZ6/+a2zNIF5DfVCcJBFQ==} + engines: {node: '>=4'} + dependencies: + assertion-error: 1.1.0 + check-error: 1.0.2 + deep-eql: 4.1.3 + get-func-name: 2.0.0 + loupe: 2.3.6 + pathval: 1.1.1 + type-detect: 4.0.8 + dev: true + /chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} @@ -4242,6 +4336,10 @@ packages: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} dev: true + /check-error@1.0.2: + resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==} + dev: true + /cheerio-select@2.1.0: resolution: {integrity: sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==} dependencies: @@ -4787,6 +4885,13 @@ packages: resolution: {integrity: sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==} dev: true + /deep-eql@4.1.3: + resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} + engines: {node: '>=6'} + dependencies: + type-detect: 4.0.8 + dev: true + /deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true @@ -4869,6 +4974,11 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true + /diff-sequences@29.6.3: + resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dev: true + /dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -5674,6 +5784,10 @@ packages: engines: {node: 6.* || 8.* || >= 10.*} dev: true + /get-func-name@2.0.0: + resolution: {integrity: sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==} + dev: true + /get-intrinsic@1.2.0: resolution: {integrity: sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==} dependencies: @@ -6494,7 +6608,7 @@ packages: jest-snapshot: 29.4.2 jest-util: 29.4.2 p-limit: 3.1.0 - pretty-format: 29.4.2 + pretty-format: 29.7.0 slash: 3.0.0 stack-utils: 2.0.6 transitivePeerDependencies: @@ -6561,7 +6675,7 @@ packages: jest-validate: 29.4.2 micromatch: 4.0.5 parse-json: 5.2.0 - pretty-format: 29.4.2 + pretty-format: 29.7.0 slash: 3.0.0 strip-json-comments: 3.1.1 transitivePeerDependencies: @@ -6575,7 +6689,7 @@ packages: chalk: 4.1.2 diff-sequences: 29.4.2 jest-get-type: 29.4.2 - pretty-format: 29.4.2 + pretty-format: 29.7.0 dev: true /jest-docblock@29.4.2: @@ -6593,7 +6707,7 @@ packages: chalk: 4.1.2 jest-get-type: 29.4.2 jest-util: 29.4.2 - pretty-format: 29.4.2 + pretty-format: 29.7.0 dev: true /jest-environment-jsdom@29.4.2: @@ -6660,7 +6774,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: jest-get-type: 29.4.2 - pretty-format: 29.4.2 + pretty-format: 29.7.0 dev: true /jest-matcher-utils@29.4.2: @@ -6670,7 +6784,7 @@ packages: chalk: 4.1.2 jest-diff: 29.4.2 jest-get-type: 29.4.2 - pretty-format: 29.4.2 + pretty-format: 29.7.0 dev: true /jest-message-util@29.4.2: @@ -6683,7 +6797,7 @@ packages: chalk: 4.1.2 graceful-fs: 4.2.10 micromatch: 4.0.5 - pretty-format: 29.4.2 + pretty-format: 29.7.0 slash: 3.0.0 stack-utils: 2.0.6 dev: true @@ -6734,7 +6848,7 @@ packages: jest-pnp-resolver: 1.2.3(jest-resolve@29.4.2) jest-util: 29.4.2 jest-validate: 29.4.2 - resolve: 1.22.1 + resolve: 1.22.2 resolve.exports: 2.0.0 slash: 3.0.0 dev: true @@ -6825,7 +6939,7 @@ packages: jest-message-util: 29.4.2 jest-util: 29.4.2 natural-compare: 1.4.0 - pretty-format: 29.4.2 + pretty-format: 29.7.0 semver: 7.3.8 transitivePeerDependencies: - supports-color @@ -6852,7 +6966,7 @@ packages: chalk: 4.1.2 jest-get-type: 29.4.2 leven: 3.1.0 - pretty-format: 29.4.2 + pretty-format: 29.7.0 dev: true /jest-watcher@29.4.2: @@ -7153,6 +7267,11 @@ packages: json5: 2.2.3 dev: true + /local-pkg@0.4.3: + resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==} + engines: {node: '>=14'} + dev: true + /locate-path@2.0.0: resolution: {integrity: sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==} engines: {node: '>=4'} @@ -7206,6 +7325,12 @@ packages: js-tokens: 4.0.0 dev: true + /loupe@2.3.6: + resolution: {integrity: sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==} + dependencies: + get-func-name: 2.0.0 + dev: true + /lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} dependencies: @@ -7231,6 +7356,13 @@ packages: '@jridgewell/sourcemap-codec': 1.4.14 dev: true + /magic-string@0.30.3: + resolution: {integrity: sha512-B7xGbll2fG/VjP+SWg4sX3JynwIU0mjoTc6MPpKNuIvftk6u6vqhDnk1R80b8C2GBR6ywqy+1DcKBrevBg+bmw==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + dev: true + /make-dir@2.1.0: resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==} engines: {node: '>=6'} @@ -7559,6 +7691,15 @@ packages: hasBin: true dev: true + /mlly@1.4.2: + resolution: {integrity: sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==} + dependencies: + acorn: 8.10.0 + pathe: 1.1.1 + pkg-types: 1.0.3 + ufo: 1.3.0 + dev: true + /modify-values@1.0.1: resolution: {integrity: sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==} engines: {node: '>=0.10.0'} @@ -7976,6 +8117,13 @@ packages: yocto-queue: 0.1.0 dev: true + /p-limit@4.0.0: + resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + yocto-queue: 1.0.0 + dev: true + /p-locate@2.0.0: resolution: {integrity: sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==} engines: {node: '>=4'} @@ -8185,6 +8333,14 @@ packages: util: 0.10.4 dev: true + /pathe@1.1.1: + resolution: {integrity: sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==} + dev: true + + /pathval@1.1.1: + resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} + dev: true + /picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} @@ -8231,6 +8387,14 @@ packages: find-up: 4.1.0 dev: true + /pkg-types@1.0.3: + resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} + dependencies: + jsonc-parser: 3.2.0 + mlly: 1.4.2 + pathe: 1.1.1 + dev: true + /postcss-selector-parser@6.0.11: resolution: {integrity: sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g==} engines: {node: '>=4'} @@ -8267,11 +8431,11 @@ packages: hasBin: true dev: true - /pretty-format@29.4.2: - resolution: {integrity: sha512-qKlHR8yFVCbcEWba0H0TOC8dnLlO4vPlyEjRPw31FZ2Rupy9nLa8ZLbYny8gWEl8CkEhJqAE6IzdNELTBVcBEg==} + /pretty-format@29.7.0: + resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/schemas': 29.4.2 + '@jest/schemas': 29.6.3 ansi-styles: 5.2.0 react-is: 18.2.0 dev: true @@ -8914,6 +9078,10 @@ packages: object-inspect: 1.12.3 dev: true + /siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + dev: true + /signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} dev: true @@ -9075,11 +9243,19 @@ packages: escape-string-regexp: 2.0.0 dev: true + /stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + dev: true + /statuses@2.0.1: resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} engines: {node: '>= 0.8'} dev: true + /std-env@3.4.3: + resolution: {integrity: sha512-f9aPhy8fYBuMN+sNfakZV18U39PbalgjXG3lLB9WkaYTxijru61wb57V9wxxNthXM5Sd88ETBWi29qLAsHO52Q==} + dev: true + /string-length@4.0.2: resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} engines: {node: '>=10'} @@ -9189,6 +9365,12 @@ packages: engines: {node: '>=8'} dev: true + /strip-literal@1.3.0: + resolution: {integrity: sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==} + dependencies: + acorn: 8.10.0 + dev: true + /strong-log-transformer@2.1.0: resolution: {integrity: sha512-B3Hgul+z0L9a236FAUC9iZsL+nVHgoCJnqCbN588DjYxvGXaXaaFbfmQ/JhvKjZwsOukuR72XbHv71Qkug0HxA==} engines: {node: '>=4'} @@ -9388,6 +9570,20 @@ packages: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} dev: true + /tinybench@2.5.1: + resolution: {integrity: sha512-65NKvSuAVDP/n4CqH+a9w2kTlLReS9vhsAP06MWx+/89nMinJyB2icyl58RIcqCmIggpojIGeuJGhjU1aGMBSg==} + dev: true + + /tinypool@0.7.0: + resolution: {integrity: sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww==} + engines: {node: '>=14.0.0'} + dev: true + + /tinyspy@2.1.1: + resolution: {integrity: sha512-XPJL2uSzcOyBMky6OFrusqWlzfFrXtE0hPuMgW8A2HmaqrPo4ZQHRN/V0QXN3FSjKxpsbRrFc5LI7KOwBsT1/w==} + engines: {node: '>=14.0.0'} + dev: true + /tmp@0.0.33: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} @@ -9654,6 +9850,10 @@ packages: resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==} dev: false + /ufo@1.3.0: + resolution: {integrity: sha512-bRn3CsoojyNStCZe0BG0Mt4Nr/4KF+rhFlnNXybgqt5pXHNFRlqinSoQaTrGyzE4X8aHplSb+TorH+COin9Yxw==} + dev: true + /uglify-js@3.17.4: resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==} engines: {node: '>=0.8.0'} @@ -9824,6 +10024,27 @@ packages: engines: {node: '>= 0.8'} dev: true + /vite-node@0.34.4(@types/node@18.13.0): + resolution: {integrity: sha512-ho8HtiLc+nsmbwZMw8SlghESEE3KxJNp04F/jPUCLVvaURwt0d+r9LxEqCX5hvrrOQ0GSyxbYr5ZfRYhQ0yVKQ==} + engines: {node: '>=v14.18.0'} + hasBin: true + dependencies: + cac: 6.7.14 + debug: 4.3.4(supports-color@5.5.0) + mlly: 1.4.2 + pathe: 1.1.1 + picocolors: 1.0.0 + vite: 4.2.1(@types/node@18.13.0) + transitivePeerDependencies: + - '@types/node' + - less + - sass + - stylus + - sugarss + - supports-color + - terser + dev: true + /vite@4.2.1(@types/node@18.13.0): resolution: {integrity: sha512-7MKhqdy0ISo4wnvwtqZkjke6XN4taqQ2TBaTccLIpOKv7Vp2h4Y+NpmWCnGDeSvvn45KxvWgGyb0MkHvY1vgbg==} engines: {node: ^14.18.0 || >=16.0.0} @@ -9858,6 +10079,70 @@ packages: fsevents: 2.3.2 dev: true + /vitest@0.34.4: + resolution: {integrity: sha512-SE/laOsB6995QlbSE6BtkpXDeVNLJc1u2LHRG/OpnN4RsRzM3GQm4nm3PQCK5OBtrsUqnhzLdnT7se3aeNGdlw==} + engines: {node: '>=v14.18.0'} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@vitest/browser': '*' + '@vitest/ui': '*' + happy-dom: '*' + jsdom: '*' + playwright: '*' + safaridriver: '*' + webdriverio: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + playwright: + optional: true + safaridriver: + optional: true + webdriverio: + optional: true + dependencies: + '@types/chai': 4.3.6 + '@types/chai-subset': 1.3.3 + '@types/node': 18.13.0 + '@vitest/expect': 0.34.4 + '@vitest/runner': 0.34.4 + '@vitest/snapshot': 0.34.4 + '@vitest/spy': 0.34.4 + '@vitest/utils': 0.34.4 + acorn: 8.10.0 + acorn-walk: 8.2.0 + cac: 6.7.14 + chai: 4.3.8 + debug: 4.3.4(supports-color@5.5.0) + local-pkg: 0.4.3 + magic-string: 0.30.3 + pathe: 1.1.1 + picocolors: 1.0.0 + std-env: 3.4.3 + strip-literal: 1.3.0 + tinybench: 2.5.1 + tinypool: 0.7.0 + vite: 4.2.1(@types/node@18.13.0) + vite-node: 0.34.4(@types/node@18.13.0) + why-is-node-running: 2.2.2 + transitivePeerDependencies: + - less + - sass + - stylus + - sugarss + - supports-color + - terser + dev: true + /w3c-xmlserializer@4.0.0: resolution: {integrity: sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==} engines: {node: '>=14'} @@ -10078,6 +10363,15 @@ packages: isexe: 2.0.0 dev: true + /why-is-node-running@2.2.2: + resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==} + engines: {node: '>=8'} + hasBin: true + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + dev: true + /wide-align@1.1.5: resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} dependencies: @@ -10277,3 +10571,8 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} dev: true + + /yocto-queue@1.0.0: + resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} + engines: {node: '>=12.20'} + dev: true From f6606eb7fddd6a0707644a4007af9d44fcc46a47 Mon Sep 17 00:00:00 2001 From: uttk-dev <97154037+uttk-dev@users.noreply.github.com> Date: Wed, 20 Sep 2023 15:41:53 +0900 Subject: [PATCH 06/14] =?UTF-8?q?feat:=20zenn-cli=20=E3=81=AE=20`test:serv?= =?UTF-8?q?er`=20=E3=82=92=20vitest=20=E3=81=A7=E5=AE=9F=E8=A1=8C=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/zenn-cli/jest.config.server.js | 31 ------------- packages/zenn-cli/package.json | 3 +- .../server/__tests__/commands/help.test.ts | 3 +- .../server/__tests__/commands/index.test.ts | 10 +++-- .../server/__tests__/commands/init.test.ts | 7 +-- .../__tests__/commands/new-article.test.ts | 7 +-- .../__tests__/commands/new-book.test.ts | 7 +-- .../server/__tests__/commands/preview.test.ts | 13 ++++-- .../server/__tests__/commands/version.test.ts | 5 ++- .../src/server/__tests__/lib/helper.test.ts | 11 ++--- .../src/server/__tests__/lib/log.test.ts | 7 +-- .../__tests__/lib/notify-update.test.ts | 33 +++++++------- .../src/server/__tests__/preview/app.test.ts | 45 ++++++++++--------- packages/zenn-cli/src/server/types.ts | 2 +- packages/zenn-cli/vitest.client.config.ts | 3 -- packages/zenn-cli/vitest.server.config.ts | 14 ++++++ 16 files changed, 97 insertions(+), 104 deletions(-) delete mode 100644 packages/zenn-cli/jest.config.server.js create mode 100644 packages/zenn-cli/vitest.server.config.ts diff --git a/packages/zenn-cli/jest.config.server.js b/packages/zenn-cli/jest.config.server.js deleted file mode 100644 index 742fe896..00000000 --- a/packages/zenn-cli/jest.config.server.js +++ /dev/null @@ -1,31 +0,0 @@ -// esmが使われているパッケージを宣言 -const esmPackages = [ - 'boxen', - 'string-width', - 'strip-ansi', - 'ansi-regex', - 'wrap-ansi', - 'widest-line', - 'ansi-styles', - 'configstore', - 'xdg-basedir', - 'unique-string', - 'crypto-random-string', -]; - -module.exports = { - testEnvironment: 'node', - moduleFileExtensions: ['js', 'json', 'ts'], - transform: { - '^.+\\.[jt]s$': '@swc/jest', - }, - testMatch: ['/src/server/__tests__/**/*.test.ts'], - resetMocks: true, - - // esmが使われているパッケージはcommonjsにトランスパイルする必要があるため - // esmパッケージのみを`transform`の対象に含める - // pnpmではルートの.pnpmにインストールされるため、それを考慮したパスを指定する必要がある - transformIgnorePatterns: [ - `node_modules/(?!(?:.pnpm/)?(${esmPackages.join('|')}))`, - ], -}; diff --git a/packages/zenn-cli/package.json b/packages/zenn-cli/package.json index 128348b0..cedb1140 100644 --- a/packages/zenn-cli/package.json +++ b/packages/zenn-cli/package.json @@ -31,7 +31,7 @@ "strict:lint": "eslint 'src/**/*.{ts,tsx}' --max-warnings 0", "test": "run-s test:client test:server", "test:client": "vitest run --config vitest.client.config.ts", - "test:server": "jest --config=jest.config.server.js", + "test:server": "vitest run --config=vitest.server.config.ts", "exec:zenn": "node ./dist/server/zenn.js" }, "devDependencies": { @@ -95,7 +95,6 @@ "ts-loader": "^9.4.2", "typescript": "^4.9.5", "vite": "^4.2.1", - "vite-tsconfig-paths": "^4.2.1", "vitest": "^0.34.4", "wait-on": "^7.0.1", "webpack": "^5.75.0", diff --git a/packages/zenn-cli/src/server/__tests__/commands/help.test.ts b/packages/zenn-cli/src/server/__tests__/commands/help.test.ts index fe16ec2b..675ed194 100644 --- a/packages/zenn-cli/src/server/__tests__/commands/help.test.ts +++ b/packages/zenn-cli/src/server/__tests__/commands/help.test.ts @@ -1,9 +1,10 @@ +import { vi, describe, test, expect, beforeEach } from 'vitest'; import { exec } from '../../commands/help'; import { commandListText } from '../../lib/messages'; describe('helpコマンドのテスト', () => { beforeEach(() => { - console.log = jest.fn(); + console.log = vi.fn(); }); test('ヘルプメッセージを表示する', () => { diff --git a/packages/zenn-cli/src/server/__tests__/commands/index.test.ts b/packages/zenn-cli/src/server/__tests__/commands/index.test.ts index 26bf0a20..edb4ba61 100644 --- a/packages/zenn-cli/src/server/__tests__/commands/index.test.ts +++ b/packages/zenn-cli/src/server/__tests__/commands/index.test.ts @@ -1,16 +1,18 @@ +import { vi, describe, test, expect, beforeEach, SpyInstance } from 'vitest'; import { exec } from '../../commands/index'; import * as Log from '../../lib/log'; import { commandListText } from '../../lib/messages'; import * as notify from '../../lib/notify-update'; describe('CLIのデフォルトの挙動のテスト', () => { - let notifyNeedUpdateCLIMock: jest.SpyInstance>; + let notifyNeedUpdateCLIMock: SpyInstance>; beforeEach(() => { // mock - console.log = jest.fn(); - jest.spyOn(Log, 'error').mockImplementation(); - notifyNeedUpdateCLIMock = jest + console.log = vi.fn(); + console.error = vi.fn(); + vi.spyOn(Log, 'error'); + notifyNeedUpdateCLIMock = vi .spyOn(notify, 'notifyNeedUpdateCLI') .mockResolvedValue(); }); diff --git a/packages/zenn-cli/src/server/__tests__/commands/init.test.ts b/packages/zenn-cli/src/server/__tests__/commands/init.test.ts index 72d3ea8c..ad49073f 100644 --- a/packages/zenn-cli/src/server/__tests__/commands/init.test.ts +++ b/packages/zenn-cli/src/server/__tests__/commands/init.test.ts @@ -1,3 +1,4 @@ +import { vi, describe, test, expect, beforeEach } from 'vitest'; import path from 'path'; import { exec } from '../../commands/init'; import * as helper from '../../lib/helper'; @@ -6,9 +7,9 @@ import { initHelpText } from '../../lib/messages'; describe('initコマンドのテスト', () => { beforeEach(() => { // mock - jest.spyOn(helper, 'generateFileIfNotExist').mockImplementation(); - console.log = jest.fn(); - console.error = jest.fn(); + vi.spyOn(helper, 'generateFileIfNotExist').mockReturnValue(undefined); + console.log = vi.fn(); + console.error = vi.fn(); }); test('ディレクトリに対して generateFileIfNotExist を実行する', () => { diff --git a/packages/zenn-cli/src/server/__tests__/commands/new-article.test.ts b/packages/zenn-cli/src/server/__tests__/commands/new-article.test.ts index 34b217b4..eeda1331 100644 --- a/packages/zenn-cli/src/server/__tests__/commands/new-article.test.ts +++ b/packages/zenn-cli/src/server/__tests__/commands/new-article.test.ts @@ -1,3 +1,4 @@ +import { vi, describe, test, expect, beforeEach } from 'vitest'; import path from 'path'; import { exec } from '../../commands/new-article'; import * as helper from '../../lib/helper'; @@ -9,9 +10,9 @@ describe('new:articleコマンドのテスト', () => { beforeEach(() => { // mock - jest.spyOn(helper, 'generateFileIfNotExist').mockImplementation(); - jest.spyOn(Log, 'error').mockImplementation(); - console.log = jest.fn(); + vi.spyOn(helper, 'generateFileIfNotExist').mockReturnValue(undefined); + vi.spyOn(Log, 'error').mockReturnValue(undefined); + console.log = vi.fn(); }); test('有効な引数に generateFileIfNotExist を実行する', () => { diff --git a/packages/zenn-cli/src/server/__tests__/commands/new-book.test.ts b/packages/zenn-cli/src/server/__tests__/commands/new-book.test.ts index 0153a163..fe12aa2f 100644 --- a/packages/zenn-cli/src/server/__tests__/commands/new-book.test.ts +++ b/packages/zenn-cli/src/server/__tests__/commands/new-book.test.ts @@ -1,3 +1,4 @@ +import { vi, describe, test, expect, beforeEach } from 'vitest'; import path from 'path'; import { exec } from '../../commands/new-book'; import * as helper from '../../lib/helper'; @@ -15,9 +16,9 @@ describe('new:book コマンドのテスト', () => { beforeEach(() => { // mock - jest.spyOn(helper, 'generateFileIfNotExist').mockImplementation(); - jest.spyOn(Log, 'error').mockImplementation(); - console.log = jest.fn(); + vi.spyOn(helper, 'generateFileIfNotExist').mockReturnValue(undefined); + vi.spyOn(Log, 'error').mockReturnValue(undefined); + console.log = vi.fn(); }); test('config.yaml のデフォルト値で generateFileIfNotExist を実行する', () => { diff --git a/packages/zenn-cli/src/server/__tests__/commands/preview.test.ts b/packages/zenn-cli/src/server/__tests__/commands/preview.test.ts index d5a4b0e2..2effb329 100644 --- a/packages/zenn-cli/src/server/__tests__/commands/preview.test.ts +++ b/packages/zenn-cli/src/server/__tests__/commands/preview.test.ts @@ -1,12 +1,17 @@ +import { vi, describe, test, expect, beforeEach } from 'vitest'; +import type { Server as HttpServer } from 'http'; import { exec } from '../../commands/preview'; import { previewHelpText } from '../../lib/messages'; import * as server from '../../lib/server'; describe('preview コマンドのテスト', () => { + let mockReturnServer: HttpServer; + beforeEach(() => { - console.log = jest.fn(); - jest.spyOn(server, 'startServer').mockImplementation(); - jest.spyOn(server, 'startLocalChangesWatcher').mockImplementation(); + console.log = vi.fn(); + mockReturnServer = {} as HttpServer; + vi.spyOn(server, 'startServer').mockResolvedValue(mockReturnServer); + vi.spyOn(server, 'startLocalChangesWatcher').mockResolvedValue(undefined); }); test('--help オプションを渡すとヘルプメッセージを表示する', async () => { @@ -63,7 +68,7 @@ describe('preview コマンドのテスト', () => { test('デフォルトでは startLocalChangesWatcher を実行する', async () => { await exec([]); expect(server.startLocalChangesWatcher).toHaveBeenCalledWith( - undefined, + mockReturnServer, `${process.cwd()}/{articles,books}/**/*` ); }); diff --git a/packages/zenn-cli/src/server/__tests__/commands/version.test.ts b/packages/zenn-cli/src/server/__tests__/commands/version.test.ts index 2904dd74..daf3d0fc 100644 --- a/packages/zenn-cli/src/server/__tests__/commands/version.test.ts +++ b/packages/zenn-cli/src/server/__tests__/commands/version.test.ts @@ -1,9 +1,10 @@ +import { vi, describe, test, expect, beforeEach } from 'vitest'; import { exec } from '../../commands/version'; describe('version コマンドのテスト', () => { - console.log = jest.fn(); + console.log = vi.fn(); beforeEach(() => { - console.log = jest.fn(); + console.log = vi.fn(); }); test('バージョン情報をコンソールに出力する', () => { diff --git a/packages/zenn-cli/src/server/__tests__/lib/helper.test.ts b/packages/zenn-cli/src/server/__tests__/lib/helper.test.ts index cedee3cd..a1c2d72e 100644 --- a/packages/zenn-cli/src/server/__tests__/lib/helper.test.ts +++ b/packages/zenn-cli/src/server/__tests__/lib/helper.test.ts @@ -1,3 +1,4 @@ +import { vi, describe, test, expect, beforeEach, afterEach } from 'vitest'; import path from 'path'; import fs from 'fs-extra'; import * as helper from '../../lib/helper'; @@ -24,9 +25,9 @@ describe('getCurrentCliVersion() のテスト', () => { describe('getWorkingPath() のテスト', () => { beforeEach(() => { // mock - jest.spyOn(process, 'cwd').mockReturnValue('foo'); - jest.spyOn(process, 'exit').mockImplementation(); - jest.spyOn(Log, 'error').mockImplementation(); + vi.spyOn(process, 'cwd').mockReturnValue('foo'); + vi.spyOn(process, 'exit').mockReturnValue(undefined as never); + vi.spyOn(Log, 'error').mockReturnValue(undefined); }); test('結合されたパスを返す', () => { @@ -156,10 +157,10 @@ describe('generateFileIfNotExist() のテスト', () => { describe('completeHtml() のテスト', () => { beforeEach(() => { // process.cwdがfixturesディレクトリを指すようにする - jest.spyOn(process, 'cwd').mockReturnValue(fixtureDirPath); + vi.spyOn(process, 'cwd').mockReturnValue(fixtureDirPath); }); - test.only('src の値が URL なら検証に成功する', () => { + test('src の値が URL なら検証に成功する', () => { const html = helper.completeHtml( '' ); diff --git a/packages/zenn-cli/src/server/__tests__/lib/log.test.ts b/packages/zenn-cli/src/server/__tests__/lib/log.test.ts index 04ba0f36..12467727 100644 --- a/packages/zenn-cli/src/server/__tests__/lib/log.test.ts +++ b/packages/zenn-cli/src/server/__tests__/lib/log.test.ts @@ -1,12 +1,13 @@ +import { vi, describe, test, expect, beforeEach, SpyInstance } from 'vitest'; import * as Log from '../../lib/log'; import colors from 'colors/safe'; describe('Log のテスト', () => { beforeEach(() => { // mock - console.log = jest.fn(); - console.warn = jest.fn(); - console.error = jest.fn(); + console.log = vi.fn(); + console.warn = vi.fn(); + console.error = vi.fn(); }); test('エラーメッセージを表示する', () => { diff --git a/packages/zenn-cli/src/server/__tests__/lib/notify-update.test.ts b/packages/zenn-cli/src/server/__tests__/lib/notify-update.test.ts index 82733ab7..8c69a206 100644 --- a/packages/zenn-cli/src/server/__tests__/lib/notify-update.test.ts +++ b/packages/zenn-cli/src/server/__tests__/lib/notify-update.test.ts @@ -1,3 +1,4 @@ +import { vi, describe, test, expect, beforeEach, SpyInstance } from 'vitest'; import * as helper from '../../lib/helper'; import { CLI_UPDATE_CHECK_INTERVAL, @@ -7,30 +8,28 @@ import { const localVersion = 'v0.0.1'; const publishedVersion = 'v0.0.2'; -const configGetMock = jest.fn(); +const configGetMock = vi.fn(); -jest.mock( - 'configstore', - () => - function () { - return { - set: () => void 0, - get: configGetMock.mockReturnValue(0), - }; - } -); +vi.mock('configstore', () => ({ + default: function () { + return { + set: () => void 0, + get: configGetMock.mockReturnValue(0), + }; + }, +})); describe('CLIのアップデート通知のテスト', () => { - let consoleLogMock: jest.SpyInstance; - let getCurrentCliVersionMock: jest.SpyInstance; - let getPublishedCliVersionMock: jest.SpyInstance; + let consoleLogMock: SpyInstance; + let getCurrentCliVersionMock: SpyInstance; + let getPublishedCliVersionMock: SpyInstance; beforeEach(() => { - consoleLogMock = jest.spyOn(console, 'log').mockImplementation(); - getCurrentCliVersionMock = jest + consoleLogMock = vi.spyOn(console, 'log').mockReturnValue(undefined); + getCurrentCliVersionMock = vi .spyOn(helper, 'getCurrentCliVersion') .mockReturnValue(localVersion); - getPublishedCliVersionMock = jest + getPublishedCliVersionMock = vi .spyOn(helper, 'getPublishedCliVersion') .mockResolvedValue(publishedVersion); }); diff --git a/packages/zenn-cli/src/server/__tests__/preview/app.test.ts b/packages/zenn-cli/src/server/__tests__/preview/app.test.ts index 40248558..30de9e01 100644 --- a/packages/zenn-cli/src/server/__tests__/preview/app.test.ts +++ b/packages/zenn-cli/src/server/__tests__/preview/app.test.ts @@ -1,3 +1,4 @@ +import { vi, describe, test, expect } from 'vitest'; import path from 'path'; import supertest from 'supertest'; import * as helper from '../../lib/helper'; @@ -7,7 +8,7 @@ const fixturesRootPath = path.resolve(__dirname, '..', 'fixtures'); describe('/api/articles', () => { test('should respond with articles data in cwd', async () => { - jest.spyOn(process, 'cwd').mockReturnValue(fixturesRootPath); + vi.spyOn(process, 'cwd').mockReturnValue(fixturesRootPath); const res = await supertest(app).get('/api/articles').expect(200); expect(res.body.articles).toHaveLength(2); expect(res.body.articles).toEqual( @@ -33,15 +34,15 @@ describe('/api/articles', () => { }); test('should not include bodyHtml', async () => { - jest.spyOn(process, 'cwd').mockReturnValue(fixturesRootPath); + vi.spyOn(process, 'cwd').mockReturnValue(fixturesRootPath); const res = await supertest(app).get('/api/articles').expect(200); expect(res.body.articles[0].bodyHtml).toBe(undefined); }); test('should respond with empty array if no article exists in cwd', async () => { - jest - .spyOn(process, 'cwd') - .mockReturnValue(`${fixturesRootPath}/empty-directories`); + vi.spyOn(process, 'cwd').mockReturnValue( + `${fixturesRootPath}/empty-directories` + ); const res = await supertest(app).get('/api/articles').expect(200); expect(res.body.articles).toEqual([]); }); @@ -49,7 +50,7 @@ describe('/api/articles', () => { describe('/api/articles/:slug', () => { test('should respond with the article data in cwd', async () => { - jest.spyOn(process, 'cwd').mockReturnValue(fixturesRootPath); + vi.spyOn(process, 'cwd').mockReturnValue(fixturesRootPath); const res = await supertest(app) .get('/api/articles/my-first-post') .expect(200); @@ -69,7 +70,7 @@ describe('/api/articles/:slug', () => { describe('/api/books', () => { test('should respond with books data in cwd', async () => { - jest.spyOn(process, 'cwd').mockReturnValue(fixturesRootPath); + vi.spyOn(process, 'cwd').mockReturnValue(fixturesRootPath); const res = await supertest(app).get('/api/books').expect(200); expect(res.body.books).toHaveLength(2); expect(res.body.books).toEqual( @@ -98,9 +99,9 @@ describe('/api/books', () => { }); test('should respond with empty array if no book exists in cwd', async () => { - jest - .spyOn(process, 'cwd') - .mockReturnValue(`${fixturesRootPath}/empty-directories`); + vi.spyOn(process, 'cwd').mockReturnValue( + `${fixturesRootPath}/empty-directories` + ); const res = await supertest(app).get('/api/books').expect(200); expect(res.body.books).toEqual([]); }); @@ -108,7 +109,7 @@ describe('/api/books', () => { describe('/api/books/:slug', () => { test('should respond with the book data in cwd', async () => { - jest.spyOn(process, 'cwd').mockReturnValue(fixturesRootPath); + vi.spyOn(process, 'cwd').mockReturnValue(fixturesRootPath); const res = await supertest(app) .get('/api/books/my-first-book') .expect(200); @@ -133,7 +134,7 @@ describe('/api/books/:slug', () => { describe('/api/books/:book_slug/chapters', () => { test('should respond with chapters orderby specified on config.yaml', async () => { - jest.spyOn(process, 'cwd').mockReturnValue(fixturesRootPath); + vi.spyOn(process, 'cwd').mockReturnValue(fixturesRootPath); const res = await supertest(app) .get('/api/books/my-first-book/chapters') .expect(200); @@ -163,7 +164,7 @@ describe('/api/books/:book_slug/chapters', () => { }); test('should respond with chapters orderby position specified on filename', async () => { - jest.spyOn(process, 'cwd').mockReturnValue(fixturesRootPath); + vi.spyOn(process, 'cwd').mockReturnValue(fixturesRootPath); const res = await supertest(app) .get('/api/books/my-second-book/chapters') .expect(200); @@ -194,7 +195,7 @@ describe('/api/books/:book_slug/chapters', () => { }); test('should not include bodyHtml', async () => { - jest.spyOn(process, 'cwd').mockReturnValue(fixturesRootPath); + vi.spyOn(process, 'cwd').mockReturnValue(fixturesRootPath); const res = await supertest(app) .get('/api/books/my-second-book/chapters') .expect(200); @@ -204,7 +205,7 @@ describe('/api/books/:book_slug/chapters', () => { describe('/api/books/:book_slug/chapters/:chapter_filename', () => { test('should respond with the chapter in cwd', async () => { - jest.spyOn(process, 'cwd').mockReturnValue(fixturesRootPath); + vi.spyOn(process, 'cwd').mockReturnValue(fixturesRootPath); const res = await supertest(app) .get('/api/books/my-first-book/chapters/example2.md') .expect(200); @@ -221,7 +222,7 @@ describe('/api/books/:book_slug/chapters/:chapter_filename', () => { }); test('should respond with chapters orderby position specified on filename', async () => { - jest.spyOn(process, 'cwd').mockReturnValue(fixturesRootPath); + vi.spyOn(process, 'cwd').mockReturnValue(fixturesRootPath); const res = await supertest(app) .get('/api/books/my-second-book/chapters') .expect(200); @@ -254,7 +255,7 @@ describe('/api/books/:book_slug/chapters/:chapter_filename', () => { describe('/api/cli-version', () => { test('should respond with updateAvailable:true if current v differs from published v', async () => { - jest.spyOn(helper, 'getPublishedCliVersion').mockResolvedValue('2.2.2'); // mock + vi.spyOn(helper, 'getPublishedCliVersion').mockResolvedValue('2.2.2'); // mock const res = await supertest(app).get('/api/cli-version').expect(200); expect(res.body.latest).toEqual('2.2.2'); expect(res.body.current).toMatch(/^0\.[0-9.]+/); @@ -265,9 +266,9 @@ describe('/api/cli-version', () => { const actualCurrentVersion = helper.getCurrentCliVersion(); if (!actualCurrentVersion) throw 'something wrong!'; // mock getPublishedCliVersion to return the same version - jest - .spyOn(helper, 'getPublishedCliVersion') - .mockResolvedValue(actualCurrentVersion); + vi.spyOn(helper, 'getPublishedCliVersion').mockResolvedValue( + actualCurrentVersion + ); const res = await supertest(app).get('/api/cli-version').expect(200); expect(res.body.latest).toEqual(actualCurrentVersion); expect(res.body.current).toMatch(actualCurrentVersion); @@ -279,14 +280,14 @@ describe('/api/local-info', () => { test('should respond with hasInit:true if article directory exists in cwd', async () => { // mock process.cwd() // articles directory must be located in fixtures dir - jest.spyOn(process, 'cwd').mockReturnValue(fixturesRootPath); + vi.spyOn(process, 'cwd').mockReturnValue(fixturesRootPath); const res = await supertest(app).get('/api/local-info').expect(200); expect(res.body.hasInit).toBe(true); }); test('should respond with hasInit:false if article directory exists in cwd', async () => { // mock process.cwd() - jest.spyOn(process, 'cwd').mockReturnValue(`${fixturesRootPath}/empty`); + vi.spyOn(process, 'cwd').mockReturnValue(`${fixturesRootPath}/empty`); const res = await supertest(app).get('/api/local-info').expect(200); expect(res.body.hasInit).toBe(false); }); diff --git a/packages/zenn-cli/src/server/types.ts b/packages/zenn-cli/src/server/types.ts index 4cc630b0..c284011a 100644 --- a/packages/zenn-cli/src/server/types.ts +++ b/packages/zenn-cli/src/server/types.ts @@ -1 +1 @@ -export type CliExecFn = (argv?: string[]) => void; +export type CliExecFn = (argv?: string[]) => void | Promise; diff --git a/packages/zenn-cli/vitest.client.config.ts b/packages/zenn-cli/vitest.client.config.ts index 169fb02c..7d81d7c1 100644 --- a/packages/zenn-cli/vitest.client.config.ts +++ b/packages/zenn-cli/vitest.client.config.ts @@ -1,6 +1,5 @@ /// -import react from '@vitejs/plugin-react'; // React の auto import jsx を有効にするプラグイン import { defineConfig } from 'vitest/config'; export default defineConfig({ @@ -8,8 +7,6 @@ export default defineConfig({ target: 'esnext', }, - plugins: [react()], - test: { environment: 'jsdom', include: [ diff --git a/packages/zenn-cli/vitest.server.config.ts b/packages/zenn-cli/vitest.server.config.ts new file mode 100644 index 00000000..94ec1ff0 --- /dev/null +++ b/packages/zenn-cli/vitest.server.config.ts @@ -0,0 +1,14 @@ +/// + +import { defineConfig } from 'vitest/config'; + +export default defineConfig({ + build: { + target: 'esnext', + }, + + test: { + environment: 'jsdom', + include: ['./src/server/__tests__/**/*.test.ts'], + }, +}); From 8cf7984157d5c6f899dbeb8accab7ee6c43b9ed8 Mon Sep 17 00:00:00 2001 From: uttk-dev <97154037+uttk-dev@users.noreply.github.com> Date: Wed, 20 Sep 2023 15:43:42 +0900 Subject: [PATCH 07/14] =?UTF-8?q?feat:=20zenn-cli=20=E3=81=8B=E3=82=89=20j?= =?UTF-8?q?est=20=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/zenn-cli/package.json | 6 +- pnpm-lock.yaml | 369 ++++++--------------------------- 2 files changed, 65 insertions(+), 310 deletions(-) diff --git a/packages/zenn-cli/package.json b/packages/zenn-cli/package.json index cedb1140..d3b244cb 100644 --- a/packages/zenn-cli/package.json +++ b/packages/zenn-cli/package.json @@ -35,14 +35,11 @@ "exec:zenn": "node ./dist/server/zenn.js" }, "devDependencies": { - "@swc/core": "1.2.205", - "@swc/jest": "^0.2.24", "@types/configstore": "^6.0.0", "@types/connect-history-api-fallback": "^1.3.5", "@types/emoji-regex": "^9.2.0", "@types/express": "^4.17.17", "@types/fs-extra": "^11.0.1", - "@types/jest": "^29.4.0", "@types/js-yaml": "^4.0.5", "@types/node": "^18.13.0", "@types/node-fetch": "^2.6.2", @@ -74,9 +71,8 @@ "gray-matter": "^4.0.3", "history": "^5.3.0", "image-size": "^1.0.2", - "jest": "^29.4.2", - "jest-environment-jsdom": "^29.4.2", "js-yaml": "^4.1.0", + "jsdom": "^22.1.0", "node-fetch": "^2.6.9", "node-loader": "^2.0.0", "nodemon": "^2.0.20", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b792df6f..b4b8f3dd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,12 +20,6 @@ importers: packages/zenn-cli: devDependencies: - '@swc/core': - specifier: 1.2.205 - version: 1.2.205 - '@swc/jest': - specifier: ^0.2.24 - version: 0.2.24(@swc/core@1.2.205) '@types/configstore': specifier: ^6.0.0 version: 6.0.0 @@ -41,9 +35,6 @@ importers: '@types/fs-extra': specifier: ^11.0.1 version: 11.0.1 - '@types/jest': - specifier: ^29.4.0 - version: 29.4.0 '@types/js-yaml': specifier: ^4.0.5 version: 4.0.5 @@ -137,15 +128,12 @@ importers: image-size: specifier: ^1.0.2 version: 1.0.2 - jest: - specifier: ^29.4.2 - version: 29.4.2(@types/node@18.13.0) - jest-environment-jsdom: - specifier: ^29.4.2 - version: 29.4.2 js-yaml: specifier: ^4.1.0 version: 4.1.0 + jsdom: + specifier: ^22.1.0 + version: 22.1.0 node-fetch: specifier: ^2.6.9 version: 2.6.9 @@ -202,13 +190,13 @@ importers: version: 4.2.1(@types/node@18.13.0) vitest: specifier: ^0.34.4 - version: 0.34.4 + version: 0.34.4(jsdom@22.1.0) wait-on: specifier: ^7.0.1 version: 7.0.1 webpack: specifier: ^5.75.0 - version: 5.75.0(@swc/core@1.2.205)(esbuild@0.17.8)(webpack-cli@5.0.1) + version: 5.75.0(esbuild@0.17.8)(webpack-cli@5.0.1) webpack-cli: specifier: ^5.0.1 version: 5.0.1(webpack@5.75.0) @@ -2748,33 +2736,6 @@ packages: resolution: {integrity: sha512-3tfhRLlv8w3GSNzjEx3y1JIyHpCuBhqXN6tILRTR4IhZcrJb6WJJo12jZ/lKiT9VITg9kHHHg6yVsDwO5nnZqw==} dev: false - /@swc/core-android-arm-eabi@1.2.205: - resolution: {integrity: sha512-HfiuVA1JDHMSRQ8nE1DcemUgZ1PKaPwit4i7q3xin0NVbVHY1xkJyQFuLVh3VxTvGKKkF3hi8GJMVQgOXWL6kg==} - engines: {node: '>=10'} - cpu: [arm] - os: [android] - requiresBuild: true - dev: true - optional: true - - /@swc/core-android-arm64@1.2.205: - resolution: {integrity: sha512-sRGZBV2dOnmh8gWWFo9HVOHdKa33zIsF8/8oYEGtq+2/s96UlAKltO2AA7HH9RaO/fT1tzBZStp+fEMUhDk/FA==} - engines: {node: '>=10'} - cpu: [arm64] - os: [android] - requiresBuild: true - dev: true - optional: true - - /@swc/core-darwin-arm64@1.2.205: - resolution: {integrity: sha512-JwVDfKS7vp7zzOQXWNwwcF41h4r3DWEpK6DQjz18WJyS1VVOcpVQGyuE7kSPjcnG01ZxBL9JPwwT353i/8IwDg==} - engines: {node: '>=10'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - /@swc/core-darwin-arm64@1.3.26: resolution: {integrity: sha512-FWWflBfKRYrUJtko2xiedC5XCa31O75IZZqnTWuLpe9g3C5tnUuF3M8LSXZS/dn6wprome1MhtG9GMPkSYkhkg==} engines: {node: '>=10'} @@ -2784,15 +2745,6 @@ packages: dev: true optional: true - /@swc/core-darwin-x64@1.2.205: - resolution: {integrity: sha512-malz2I+w6xFF1QyTmPGt0Y0NEMbUcrvfr5gUfZDGjxMhPPlS7k6fXucuZxVr9VVaM+JGq1SidVODmZ84jb1qHg==} - engines: {node: '>=10'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - /@swc/core-darwin-x64@1.3.26: resolution: {integrity: sha512-0uQeebAtsewqJ2b35aPZstGrylwd6oJjUyAJOfVJNbremFSJ5JzytB3NoDCIw7CT5UQrSRpvD3mU95gfdQjDGA==} engines: {node: '>=10'} @@ -2802,24 +2754,6 @@ packages: dev: true optional: true - /@swc/core-freebsd-x64@1.2.205: - resolution: {integrity: sha512-/nZrG1z0T7h97AsOb/wOtYlnh4WEuNppv3XKQIMPj32YNQdMBVgpybVTVRIs1GQGZMd1/7jAy5BVQcwQjUbrLg==} - engines: {node: '>=10'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - - /@swc/core-linux-arm-gnueabihf@1.2.205: - resolution: {integrity: sha512-mTA3vETMdBmpecUyI9waZYsp7FABhew4e81psspmFpDyfty0SLISWZDnvPAn0pSnb2fWhzKwDC5kdXHKUmLJuA==} - engines: {node: '>=10'} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@swc/core-linux-arm-gnueabihf@1.3.26: resolution: {integrity: sha512-06T+LbVFlyciQtwrUB5/a16A1ju1jFoYvd/hq9TWhf7GrtL43U7oJIgqMOPHx2j0+Ps2R3S6R/UUN5YXu618zA==} engines: {node: '>=10'} @@ -2829,15 +2763,6 @@ packages: dev: true optional: true - /@swc/core-linux-arm64-gnu@1.2.205: - resolution: {integrity: sha512-qGzFGryeQE+O5SFK7Nn2ESqCEnv00rnzhf11WZF9V71EZ15amIhmbcwHqvFpoRSDw8hZnqoGqfPRfoJbouptnA==} - engines: {node: '>=10'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@swc/core-linux-arm64-gnu@1.3.26: resolution: {integrity: sha512-2NT/0xALPfK+U01qIlHxjkGdIj6F0txhu1U2v6B0YP2+k0whL2gCgYeg9QUvkYEXSD5r1Yx+vcb2R/vaSCSClg==} engines: {node: '>=10'} @@ -2847,15 +2772,6 @@ packages: dev: true optional: true - /@swc/core-linux-arm64-musl@1.2.205: - resolution: {integrity: sha512-uLJoX9L/4Xg3sLMjAbIhzbTe5gD/MBA8VETBeEkLtgb7a0ys1kvn9xQ6qLw6A71amEPlI+VABnoTRdUEaBSV9Q==} - engines: {node: '>=10'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@swc/core-linux-arm64-musl@1.3.26: resolution: {integrity: sha512-64KrTay9hC0mTvZ1AmEFmNEwV5QDjw9U7PJU5riotSc28I+Q/ZoM0qcSFW9JRRa6F2Tr+IfMtyv8+eB2//BQ5g==} engines: {node: '>=10'} @@ -2865,15 +2781,6 @@ packages: dev: true optional: true - /@swc/core-linux-x64-gnu@1.2.205: - resolution: {integrity: sha512-gQsjcYlkWKP1kceQIsoHGrOrG7ygW3ojNsSnYoZ5DG5PipRA4eeUfO9YIfrmoa29LiVNjmRPfUJa8O1UHDG5ew==} - engines: {node: '>=10'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@swc/core-linux-x64-gnu@1.3.26: resolution: {integrity: sha512-Te8G13l3dcRM1Mf3J4JzGUngzNXLKnMYlUmBOYN/ORsx7e+VNelR3zsTLHC0+0jGqELDgqvMyzDfk+dux/C/bQ==} engines: {node: '>=10'} @@ -2883,15 +2790,6 @@ packages: dev: true optional: true - /@swc/core-linux-x64-musl@1.2.205: - resolution: {integrity: sha512-LR5ukqBltQc++2eX3qEj/H8KtOt0V3CmtgXNOiNCUxvPDT8mYz/8MJhYOrofonND0RKfXyyPW7dRxg62ceTLSQ==} - engines: {node: '>=10'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@swc/core-linux-x64-musl@1.3.26: resolution: {integrity: sha512-nqQWuSM6OTKepUiQ9+rXgERq/JiO72RBOpXKO2afYppsL96sngjIRewV74v5f6IAfyzw+k+AhC5pgRA4Xu/Jkg==} engines: {node: '>=10'} @@ -2901,15 +2799,6 @@ packages: dev: true optional: true - /@swc/core-win32-arm64-msvc@1.2.205: - resolution: {integrity: sha512-NjcLWm4mOy78LAEt7pqFl+SLcCyqnSlUP729XRd1uRvKwt1Cwch5SQRdoaFqwf1DaEQy4H4iuGPynkfarlb1kQ==} - engines: {node: '>=10'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - /@swc/core-win32-arm64-msvc@1.3.26: resolution: {integrity: sha512-xx34mx+9IBV1sun7sxoNFiqNom9wiOuvsQFJUyQptCnZHgYwOr9OI204LBF95dCcBCZsTm2hT1wBnySJOeimYw==} engines: {node: '>=10'} @@ -2919,15 +2808,6 @@ packages: dev: true optional: true - /@swc/core-win32-ia32-msvc@1.2.205: - resolution: {integrity: sha512-+6byrRxIXgZ0zmLL6ZeX1HBBrAqvCy8MR5Yz0SO26jR8OPZXJCgZXL9BTsZO+YEG4f32ZOlZh3nnHCl6Dcb4GA==} - engines: {node: '>=10'} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true - optional: true - /@swc/core-win32-ia32-msvc@1.3.26: resolution: {integrity: sha512-48LZ/HKNuU9zl8c7qG6IQKb5rBCwmJgysGOmEGzTRBYxAf/x6Scmt0aqxCoV4J02HOs2WduCBDnhUKsSQ2kcXQ==} engines: {node: '>=10'} @@ -2937,15 +2817,6 @@ packages: dev: true optional: true - /@swc/core-win32-x64-msvc@1.2.205: - resolution: {integrity: sha512-RRSkyAol0c7sU9gejtrpF8TLmdYdBjLutcmQHtLKbWTm74ZLidZpF28G0J2tD7HNmzQnMpLzyoT1jW9JgLwzVg==} - engines: {node: '>=10'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - /@swc/core-win32-x64-msvc@1.3.26: resolution: {integrity: sha512-UPe7S+MezD/S6cKBIc50TduGzmw6PBz1Ms5p+5wDLOKYNS/LSEM4iRmLwvePzP5X8mOyesXrsbwxLy8KHP65Yw==} engines: {node: '>=10'} @@ -2955,26 +2826,6 @@ packages: dev: true optional: true - /@swc/core@1.2.205: - resolution: {integrity: sha512-evq0/tFyYdYgOhKb//+G93fxe9zwFxtme7NL7wSiEF8+4/ON4Y5AI9eHLoqddXqs3W8Y0HQi+rJmlrkCibrseA==} - engines: {node: '>=10'} - hasBin: true - optionalDependencies: - '@swc/core-android-arm-eabi': 1.2.205 - '@swc/core-android-arm64': 1.2.205 - '@swc/core-darwin-arm64': 1.2.205 - '@swc/core-darwin-x64': 1.2.205 - '@swc/core-freebsd-x64': 1.2.205 - '@swc/core-linux-arm-gnueabihf': 1.2.205 - '@swc/core-linux-arm64-gnu': 1.2.205 - '@swc/core-linux-arm64-musl': 1.2.205 - '@swc/core-linux-x64-gnu': 1.2.205 - '@swc/core-linux-x64-musl': 1.2.205 - '@swc/core-win32-arm64-msvc': 1.2.205 - '@swc/core-win32-ia32-msvc': 1.2.205 - '@swc/core-win32-x64-msvc': 1.2.205 - dev: true - /@swc/core@1.3.26: resolution: {integrity: sha512-U7vEsaLn3IGg0XCRLJX/GTkK9WIfFHUX5USdrp1L2QD29sWPe25HqNndXmUR9KytzKmpDMNoUuHyiuhpVrnNeQ==} engines: {node: '>=10'} @@ -2992,17 +2843,6 @@ packages: '@swc/core-win32-x64-msvc': 1.3.26 dev: true - /@swc/jest@0.2.24(@swc/core@1.2.205): - resolution: {integrity: sha512-fwgxQbM1wXzyKzl1+IW0aGrRvAA8k0Y3NxFhKigbPjOJ4mCKnWEcNX9HQS3gshflcxq8YKhadabGUVfdwjCr6Q==} - engines: {npm: '>= 7.0.0'} - peerDependencies: - '@swc/core': '*' - dependencies: - '@jest/create-cache-key-function': 27.5.1 - '@swc/core': 1.2.205 - jsonc-parser: 3.2.0 - dev: true - /@swc/jest@0.2.24(@swc/core@1.3.26): resolution: {integrity: sha512-fwgxQbM1wXzyKzl1+IW0aGrRvAA8k0Y3NxFhKigbPjOJ4mCKnWEcNX9HQS3gshflcxq8YKhadabGUVfdwjCr6Q==} engines: {npm: '>= 7.0.0'} @@ -3175,14 +3015,6 @@ packages: resolution: {integrity: sha512-FhpRzf927MNQdRZP0J5DLIdTXhjLYzeUTmLAu69mnVksLH9CJY3IuSeEgbKUki7GQZm0WqDkGzyxju2EZGD2wA==} dev: true - /@types/jsdom@20.0.1: - resolution: {integrity: sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==} - dependencies: - '@types/node': 18.13.0 - '@types/tough-cookie': 4.0.2 - parse5: 7.1.2 - dev: true - /@types/json-schema@7.0.11: resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==} dev: true @@ -3308,10 +3140,6 @@ packages: '@types/superagent': 4.1.16 dev: true - /@types/tough-cookie@4.0.2: - resolution: {integrity: sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw==} - dev: true - /@types/ws@8.5.4: resolution: {integrity: sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==} dependencies: @@ -3631,7 +3459,7 @@ packages: webpack: 5.x.x webpack-cli: 5.x.x dependencies: - webpack: 5.75.0(@swc/core@1.2.205)(esbuild@0.17.8)(webpack-cli@5.0.1) + webpack: 5.75.0(esbuild@0.17.8)(webpack-cli@5.0.1) webpack-cli: 5.0.1(webpack@5.75.0) dev: true @@ -3642,7 +3470,7 @@ packages: webpack: 5.x.x webpack-cli: 5.x.x dependencies: - webpack: 5.75.0(@swc/core@1.2.205)(esbuild@0.17.8)(webpack-cli@5.0.1) + webpack: 5.75.0(esbuild@0.17.8)(webpack-cli@5.0.1) webpack-cli: 5.0.1(webpack@5.75.0) dev: true @@ -3657,7 +3485,7 @@ packages: webpack-dev-server: optional: true dependencies: - webpack: 5.75.0(@swc/core@1.2.205)(esbuild@0.17.8)(webpack-cli@5.0.1) + webpack: 5.75.0(esbuild@0.17.8)(webpack-cli@5.0.1) webpack-cli: 5.0.1(webpack@5.75.0) dev: true @@ -3705,13 +3533,6 @@ packages: negotiator: 0.6.3 dev: true - /acorn-globals@7.0.1: - resolution: {integrity: sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==} - dependencies: - acorn: 8.8.2 - acorn-walk: 8.2.0 - dev: true - /acorn-import-assertions@1.8.0(acorn@8.8.2): resolution: {integrity: sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==} peerDependencies: @@ -4791,19 +4612,11 @@ packages: hasBin: true dev: true - /cssom@0.3.8: - resolution: {integrity: sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==} - dev: true - - /cssom@0.5.0: - resolution: {integrity: sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==} - dev: true - - /cssstyle@2.3.0: - resolution: {integrity: sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==} - engines: {node: '>=8'} + /cssstyle@3.0.0: + resolution: {integrity: sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg==} + engines: {node: '>=14'} dependencies: - cssom: 0.3.8 + rrweb-cssom: 0.6.0 dev: true /csstype@3.1.1: @@ -4815,13 +4628,13 @@ packages: engines: {node: '>=8'} dev: true - /data-urls@3.0.2: - resolution: {integrity: sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==} - engines: {node: '>=12'} + /data-urls@4.0.0: + resolution: {integrity: sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g==} + engines: {node: '>=14'} dependencies: abab: 2.0.6 whatwg-mimetype: 3.0.0 - whatwg-url: 11.0.0 + whatwg-url: 12.0.1 dev: true /dateformat@3.0.3: @@ -5198,7 +5011,7 @@ packages: esbuild: 0.17.8 get-tsconfig: 4.4.0 loader-utils: 2.0.4 - webpack: 5.75.0(@swc/core@1.2.205)(esbuild@0.17.8)(webpack-cli@5.0.1) + webpack: 5.75.0(esbuild@0.17.8)(webpack-cli@5.0.1) webpack-sources: 1.4.3 dev: true @@ -5266,19 +5079,6 @@ packages: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - /escodegen@2.0.0: - resolution: {integrity: sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==} - engines: {node: '>=6.0'} - hasBin: true - dependencies: - esprima: 4.0.1 - estraverse: 5.3.0 - esutils: 2.0.3 - optionator: 0.8.3 - optionalDependencies: - source-map: 0.6.1 - dev: true - /eslint-config-prettier@8.6.0(eslint@8.34.0): resolution: {integrity: sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA==} hasBin: true @@ -6710,29 +6510,6 @@ packages: pretty-format: 29.7.0 dev: true - /jest-environment-jsdom@29.4.2: - resolution: {integrity: sha512-v1sH4Q0JGM+LPEGqHNM+m+uTMf3vpXpKiuDYqWUAh+0c9+nc7scGE+qTR5JuE+OOTDnwfzPgcv9sMq6zWAOaVg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - canvas: ^2.5.0 - peerDependenciesMeta: - canvas: - optional: true - dependencies: - '@jest/environment': 29.4.2 - '@jest/fake-timers': 29.4.2 - '@jest/types': 29.4.2 - '@types/jsdom': 20.0.1 - '@types/node': 18.13.0 - jest-mock: 29.4.2 - jest-util: 29.4.2 - jsdom: 20.0.3 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - dev: true - /jest-environment-node@29.4.2: resolution: {integrity: sha512-MLPrqUcOnNBc8zTOfqBbxtoa8/Ee8tZ7UFW7hRDQSUT+NGsvS96wlbHGTf+EFAT9KC3VNb7fWEM6oyvmxtE/9w==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -7055,9 +6832,9 @@ packages: argparse: 2.0.1 dev: true - /jsdom@20.0.3: - resolution: {integrity: sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==} - engines: {node: '>=14'} + /jsdom@22.1.0: + resolution: {integrity: sha512-/9AVW7xNbsBv6GfWho4TTNjEo9fe6Zhf9O7s0Fhhr3u+awPwAJMKwAMXnkk5vBxflqLW9hTHX/0cs+P3gW+cQw==} + engines: {node: '>=16'} peerDependencies: canvas: ^2.5.0 peerDependenciesMeta: @@ -7065,30 +6842,27 @@ packages: optional: true dependencies: abab: 2.0.6 - acorn: 8.8.2 - acorn-globals: 7.0.1 - cssom: 0.5.0 - cssstyle: 2.3.0 - data-urls: 3.0.2 + cssstyle: 3.0.0 + data-urls: 4.0.0 decimal.js: 10.4.3 domexception: 4.0.0 - escodegen: 2.0.0 form-data: 4.0.0 html-encoding-sniffer: 3.0.0 http-proxy-agent: 5.0.0 https-proxy-agent: 5.0.1 is-potential-custom-element-name: 1.0.1 - nwsapi: 2.2.2 + nwsapi: 2.2.7 parse5: 7.1.2 + rrweb-cssom: 0.6.0 saxes: 6.0.0 symbol-tree: 3.2.4 - tough-cookie: 4.1.2 + tough-cookie: 4.1.3 w3c-xmlserializer: 4.0.0 webidl-conversions: 7.0.0 whatwg-encoding: 2.0.0 whatwg-mimetype: 3.0.0 - whatwg-url: 11.0.0 - ws: 8.12.1 + whatwg-url: 12.0.1 + ws: 8.14.2 xml-name-validator: 4.0.0 transitivePeerDependencies: - bufferutil @@ -7182,14 +6956,6 @@ packages: engines: {node: '>=6'} dev: true - /levn@0.3.0: - resolution: {integrity: sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==} - engines: {node: '>= 0.8.0'} - dependencies: - prelude-ls: 1.1.2 - type-check: 0.3.2 - dev: true - /levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} @@ -7804,7 +7570,7 @@ packages: webpack: ^5.0.0 dependencies: loader-utils: 2.0.4 - webpack: 5.75.0(@swc/core@1.2.205)(esbuild@0.17.8)(webpack-cli@5.0.1) + webpack: 5.75.0(esbuild@0.17.8)(webpack-cli@5.0.1) dev: true /node-releases@2.0.10: @@ -7995,8 +7761,8 @@ packages: dependencies: boolbase: 1.0.0 - /nwsapi@2.2.2: - resolution: {integrity: sha512-90yv+6538zuvUMnN+zCr8LuV6bPFdq50304114vJYJ8RDyK8D5O9Phpbd6SZWgI7PwzmmfN1upeOJlvybDSgCw==} + /nwsapi@2.2.7: + resolution: {integrity: sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==} dev: true /object-inspect@1.12.3: @@ -8047,18 +7813,6 @@ packages: is-wsl: 2.2.0 dev: true - /optionator@0.8.3: - resolution: {integrity: sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==} - engines: {node: '>= 0.8.0'} - dependencies: - deep-is: 0.1.4 - fast-levenshtein: 2.0.6 - levn: 0.3.0 - prelude-ls: 1.1.2 - type-check: 0.3.2 - word-wrap: 1.2.3 - dev: true - /optionator@0.9.1: resolution: {integrity: sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==} engines: {node: '>= 0.8.0'} @@ -8415,11 +8169,6 @@ packages: picocolors: 1.0.0 source-map-js: 1.0.2 - /prelude-ls@1.1.2: - resolution: {integrity: sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==} - engines: {node: '>= 0.8.0'} - dev: true - /prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} @@ -8873,6 +8622,10 @@ packages: fsevents: 2.3.2 dev: true + /rrweb-cssom@0.6.0: + resolution: {integrity: sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==} + dev: true + /run-async@2.4.1: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} engines: {node: '>=0.12.0'} @@ -9498,7 +9251,7 @@ packages: engines: {node: '>=8'} dev: true - /terser-webpack-plugin@5.3.6(@swc/core@1.2.205)(esbuild@0.17.8)(webpack@5.75.0): + /terser-webpack-plugin@5.3.6(esbuild@0.17.8)(webpack@5.75.0): resolution: {integrity: sha512-kfLFk+PoLUQIbLmB1+PZDMRSZS99Mp+/MHqDNmMA6tOItzRt+Npe3E+fsMs5mfcM0wCtrrdU387UnV+vnSffXQ==} engines: {node: '>= 10.13.0'} peerDependencies: @@ -9515,13 +9268,12 @@ packages: optional: true dependencies: '@jridgewell/trace-mapping': 0.3.17 - '@swc/core': 1.2.205 esbuild: 0.17.8 jest-worker: 27.5.1 schema-utils: 3.1.1 serialize-javascript: 6.0.1 terser: 5.16.3 - webpack: 5.75.0(@swc/core@1.2.205)(esbuild@0.17.8)(webpack-cli@5.0.1) + webpack: 5.75.0(esbuild@0.17.8)(webpack-cli@5.0.1) dev: true /terser@5.16.3: @@ -9619,8 +9371,8 @@ packages: nopt: 1.0.10 dev: true - /tough-cookie@4.1.2: - resolution: {integrity: sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==} + /tough-cookie@4.1.3: + resolution: {integrity: sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==} engines: {node: '>=6'} dependencies: psl: 1.9.0 @@ -9633,9 +9385,9 @@ packages: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} dev: true - /tr46@3.0.0: - resolution: {integrity: sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==} - engines: {node: '>=12'} + /tr46@4.1.1: + resolution: {integrity: sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==} + engines: {node: '>=14'} dependencies: punycode: 2.3.0 dev: true @@ -9662,7 +9414,7 @@ packages: micromatch: 4.0.5 semver: 7.3.8 typescript: 4.9.5 - webpack: 5.75.0(@swc/core@1.2.205)(esbuild@0.17.8)(webpack-cli@5.0.1) + webpack: 5.75.0(esbuild@0.17.8)(webpack-cli@5.0.1) dev: true /tslib@1.14.1: @@ -9755,13 +9507,6 @@ packages: turbo-windows-arm64: 1.7.4 dev: true - /type-check@0.3.2: - resolution: {integrity: sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==} - engines: {node: '>= 0.8.0'} - dependencies: - prelude-ls: 1.1.2 - dev: true - /type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -10079,7 +9824,7 @@ packages: fsevents: 2.3.2 dev: true - /vitest@0.34.4: + /vitest@0.34.4(jsdom@22.1.0): resolution: {integrity: sha512-SE/laOsB6995QlbSE6BtkpXDeVNLJc1u2LHRG/OpnN4RsRzM3GQm4nm3PQCK5OBtrsUqnhzLdnT7se3aeNGdlw==} engines: {node: '>=v14.18.0'} hasBin: true @@ -10123,6 +9868,7 @@ packages: cac: 6.7.14 chai: 4.3.8 debug: 4.3.4(supports-color@5.5.0) + jsdom: 22.1.0 local-pkg: 0.4.3 magic-string: 0.30.3 pathe: 1.1.1 @@ -10226,7 +9972,7 @@ packages: import-local: 3.1.0 interpret: 3.1.1 rechoir: 0.8.0 - webpack: 5.75.0(@swc/core@1.2.205)(esbuild@0.17.8)(webpack-cli@5.0.1) + webpack: 5.75.0(esbuild@0.17.8)(webpack-cli@5.0.1) webpack-merge: 5.8.0 dev: true @@ -10250,7 +9996,7 @@ packages: engines: {node: '>=10.13.0'} dev: true - /webpack@5.75.0(@swc/core@1.2.205)(esbuild@0.17.8)(webpack-cli@5.0.1): + /webpack@5.75.0(esbuild@0.17.8)(webpack-cli@5.0.1): resolution: {integrity: sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==} engines: {node: '>=10.13.0'} hasBin: true @@ -10281,7 +10027,7 @@ packages: neo-async: 2.6.2 schema-utils: 3.1.1 tapable: 2.2.1 - terser-webpack-plugin: 5.3.6(@swc/core@1.2.205)(esbuild@0.17.8)(webpack@5.75.0) + terser-webpack-plugin: 5.3.6(esbuild@0.17.8)(webpack@5.75.0) watchpack: 2.4.0 webpack-cli: 5.0.1(webpack@5.75.0) webpack-sources: 3.2.3 @@ -10303,11 +10049,11 @@ packages: engines: {node: '>=12'} dev: true - /whatwg-url@11.0.0: - resolution: {integrity: sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==} - engines: {node: '>=12'} + /whatwg-url@12.0.1: + resolution: {integrity: sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==} + engines: {node: '>=14'} dependencies: - tr46: 3.0.0 + tr46: 4.1.1 webidl-conversions: 7.0.0 dev: true @@ -10499,6 +10245,19 @@ packages: optional: true dev: true + /ws@8.14.2: + resolution: {integrity: sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + dev: true + /xdg-basedir@5.1.0: resolution: {integrity: sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==} engines: {node: '>=12'} From 1bc8dfbad293e74871a1158901462012c0003aee Mon Sep 17 00:00:00 2001 From: uttk-dev <97154037+uttk-dev@users.noreply.github.com> Date: Thu, 21 Sep 2023 14:27:27 +0900 Subject: [PATCH 08/14] =?UTF-8?q?feat:=20zenn-markdown-html=E3=81=AE?= =?UTF-8?q?=E3=83=86=E3=82=B9=E3=83=88=E3=82=92vitest=E3=81=A7=E5=AE=9F?= =?UTF-8?q?=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit P.S. テストの実行には失敗する --- .../__tests__/basic.test.ts | 1 + .../zenn-markdown-html/__tests__/br.test.ts | 1 + .../custom-syntax/embed/blueprintue.test.ts | 3 +- .../custom-syntax/embed/card.test.ts | 3 +- .../custom-syntax/embed/codepen.test.ts | 3 +- .../custom-syntax/embed/codesandbox.test.ts | 3 +- .../custom-syntax/embed/common.test.ts | 1 + .../custom-syntax/embed/figma.test.ts | 3 +- .../custom-syntax/embed/gist.test.ts | 3 +- .../custom-syntax/embed/github.test.ts | 3 +- .../custom-syntax/embed/jsfiddle.test.ts | 3 +- .../custom-syntax/embed/mermaid.test.ts | 3 +- .../custom-syntax/embed/slideshare.test.ts | 3 +- .../custom-syntax/embed/speakerdeck.test.ts | 3 +- .../custom-syntax/embed/stackblitz.test.ts | 6 +- .../custom-syntax/embed/tweet.test.ts | 3 +- .../custom-syntax/embed/youtube.test.ts | 3 +- .../custom-syntax/messagebox.test.ts | 1 + .../__tests__/dollar.test.ts | 1 + .../__tests__/highlight.test.ts | 1 + .../zenn-markdown-html/__tests__/link.test.ts | 1 + .../__tests__/markdown-simple-html.test.ts | 1 + .../matchers/isBlueprintUEUrl.test.ts | 1 + .../__tests__/matchers/isFigmaUrl.test.ts | 1 + .../__tests__/matchers/isGithubUrl.test.ts | 1 + .../__tests__/matchers/isYoutubeUrl.test.ts | 1 + .../zenn-markdown-html/__tests__/toc.test.ts | 1 + .../zenn-markdown-html/__tests__/xss.test.ts | 1 + packages/zenn-markdown-html/jest.config.js | 4 - packages/zenn-markdown-html/package.json | 9 +- packages/zenn-markdown-html/vitest.config.ts | 23 +++ pnpm-lock.yaml | 184 +++++++++++++----- 32 files changed, 210 insertions(+), 69 deletions(-) delete mode 100644 packages/zenn-markdown-html/jest.config.js create mode 100644 packages/zenn-markdown-html/vitest.config.ts diff --git a/packages/zenn-markdown-html/__tests__/basic.test.ts b/packages/zenn-markdown-html/__tests__/basic.test.ts index de138f48..a809afb9 100644 --- a/packages/zenn-markdown-html/__tests__/basic.test.ts +++ b/packages/zenn-markdown-html/__tests__/basic.test.ts @@ -1,3 +1,4 @@ +import { describe, test, expect } from 'vitest'; import markdownToHtml from '../src/index'; describe('MarkdownからHTMLへの変換テスト', () => { diff --git a/packages/zenn-markdown-html/__tests__/br.test.ts b/packages/zenn-markdown-html/__tests__/br.test.ts index 1a0b0b21..ef0e44cb 100644 --- a/packages/zenn-markdown-html/__tests__/br.test.ts +++ b/packages/zenn-markdown-html/__tests__/br.test.ts @@ -1,3 +1,4 @@ +import { describe, test, expect } from 'vitest'; import markdownToHtml from '../src/index'; describe('
のテスト', () => { diff --git a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/blueprintue.test.ts b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/blueprintue.test.ts index ba360704..cb1f20e4 100644 --- a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/blueprintue.test.ts +++ b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/blueprintue.test.ts @@ -1,3 +1,4 @@ +import { vi, describe, test, expect } from 'vitest'; import { parse } from 'node-html-parser'; import markdownToHtml from '../../../src/index'; @@ -33,7 +34,7 @@ describe('Blueprintue埋め込み要素のテスト', () => { describe('customEmbed.blueprintue()を設定している場合', () => { test('渡した関数を実行する', () => { const customizeText = 'customized text!'; - const mock = jest.fn().mockReturnValue(customizeText); + const mock = vi.fn().mockReturnValue(customizeText); const html = markdownToHtml(`@[blueprintue](${validUrl})`, { customEmbed: { blueprintue: mock }, }); diff --git a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/card.test.ts b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/card.test.ts index 02c2cf67..3c843ad9 100644 --- a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/card.test.ts +++ b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/card.test.ts @@ -1,3 +1,4 @@ +import { vi, describe, test, expect } from 'vitest'; import { parse } from 'node-html-parser'; import markdownToHtml from '../../../src/index'; @@ -48,7 +49,7 @@ describe('LinkCard埋め込み要素のテスト', () => { test('渡した関数を実行する', () => { const url = 'https://example.com'; const customizeText = 'customized text'; - const mock = jest.fn().mockReturnValue(customizeText); + const mock = vi.fn().mockReturnValue(customizeText); const html = markdownToHtml(`@[card](${url})`, { customEmbed: { card: mock }, }); diff --git a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/codepen.test.ts b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/codepen.test.ts index 05761098..5f939ef2 100644 --- a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/codepen.test.ts +++ b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/codepen.test.ts @@ -1,3 +1,4 @@ +import { vi, describe, test, expect } from 'vitest'; import { parse } from 'node-html-parser'; import markdownToHtml from '../../../src/index'; @@ -30,7 +31,7 @@ describe('Codepen埋め込み要素のテスト', () => { describe('customEmbed.codepen()を設定している場合', () => { test('渡した関数を実行する', () => { const customizeText = 'customized text'; - const mock = jest.fn().mockReturnValue(customizeText); + const mock = vi.fn().mockReturnValue(customizeText); const html = markdownToHtml(`@[codepen](${invalidUrl})`, { customEmbed: { codepen: mock }, }); diff --git a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/codesandbox.test.ts b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/codesandbox.test.ts index 72138e67..ebfb5b97 100644 --- a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/codesandbox.test.ts +++ b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/codesandbox.test.ts @@ -1,3 +1,4 @@ +import { vi, describe, test, expect } from 'vitest'; import { parse } from 'node-html-parser'; import markdownToHtml from '../../../src/index'; @@ -35,7 +36,7 @@ describe('CodeSandBox埋め込み要素のテスト', () => { describe('customEmbed.codesandbox()を設定している場合', () => { test('渡した関数を実行する', () => { const customizeText = 'customized text!'; - const mock = jest.fn().mockReturnValue(customizeText); + const mock = vi.fn().mockReturnValue(customizeText); const html = markdownToHtml(`@[codesandbox](${validUrl})`, { customEmbed: { codesandbox: mock }, }); diff --git a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/common.test.ts b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/common.test.ts index b759a771..f4be9a93 100644 --- a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/common.test.ts +++ b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/common.test.ts @@ -1,3 +1,4 @@ +import { describe, test, expect } from 'vitest'; import markdownToHtml from '../../../src'; describe('埋め込み要素の共通テスト', () => { diff --git a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/figma.test.ts b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/figma.test.ts index 0bd70eb5..6ec9a85c 100644 --- a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/figma.test.ts +++ b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/figma.test.ts @@ -1,3 +1,4 @@ +import { vi, describe, test, expect } from 'vitest'; import { parse } from 'node-html-parser'; import markdownToHtml from '../../../src/index'; @@ -33,7 +34,7 @@ describe('Figma埋め込み要素のテスト', () => { describe('customEmbed.figma()を設定している場合', () => { test('渡した関数を実行する', () => { const customizeText = 'customized text!'; - const mock = jest.fn().mockReturnValue(customizeText); + const mock = vi.fn().mockReturnValue(customizeText); const html = markdownToHtml(`@[figma](${validUrl})`, { customEmbed: { figma: mock }, }); diff --git a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/gist.test.ts b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/gist.test.ts index 9164284a..f3483c89 100644 --- a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/gist.test.ts +++ b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/gist.test.ts @@ -1,3 +1,4 @@ +import { vi, describe, test, expect } from 'vitest'; import { parse } from 'node-html-parser'; import markdownToHtml from '../../../src/index'; @@ -48,7 +49,7 @@ describe('GitHub Gist埋め込み要素のテスト', () => { test('渡した関数を実行する', () => { const url = 'https://example.com'; const customizeText = 'customized text'; - const mock = jest.fn().mockReturnValue(customizeText); + const mock = vi.fn().mockReturnValue(customizeText); const html = markdownToHtml(`@[gist](${url})`, { customEmbed: { gist: mock }, }); diff --git a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/github.test.ts b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/github.test.ts index fc00aed3..c63acb47 100644 --- a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/github.test.ts +++ b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/github.test.ts @@ -1,3 +1,4 @@ +import { vi, describe, test, expect } from 'vitest'; import { parse } from 'node-html-parser'; import markdownToHtml from '../../../src/index'; @@ -52,7 +53,7 @@ describe('GitHub埋め込み要素のテスト', () => { test('渡した関数を実行する', () => { const url = 'https://example.com'; const customizeText = 'customized text'; - const mock = jest.fn().mockReturnValue(customizeText); + const mock = vi.fn().mockReturnValue(customizeText); const html = markdownToHtml(`@[github](${url})`, { customEmbed: { github: mock }, }); diff --git a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/jsfiddle.test.ts b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/jsfiddle.test.ts index 7e7c2caf..1eafb74a 100644 --- a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/jsfiddle.test.ts +++ b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/jsfiddle.test.ts @@ -1,3 +1,4 @@ +import { vi, describe, test, expect } from 'vitest'; import { parse } from 'node-html-parser'; import markdownToHtml from '../../../src/index'; @@ -28,7 +29,7 @@ describe('jsfiddle埋め込み要素のテスト', () => { describe('customEmbed.jsfiddle()を設定している場合', () => { test('渡した関数を実行する', () => { const customizeText = 'customized text!'; - const mock = jest.fn().mockReturnValue(customizeText); + const mock = vi.fn().mockReturnValue(customizeText); const html = markdownToHtml(`@[jsfiddle](${validUrl})`, { customEmbed: { jsfiddle: mock }, }); diff --git a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/mermaid.test.ts b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/mermaid.test.ts index 8365a4f1..c08dfcda 100644 --- a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/mermaid.test.ts +++ b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/mermaid.test.ts @@ -1,3 +1,4 @@ +import { vi, describe, test, expect } from 'vitest'; import { parse } from 'node-html-parser'; import markdownToHtml from '../../../src/index'; @@ -59,7 +60,7 @@ describe('Mermaid埋め込み要素のテスト', () => { describe('customEmbed.mermaid()を設定している場合', () => { test('渡した関数を実行する', () => { const customizeText = 'customized text'; - const mock = jest.fn().mockReturnValue(customizeText); + const mock = vi.fn().mockReturnValue(customizeText); const html = markdownToHtml(`\`\`\`mermaid\n${validSrc}\n\`\`\``, { customEmbed: { mermaid: mock }, }); diff --git a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/slideshare.test.ts b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/slideshare.test.ts index ff90f3a6..d3a0e373 100644 --- a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/slideshare.test.ts +++ b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/slideshare.test.ts @@ -1,3 +1,4 @@ +import { vi, describe, test, expect } from 'vitest'; import { parse } from 'node-html-parser'; import markdownToHtml from '../../../src/index'; @@ -32,7 +33,7 @@ describe('SlideShare埋め込み要素のテスト', () => { describe('customEmbed.slideshare()を設定している場合', () => { test('渡した関数を実行する', () => { const customizeText = 'customized text!'; - const mock = jest.fn().mockReturnValue(customizeText); + const mock = vi.fn().mockReturnValue(customizeText); const html = markdownToHtml(`@[slideshare](${validToken})`, { customEmbed: { slideshare: mock }, }); diff --git a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/speakerdeck.test.ts b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/speakerdeck.test.ts index 6b6df6dd..ca601c44 100644 --- a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/speakerdeck.test.ts +++ b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/speakerdeck.test.ts @@ -1,3 +1,4 @@ +import { vi, describe, test, expect } from 'vitest'; import { parse } from 'node-html-parser'; import markdownToHtml from '../../../src/index'; @@ -32,7 +33,7 @@ describe('SpeakerDeck埋め込み要素のテスト', () => { describe('customEmbed.speakerdeck()を設定している場合', () => { test('渡した関数を実行する', () => { const customizeText = 'customized text!'; - const mock = jest.fn().mockReturnValue(customizeText); + const mock = vi.fn().mockReturnValue(customizeText); const html = markdownToHtml(`@[speakerdeck](${validToken})`, { customEmbed: { speakerdeck: mock }, }); diff --git a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/stackblitz.test.ts b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/stackblitz.test.ts index 199b0ca6..4a853c87 100644 --- a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/stackblitz.test.ts +++ b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/stackblitz.test.ts @@ -1,8 +1,10 @@ +import { vi, describe, test, expect } from 'vitest'; import { parse } from 'node-html-parser'; import markdownToHtml from '../../../src/index'; describe('Stackblitz埋め込み要素のテスト', () => { - const validUrl = 'https://stackblitz.com/edit/test-examples?embed=1&file=pages/api/[id].ts'; + const validUrl = + 'https://stackblitz.com/edit/test-examples?embed=1&file=pages/api/[id].ts'; const invalidUrl = '@https://bad-url.stackblitz.com/edit/test-examples'; describe('デフォルトの挙動', () => { @@ -30,7 +32,7 @@ describe('Stackblitz埋め込み要素のテスト', () => { describe('customEmbed.stackblitz()を設定している場合', () => { test('渡した関数を実行する', () => { const customizeText = 'customized text!'; - const mock = jest.fn().mockReturnValue(customizeText); + const mock = vi.fn().mockReturnValue(customizeText); const html = markdownToHtml(`@[stackblitz](${validUrl})`, { customEmbed: { stackblitz: mock }, }); diff --git a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/tweet.test.ts b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/tweet.test.ts index 6605abbf..c888c49a 100644 --- a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/tweet.test.ts +++ b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/tweet.test.ts @@ -1,3 +1,4 @@ +import { vi, describe, test, expect } from 'vitest'; import { parse } from 'node-html-parser'; import markdownToHtml from '../../../src/index'; @@ -47,7 +48,7 @@ describe('Tweet埋め込み要素のテスト', () => { describe('customEmbed.tweet()を設定している場合', () => { test('渡した関数を実行する', () => { const customizeText = 'customized text'; - const mock = jest.fn().mockReturnValue(customizeText); + const mock = vi.fn().mockReturnValue(customizeText); const html = markdownToHtml('https://twitter.com/jack/status/20', { customEmbed: { tweet: mock }, }); diff --git a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/youtube.test.ts b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/youtube.test.ts index 8d3d5063..f1177584 100644 --- a/packages/zenn-markdown-html/__tests__/custom-syntax/embed/youtube.test.ts +++ b/packages/zenn-markdown-html/__tests__/custom-syntax/embed/youtube.test.ts @@ -1,3 +1,4 @@ +import { vi, describe, test, expect } from 'vitest'; import { parse } from 'node-html-parser'; import markdownToHtml from '../../../src/index'; @@ -30,7 +31,7 @@ describe('Youtube埋め込み要素のテスト', () => { describe('customEmbed.youtube()を設定している場合', () => { test('渡した関数を実行する', () => { const customizeText = 'customized text'; - const mock = jest.fn().mockReturnValue(customizeText); + const mock = vi.fn().mockReturnValue(customizeText); const html = markdownToHtml(`@[youtube](${validVideoId})`, { customEmbed: { youtube: mock }, }); diff --git a/packages/zenn-markdown-html/__tests__/custom-syntax/messagebox.test.ts b/packages/zenn-markdown-html/__tests__/custom-syntax/messagebox.test.ts index 3100427a..e9dd355f 100644 --- a/packages/zenn-markdown-html/__tests__/custom-syntax/messagebox.test.ts +++ b/packages/zenn-markdown-html/__tests__/custom-syntax/messagebox.test.ts @@ -1,3 +1,4 @@ +import { describe, test, expect } from 'vitest'; import { parse } from 'node-html-parser'; import markdownToHtml from '../../src/index'; diff --git a/packages/zenn-markdown-html/__tests__/dollar.test.ts b/packages/zenn-markdown-html/__tests__/dollar.test.ts index 1720e24f..083d141c 100644 --- a/packages/zenn-markdown-html/__tests__/dollar.test.ts +++ b/packages/zenn-markdown-html/__tests__/dollar.test.ts @@ -1,3 +1,4 @@ +import { describe, test, expect } from 'vitest'; import markdownToHtml from '../src/index'; describe('$ マークのテスト', () => { diff --git a/packages/zenn-markdown-html/__tests__/highlight.test.ts b/packages/zenn-markdown-html/__tests__/highlight.test.ts index eacfae7e..53faee4b 100644 --- a/packages/zenn-markdown-html/__tests__/highlight.test.ts +++ b/packages/zenn-markdown-html/__tests__/highlight.test.ts @@ -1,3 +1,4 @@ +import { describe, test, expect } from 'vitest'; import markdownToHtml from '../src/index'; describe('コードハイライトのテスト', () => { diff --git a/packages/zenn-markdown-html/__tests__/link.test.ts b/packages/zenn-markdown-html/__tests__/link.test.ts index e49ca6a2..5483a182 100644 --- a/packages/zenn-markdown-html/__tests__/link.test.ts +++ b/packages/zenn-markdown-html/__tests__/link.test.ts @@ -1,3 +1,4 @@ +import { describe, test, expect } from 'vitest'; import { parse } from 'node-html-parser'; import markdownToHtml from '../src/index'; import { MarkdownOptions } from '../src/types'; diff --git a/packages/zenn-markdown-html/__tests__/markdown-simple-html.test.ts b/packages/zenn-markdown-html/__tests__/markdown-simple-html.test.ts index de68b5ce..1cf5410b 100644 --- a/packages/zenn-markdown-html/__tests__/markdown-simple-html.test.ts +++ b/packages/zenn-markdown-html/__tests__/markdown-simple-html.test.ts @@ -1,3 +1,4 @@ +import { describe, test, expect } from 'vitest'; import { markdownToSimpleHtml } from '../src/index'; describe('Convert markdown to html properly', () => { diff --git a/packages/zenn-markdown-html/__tests__/matchers/isBlueprintUEUrl.test.ts b/packages/zenn-markdown-html/__tests__/matchers/isBlueprintUEUrl.test.ts index 1446468e..55aedbd0 100644 --- a/packages/zenn-markdown-html/__tests__/matchers/isBlueprintUEUrl.test.ts +++ b/packages/zenn-markdown-html/__tests__/matchers/isBlueprintUEUrl.test.ts @@ -1,3 +1,4 @@ +import { describe, test, expect } from 'vitest'; import { isBlueprintUEUrl } from '../../src/utils/url-matcher'; describe('isBlueprintUEUrlのテスト', () => { diff --git a/packages/zenn-markdown-html/__tests__/matchers/isFigmaUrl.test.ts b/packages/zenn-markdown-html/__tests__/matchers/isFigmaUrl.test.ts index a7ff8f7c..b8112c16 100644 --- a/packages/zenn-markdown-html/__tests__/matchers/isFigmaUrl.test.ts +++ b/packages/zenn-markdown-html/__tests__/matchers/isFigmaUrl.test.ts @@ -1,3 +1,4 @@ +import { describe, test, expect } from 'vitest'; import { isFigmaUrl } from '../../src/utils/url-matcher'; describe('isFigmaUrlのテスト', () => { diff --git a/packages/zenn-markdown-html/__tests__/matchers/isGithubUrl.test.ts b/packages/zenn-markdown-html/__tests__/matchers/isGithubUrl.test.ts index b0ab506d..d47cf02f 100644 --- a/packages/zenn-markdown-html/__tests__/matchers/isGithubUrl.test.ts +++ b/packages/zenn-markdown-html/__tests__/matchers/isGithubUrl.test.ts @@ -1,3 +1,4 @@ +import { describe, test, expect } from 'vitest'; import { isGithubUrl } from '../../src/utils/url-matcher'; describe('isGithubUrlのテスト', () => { diff --git a/packages/zenn-markdown-html/__tests__/matchers/isYoutubeUrl.test.ts b/packages/zenn-markdown-html/__tests__/matchers/isYoutubeUrl.test.ts index 0c5c9bc4..4ec49dd5 100644 --- a/packages/zenn-markdown-html/__tests__/matchers/isYoutubeUrl.test.ts +++ b/packages/zenn-markdown-html/__tests__/matchers/isYoutubeUrl.test.ts @@ -1,3 +1,4 @@ +import { describe, test, expect } from 'vitest'; import { isYoutubeUrl } from '../../src/utils/url-matcher'; describe('isYoutubeUrlのテスト', () => { diff --git a/packages/zenn-markdown-html/__tests__/toc.test.ts b/packages/zenn-markdown-html/__tests__/toc.test.ts index f7175e40..1a9cb678 100644 --- a/packages/zenn-markdown-html/__tests__/toc.test.ts +++ b/packages/zenn-markdown-html/__tests__/toc.test.ts @@ -1,3 +1,4 @@ +import { describe, test, expect } from 'vitest'; import { parseToc } from '../src/utils/toc'; describe('generateToc', () => { diff --git a/packages/zenn-markdown-html/__tests__/xss.test.ts b/packages/zenn-markdown-html/__tests__/xss.test.ts index 16d05ff4..ef773a7b 100644 --- a/packages/zenn-markdown-html/__tests__/xss.test.ts +++ b/packages/zenn-markdown-html/__tests__/xss.test.ts @@ -1,3 +1,4 @@ +import { describe, test, expect } from 'vitest'; import markdownToHtml from '../src/index'; describe('XSS脆弱性のテスト', () => { diff --git a/packages/zenn-markdown-html/jest.config.js b/packages/zenn-markdown-html/jest.config.js deleted file mode 100644 index 893e42f1..00000000 --- a/packages/zenn-markdown-html/jest.config.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - moduleFileExtensions: ['js', 'json', 'ts'], - testRegex: './__tests__/.+\\.(test|spec)\\.ts$', -}; diff --git a/packages/zenn-markdown-html/package.json b/packages/zenn-markdown-html/package.json index 941e257b..6cf35e0f 100644 --- a/packages/zenn-markdown-html/package.json +++ b/packages/zenn-markdown-html/package.json @@ -24,28 +24,27 @@ "lint": "eslint . --ext .ts,.tsx", "fix": "eslint . --ext .ts,.tsx --fix", "strict:lint": "eslint . --ext .ts,.tsx --max-warnings 0", - "test": "jest" + "test": "vitest run" }, "devDependencies": { "@babel/cli": "^7.20.7", "@babel/core": "^7.20.12", "@babel/preset-env": "^7.20.2", "@babel/preset-typescript": "^7.18.6", - "@types/jest": "^29.4.0", "@types/markdown-it": "^12.2.3", "@types/node": "^18.13.0", "@types/prismjs": "^1.26.0", "@types/sanitize-html": "^2.8.0", "@typescript-eslint/eslint-plugin": "^5.52.0", "@typescript-eslint/parser": "^5.52.0", - "babel-jest": "^29.4.2", "babel-plugin-prismjs": "^2.1.0", "eslint": "^8.34.0", "eslint-config-prettier": "^8.6.0", - "jest": "^29.4.2", "node-html-parser": "^6.1.4", "rimraf": "^3.0.2", - "typescript": "^4.9.5" + "typescript": "^4.9.5", + "vite-plugin-babel": "^1.1.3", + "vitest": "^0.34.4" }, "dependencies": { "@steelydylan/markdown-it-imsize": "^1.0.2", diff --git a/packages/zenn-markdown-html/vitest.config.ts b/packages/zenn-markdown-html/vitest.config.ts new file mode 100644 index 00000000..a0f4c48f --- /dev/null +++ b/packages/zenn-markdown-html/vitest.config.ts @@ -0,0 +1,23 @@ +/// + +import { defineConfig } from 'vitest/config'; +import babel from 'vite-plugin-babel'; + +export default defineConfig({ + plugins: [ + babel({ + filter: /\.(j|t)sx?$/, + babelConfig: { + babelrc: false, + root: './', + presets: ['@babel/preset-env', '@babel/preset-typescript'], + plugins: [['prismjs', { languages: 'all' }]], + }, + }), + ], + + test: { + environment: 'jsdom', + include: ['./__tests__/**/*.test.ts'], + }, +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b4b8f3dd..e32c2648 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -294,9 +294,6 @@ importers: '@babel/preset-typescript': specifier: ^7.18.6 version: 7.18.6(@babel/core@7.20.12) - '@types/jest': - specifier: ^29.4.0 - version: 29.4.0 '@types/markdown-it': specifier: ^12.2.3 version: 12.2.3 @@ -315,9 +312,6 @@ importers: '@typescript-eslint/parser': specifier: ^5.52.0 version: 5.52.0(eslint@8.34.0)(typescript@4.9.5) - babel-jest: - specifier: ^29.4.2 - version: 29.4.2(@babel/core@7.20.12) babel-plugin-prismjs: specifier: ^2.1.0 version: 2.1.0(prismjs@1.29.0) @@ -327,9 +321,6 @@ importers: eslint-config-prettier: specifier: ^8.6.0 version: 8.6.0(eslint@8.34.0) - jest: - specifier: ^29.4.2 - version: 29.4.2(@types/node@18.13.0) node-html-parser: specifier: ^6.1.4 version: 6.1.4 @@ -339,6 +330,12 @@ importers: typescript: specifier: ^4.9.5 version: 4.9.5 + vite-plugin-babel: + specifier: ^1.1.3 + version: 1.1.3(@babel/core@7.20.12)(vite@4.2.1) + vitest: + specifier: ^0.34.4 + version: 0.34.4 packages/zenn-model: dependencies: @@ -372,7 +369,7 @@ importers: version: 8.6.0(eslint@8.34.0) jest: specifier: ^29.4.2 - version: 29.4.2(@types/node@18.13.0) + version: 29.4.2 rimraf: specifier: ^4.1.2 version: 4.1.2 @@ -434,10 +431,10 @@ packages: '@babel/helpers': 7.20.13 '@babel/parser': 7.20.15 '@babel/template': 7.20.7 - '@babel/traverse': 7.20.13(supports-color@5.5.0) + '@babel/traverse': 7.20.13 '@babel/types': 7.20.7 convert-source-map: 1.9.0 - debug: 4.3.4(supports-color@5.5.0) + debug: 4.3.4 gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.0 @@ -521,9 +518,9 @@ packages: '@babel/core': 7.20.12 '@babel/helper-compilation-targets': 7.20.7(@babel/core@7.20.12) '@babel/helper-plugin-utils': 7.20.2 - debug: 4.3.4(supports-color@5.5.0) + debug: 4.3.4 lodash.debounce: 4.0.8 - resolve: 1.22.1 + resolve: 1.22.2 semver: 6.3.0 transitivePeerDependencies: - supports-color @@ -580,7 +577,7 @@ packages: '@babel/helper-split-export-declaration': 7.18.6 '@babel/helper-validator-identifier': 7.19.1 '@babel/template': 7.20.7 - '@babel/traverse': 7.20.13(supports-color@5.5.0) + '@babel/traverse': 7.20.13 '@babel/types': 7.20.7 transitivePeerDependencies: - supports-color @@ -621,7 +618,7 @@ packages: '@babel/helper-member-expression-to-functions': 7.20.7 '@babel/helper-optimise-call-expression': 7.18.6 '@babel/template': 7.20.7 - '@babel/traverse': 7.20.13(supports-color@5.5.0) + '@babel/traverse': 7.20.13 '@babel/types': 7.20.7 transitivePeerDependencies: - supports-color @@ -669,7 +666,7 @@ packages: dependencies: '@babel/helper-function-name': 7.19.0 '@babel/template': 7.20.7 - '@babel/traverse': 7.20.13(supports-color@5.5.0) + '@babel/traverse': 7.20.13 '@babel/types': 7.20.7 transitivePeerDependencies: - supports-color @@ -680,7 +677,7 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.20.7 - '@babel/traverse': 7.20.13(supports-color@5.5.0) + '@babel/traverse': 7.20.13 '@babel/types': 7.20.7 transitivePeerDependencies: - supports-color @@ -1614,6 +1611,24 @@ packages: '@babel/types': 7.20.7 dev: true + /@babel/traverse@7.20.13: + resolution: {integrity: sha512-kMJXfF0T6DIS9E8cgdLCSAL+cuCK+YEZHWiLK0SXpTo8YRj5lpJu3CDNKiIBCne4m9hhTIqUg6SYTAI39tAiVQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.18.6 + '@babel/generator': 7.20.14 + '@babel/helper-environment-visitor': 7.18.9 + '@babel/helper-function-name': 7.19.0 + '@babel/helper-hoist-variables': 7.18.6 + '@babel/helper-split-export-declaration': 7.18.6 + '@babel/parser': 7.20.15 + '@babel/types': 7.20.7 + debug: 4.3.4 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + dev: true + /@babel/traverse@7.20.13(supports-color@5.5.0): resolution: {integrity: sha512-kMJXfF0T6DIS9E8cgdLCSAL+cuCK+YEZHWiLK0SXpTo8YRj5lpJu3CDNKiIBCne4m9hhTIqUg6SYTAI39tAiVQ==} engines: {node: '>=6.9.0'} @@ -1871,7 +1886,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 - debug: 4.3.4(supports-color@5.5.0) + debug: 4.3.4 espree: 9.4.1 globals: 13.20.0 ignore: 5.2.4 @@ -1902,7 +1917,7 @@ packages: engines: {node: '>=10.10.0'} dependencies: '@humanwhocodes/object-schema': 1.2.1 - debug: 4.3.4(supports-color@5.5.0) + debug: 4.3.4 minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -3177,7 +3192,7 @@ packages: '@typescript-eslint/scope-manager': 5.52.0 '@typescript-eslint/type-utils': 5.52.0(eslint@8.34.0)(typescript@4.9.5) '@typescript-eslint/utils': 5.52.0(eslint@8.34.0)(typescript@4.9.5) - debug: 4.3.4(supports-color@5.5.0) + debug: 4.3.4 eslint: 8.34.0 grapheme-splitter: 1.0.4 ignore: 5.2.4 @@ -3203,7 +3218,7 @@ packages: '@typescript-eslint/scope-manager': 5.52.0 '@typescript-eslint/types': 5.52.0 '@typescript-eslint/typescript-estree': 5.52.0(typescript@4.9.5) - debug: 4.3.4(supports-color@5.5.0) + debug: 4.3.4 eslint: 8.34.0 typescript: 4.9.5 transitivePeerDependencies: @@ -3230,7 +3245,7 @@ packages: dependencies: '@typescript-eslint/typescript-estree': 5.52.0(typescript@4.9.5) '@typescript-eslint/utils': 5.52.0(eslint@8.34.0)(typescript@4.9.5) - debug: 4.3.4(supports-color@5.5.0) + debug: 4.3.4 eslint: 8.34.0 tsutils: 3.21.0(typescript@4.9.5) typescript: 4.9.5 @@ -3254,7 +3269,7 @@ packages: dependencies: '@typescript-eslint/types': 5.52.0 '@typescript-eslint/visitor-keys': 5.52.0 - debug: 4.3.4(supports-color@5.5.0) + debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 semver: 7.3.8 @@ -3665,6 +3680,7 @@ packages: /anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} + requiresBuild: true dependencies: normalize-path: 3.0.0 picomatch: 2.3.1 @@ -3909,6 +3925,7 @@ packages: /binary-extensions@2.2.0: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} engines: {node: '>=8'} + requiresBuild: true dev: true /bl@4.1.0: @@ -4664,6 +4681,18 @@ packages: supports-color: 5.5.0 dev: true + /debug@4.3.4: + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.2 + dev: true + /debug@4.3.4(supports-color@5.5.0): resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -5136,7 +5165,7 @@ packages: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.4(supports-color@5.5.0) + debug: 4.3.4 doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.1.1 @@ -5382,6 +5411,7 @@ packages: /fill-range@7.0.1: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} + requiresBuild: true dependencies: to-regex-range: 5.0.1 dev: true @@ -6105,6 +6135,7 @@ packages: /is-binary-path@2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} + requiresBuild: true dependencies: binary-extensions: 2.2.0 dev: true @@ -6129,12 +6160,6 @@ packages: ci-info: 3.8.0 dev: true - /is-core-module@2.11.0: - resolution: {integrity: sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==} - dependencies: - has: 1.0.3 - dev: true - /is-core-module@2.12.0: resolution: {integrity: sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==} dependencies: @@ -6205,6 +6230,7 @@ packages: /is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} + requiresBuild: true dev: true /is-obj@2.0.0: @@ -6415,7 +6441,7 @@ packages: - supports-color dev: true - /jest-cli@29.4.2(@types/node@18.13.0): + /jest-cli@29.4.2: resolution: {integrity: sha512-b+eGUtXq/K2v7SH3QcJvFvaUaCDS1/YAZBYz0m28Q/Ppyr+1qNaHmVYikOrbHVbZqYQs2IeI3p76uy6BWbXq8Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -6779,7 +6805,7 @@ packages: supports-color: 8.1.1 dev: true - /jest@29.4.2(@types/node@18.13.0): + /jest@29.4.2: resolution: {integrity: sha512-+5hLd260vNIHu+7ZgMIooSpKl7Jp5pHKb51e73AJU3owd5dEo/RfVwHbA/na3C/eozrt3hJOLGf96c7EWwIAzg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -6792,7 +6818,7 @@ packages: '@jest/core': 29.4.2 '@jest/types': 29.4.2 import-local: 3.1.0 - jest-cli: 29.4.2(@types/node@18.13.0) + jest-cli: 29.4.2 transitivePeerDependencies: - '@types/node' - supports-color @@ -7649,6 +7675,7 @@ packages: /normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} + requiresBuild: true dev: true /npm-bundled@3.0.0: @@ -8452,6 +8479,7 @@ packages: /readdirp@3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} + requiresBuild: true dependencies: picomatch: 2.3.1 dev: true @@ -8460,7 +8488,7 @@ packages: resolution: {integrity: sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==} engines: {node: '>= 10.13.0'} dependencies: - resolve: 1.22.1 + resolve: 1.22.2 dev: true /redent@3.0.0: @@ -8556,15 +8584,6 @@ packages: engines: {node: '>=10'} dev: true - /resolve@1.22.1: - resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} - hasBin: true - dependencies: - is-core-module: 2.11.0 - path-parse: 1.0.7 - supports-preserve-symlinks-flag: 1.0.0 - dev: true - /resolve@1.22.2: resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==} hasBin: true @@ -9355,6 +9374,7 @@ packages: /to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} + requiresBuild: true dependencies: is-number: 7.0.0 dev: true @@ -9775,7 +9795,7 @@ packages: hasBin: true dependencies: cac: 6.7.14 - debug: 4.3.4(supports-color@5.5.0) + debug: 4.3.4 mlly: 1.4.2 pathe: 1.1.1 picocolors: 1.0.0 @@ -9790,6 +9810,16 @@ packages: - terser dev: true + /vite-plugin-babel@1.1.3(@babel/core@7.20.12)(vite@4.2.1): + resolution: {integrity: sha512-WE8ORQm8530kj0geiDL1r/+P2MaU0b+5wL5E8Jq07aounFwRIUeJXziGiMr2DFQs78vaefB5GRKh257M8Z6gFQ==} + peerDependencies: + '@babel/core': ^7.0.0 + vite: ^2.7.0 || ^3.0.0 || ^4.0.0 + dependencies: + '@babel/core': 7.20.12 + vite: 4.2.1(@types/node@18.13.0) + dev: true + /vite@4.2.1(@types/node@18.13.0): resolution: {integrity: sha512-7MKhqdy0ISo4wnvwtqZkjke6XN4taqQ2TBaTccLIpOKv7Vp2h4Y+NpmWCnGDeSvvn45KxvWgGyb0MkHvY1vgbg==} engines: {node: ^14.18.0 || >=16.0.0} @@ -9824,6 +9854,70 @@ packages: fsevents: 2.3.2 dev: true + /vitest@0.34.4: + resolution: {integrity: sha512-SE/laOsB6995QlbSE6BtkpXDeVNLJc1u2LHRG/OpnN4RsRzM3GQm4nm3PQCK5OBtrsUqnhzLdnT7se3aeNGdlw==} + engines: {node: '>=v14.18.0'} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@vitest/browser': '*' + '@vitest/ui': '*' + happy-dom: '*' + jsdom: '*' + playwright: '*' + safaridriver: '*' + webdriverio: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + playwright: + optional: true + safaridriver: + optional: true + webdriverio: + optional: true + dependencies: + '@types/chai': 4.3.6 + '@types/chai-subset': 1.3.3 + '@types/node': 18.13.0 + '@vitest/expect': 0.34.4 + '@vitest/runner': 0.34.4 + '@vitest/snapshot': 0.34.4 + '@vitest/spy': 0.34.4 + '@vitest/utils': 0.34.4 + acorn: 8.10.0 + acorn-walk: 8.2.0 + cac: 6.7.14 + chai: 4.3.8 + debug: 4.3.4 + local-pkg: 0.4.3 + magic-string: 0.30.3 + pathe: 1.1.1 + picocolors: 1.0.0 + std-env: 3.4.3 + strip-literal: 1.3.0 + tinybench: 2.5.1 + tinypool: 0.7.0 + vite: 4.2.1(@types/node@18.13.0) + vite-node: 0.34.4(@types/node@18.13.0) + why-is-node-running: 2.2.2 + transitivePeerDependencies: + - less + - sass + - stylus + - sugarss + - supports-color + - terser + dev: true + /vitest@0.34.4(jsdom@22.1.0): resolution: {integrity: sha512-SE/laOsB6995QlbSE6BtkpXDeVNLJc1u2LHRG/OpnN4RsRzM3GQm4nm3PQCK5OBtrsUqnhzLdnT7se3aeNGdlw==} engines: {node: '>=v14.18.0'} From 065e77401b26cf3e3a53adff768ffdfd6f573d48 Mon Sep 17 00:00:00 2001 From: uttk-dev <97154037+uttk-dev@users.noreply.github.com> Date: Thu, 21 Sep 2023 14:31:16 +0900 Subject: [PATCH 09/14] =?UTF-8?q?feat:=20zenn-model=20=E3=81=AE=E3=83=86?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=82=92=20vitest=20=E3=81=A7=E5=AE=9F?= =?UTF-8?q?=E8=A1=8C=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=97?= =?UTF-8?q?=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zenn-model/__tests__/validator.test.ts | 1 + packages/zenn-model/jest.config.js | 8 - packages/zenn-model/package.json | 9 +- packages/zenn-model/vitest.config.ts | 13 + pnpm-lock.yaml | 1469 ++--------------- 5 files changed, 135 insertions(+), 1365 deletions(-) delete mode 100644 packages/zenn-model/jest.config.js create mode 100644 packages/zenn-model/vitest.config.ts diff --git a/packages/zenn-model/__tests__/validator.test.ts b/packages/zenn-model/__tests__/validator.test.ts index b37eb583..8cd88b6c 100644 --- a/packages/zenn-model/__tests__/validator.test.ts +++ b/packages/zenn-model/__tests__/validator.test.ts @@ -1,3 +1,4 @@ +import { describe, test, expect } from 'vitest'; import { validateArticle, validateBook, diff --git a/packages/zenn-model/jest.config.js b/packages/zenn-model/jest.config.js deleted file mode 100644 index 943f8d69..00000000 --- a/packages/zenn-model/jest.config.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - moduleFileExtensions: ['js', 'json', 'ts'], - transform: { - '^.+\\.ts$': '@swc/jest', - }, - testMatch: ['/__tests__/**/*.test.ts'], - resetMocks: true, -}; diff --git a/packages/zenn-model/package.json b/packages/zenn-model/package.json index d235f719..53da5a84 100644 --- a/packages/zenn-model/package.json +++ b/packages/zenn-model/package.json @@ -20,20 +20,17 @@ "lint": "eslint . --ext .ts,.tsx", "fix": "eslint . --ext .ts,.tsx --fix", "strict:lint": "eslint . --ext .ts,.tsx --max-warnings 0", - "test": "jest" + "test": "vitest run" }, "devDependencies": { - "@swc/core": "^1.3.4", - "@swc/jest": "^0.2.23", - "@types/jest": "^29.4.0", "@typescript-eslint/eslint-plugin": "^5.52.0", "@typescript-eslint/parser": "^5.52.0", "esbuild": "^0.17.8", "eslint": "^8.34.0", "eslint-config-prettier": "^8.6.0", - "jest": "^29.4.2", "rimraf": "^4.1.2", - "typescript": "^4.9.5" + "typescript": "^4.9.5", + "vitest": "^0.34.4" }, "dependencies": { "emoji-regex": "^10.2.1" diff --git a/packages/zenn-model/vitest.config.ts b/packages/zenn-model/vitest.config.ts new file mode 100644 index 00000000..7b6a2e03 --- /dev/null +++ b/packages/zenn-model/vitest.config.ts @@ -0,0 +1,13 @@ +/// + +import { defineConfig } from 'vitest/config'; + +export default defineConfig({ + build: { + target: 'esnext', + }, + + test: { + include: ['./__tests__/**/*.test.ts'], + }, +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e32c2648..e68ba33c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -335,7 +335,7 @@ importers: version: 1.1.3(@babel/core@7.20.12)(vite@4.2.1) vitest: specifier: ^0.34.4 - version: 0.34.4 + version: 0.34.4(jsdom@22.1.0) packages/zenn-model: dependencies: @@ -343,15 +343,6 @@ importers: specifier: ^10.2.1 version: 10.2.1 devDependencies: - '@swc/core': - specifier: ^1.3.4 - version: 1.3.26 - '@swc/jest': - specifier: ^0.2.23 - version: 0.2.24(@swc/core@1.3.26) - '@types/jest': - specifier: ^29.4.0 - version: 29.4.0 '@typescript-eslint/eslint-plugin': specifier: ^5.52.0 version: 5.52.0(@typescript-eslint/parser@5.52.0)(eslint@8.34.0)(typescript@4.9.5) @@ -367,15 +358,15 @@ importers: eslint-config-prettier: specifier: ^8.6.0 version: 8.6.0(eslint@8.34.0) - jest: - specifier: ^29.4.2 - version: 29.4.2 rimraf: specifier: ^4.1.2 version: 4.1.2 typescript: specifier: ^4.9.5 version: 4.9.5 + vitest: + specifier: ^0.34.4 + version: 0.34.4 packages: @@ -431,10 +422,10 @@ packages: '@babel/helpers': 7.20.13 '@babel/parser': 7.20.15 '@babel/template': 7.20.7 - '@babel/traverse': 7.20.13 + '@babel/traverse': 7.20.13(supports-color@5.5.0) '@babel/types': 7.20.7 convert-source-map: 1.9.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@5.5.0) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.0 @@ -518,7 +509,7 @@ packages: '@babel/core': 7.20.12 '@babel/helper-compilation-targets': 7.20.7(@babel/core@7.20.12) '@babel/helper-plugin-utils': 7.20.2 - debug: 4.3.4 + debug: 4.3.4(supports-color@5.5.0) lodash.debounce: 4.0.8 resolve: 1.22.2 semver: 6.3.0 @@ -577,7 +568,7 @@ packages: '@babel/helper-split-export-declaration': 7.18.6 '@babel/helper-validator-identifier': 7.19.1 '@babel/template': 7.20.7 - '@babel/traverse': 7.20.13 + '@babel/traverse': 7.20.13(supports-color@5.5.0) '@babel/types': 7.20.7 transitivePeerDependencies: - supports-color @@ -618,7 +609,7 @@ packages: '@babel/helper-member-expression-to-functions': 7.20.7 '@babel/helper-optimise-call-expression': 7.18.6 '@babel/template': 7.20.7 - '@babel/traverse': 7.20.13 + '@babel/traverse': 7.20.13(supports-color@5.5.0) '@babel/types': 7.20.7 transitivePeerDependencies: - supports-color @@ -666,7 +657,7 @@ packages: dependencies: '@babel/helper-function-name': 7.19.0 '@babel/template': 7.20.7 - '@babel/traverse': 7.20.13 + '@babel/traverse': 7.20.13(supports-color@5.5.0) '@babel/types': 7.20.7 transitivePeerDependencies: - supports-color @@ -677,7 +668,7 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.20.7 - '@babel/traverse': 7.20.13 + '@babel/traverse': 7.20.13(supports-color@5.5.0) '@babel/types': 7.20.7 transitivePeerDependencies: - supports-color @@ -915,15 +906,6 @@ packages: '@babel/helper-plugin-utils': 7.20.2 dev: true - /@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.20.12): - resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.20.12 - '@babel/helper-plugin-utils': 7.20.2 - dev: true - /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.20.12): resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} peerDependencies: @@ -971,15 +953,6 @@ packages: '@babel/helper-plugin-utils': 7.20.2 dev: true - /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.20.12): - resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.20.12 - '@babel/helper-plugin-utils': 7.20.2 - dev: true - /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.20.12): resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} peerDependencies: @@ -989,16 +962,6 @@ packages: '@babel/helper-plugin-utils': 7.20.2 dev: true - /@babel/plugin-syntax-jsx@7.18.6(@babel/core@7.20.12): - resolution: {integrity: sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.20.12 - '@babel/helper-plugin-utils': 7.20.2 - dev: true - /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.20.12): resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} peerDependencies: @@ -1611,24 +1574,6 @@ packages: '@babel/types': 7.20.7 dev: true - /@babel/traverse@7.20.13: - resolution: {integrity: sha512-kMJXfF0T6DIS9E8cgdLCSAL+cuCK+YEZHWiLK0SXpTo8YRj5lpJu3CDNKiIBCne4m9hhTIqUg6SYTAI39tAiVQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/code-frame': 7.18.6 - '@babel/generator': 7.20.14 - '@babel/helper-environment-visitor': 7.18.9 - '@babel/helper-function-name': 7.19.0 - '@babel/helper-hoist-variables': 7.18.6 - '@babel/helper-split-export-declaration': 7.18.6 - '@babel/parser': 7.20.15 - '@babel/types': 7.20.7 - debug: 4.3.4 - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - dev: true - /@babel/traverse@7.20.13(supports-color@5.5.0): resolution: {integrity: sha512-kMJXfF0T6DIS9E8cgdLCSAL+cuCK+YEZHWiLK0SXpTo8YRj5lpJu3CDNKiIBCne4m9hhTIqUg6SYTAI39tAiVQ==} engines: {node: '>=6.9.0'} @@ -1656,10 +1601,6 @@ packages: to-fast-properties: 2.0.0 dev: true - /@bcoe/v8-coverage@0.2.3: - resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} - dev: true - /@discoveryjs/json-ext@0.5.7: resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==} engines: {node: '>=10.0.0'} @@ -1941,178 +1882,6 @@ packages: resolution: {integrity: sha512-SQ7Kzhh9+D+ZW9MA0zkYv3VXhIDNx+LzM6EJ+/65I3QY+enU6Itte7E5XX7EWrqLW2FN4n06GWzBnPoC3th2aQ==} dev: true - /@istanbuljs/load-nyc-config@1.1.0: - resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} - engines: {node: '>=8'} - dependencies: - camelcase: 5.3.1 - find-up: 4.1.0 - get-package-type: 0.1.0 - js-yaml: 3.14.1 - resolve-from: 5.0.0 - dev: true - - /@istanbuljs/schema@0.1.3: - resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} - engines: {node: '>=8'} - dev: true - - /@jest/console@29.4.2: - resolution: {integrity: sha512-0I/rEJwMpV9iwi9cDEnT71a5nNGK9lj8Z4+1pRAU2x/thVXCDnaTGrvxyK+cAqZTFVFCiR+hfVrP4l2m+dCmQg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/types': 29.4.2 - '@types/node': 18.13.0 - chalk: 4.1.2 - jest-message-util: 29.4.2 - jest-util: 29.4.2 - slash: 3.0.0 - dev: true - - /@jest/core@29.4.2: - resolution: {integrity: sha512-KGuoQah0P3vGNlaS/l9/wQENZGNKGoWb+OPxh3gz+YzG7/XExvYu34MzikRndQCdM2S0tzExN4+FL37i6gZmCQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - dependencies: - '@jest/console': 29.4.2 - '@jest/reporters': 29.4.2 - '@jest/test-result': 29.4.2 - '@jest/transform': 29.4.2 - '@jest/types': 29.4.2 - '@types/node': 18.13.0 - ansi-escapes: 4.3.2 - chalk: 4.1.2 - ci-info: 3.8.0 - exit: 0.1.2 - graceful-fs: 4.2.10 - jest-changed-files: 29.4.2 - jest-config: 29.4.2(@types/node@18.13.0) - jest-haste-map: 29.4.2 - jest-message-util: 29.4.2 - jest-regex-util: 29.4.2 - jest-resolve: 29.4.2 - jest-resolve-dependencies: 29.4.2 - jest-runner: 29.4.2 - jest-runtime: 29.4.2 - jest-snapshot: 29.4.2 - jest-util: 29.4.2 - jest-validate: 29.4.2 - jest-watcher: 29.4.2 - micromatch: 4.0.5 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-ansi: 6.0.1 - transitivePeerDependencies: - - supports-color - - ts-node - dev: true - - /@jest/create-cache-key-function@27.5.1: - resolution: {integrity: sha512-dmH1yW+makpTSURTy8VzdUwFnfQh1G8R+DxO2Ho2FFmBbKFEVm+3jWdvFhE2VqB/LATCTokkP0dotjyQyw5/AQ==} - engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} - dependencies: - '@jest/types': 27.5.1 - dev: true - - /@jest/environment@29.4.2: - resolution: {integrity: sha512-JKs3VUtse0vQfCaFGJRX1bir9yBdtasxziSyu+pIiEllAQOe4oQhdCYIf3+Lx+nGglFktSKToBnRJfD5QKp+NQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/fake-timers': 29.4.2 - '@jest/types': 29.4.2 - '@types/node': 18.13.0 - jest-mock: 29.4.2 - dev: true - - /@jest/expect-utils@29.4.2: - resolution: {integrity: sha512-Dd3ilDJpBnqa0GiPN7QrudVs0cczMMHtehSo2CSTjm3zdHx0RcpmhFNVEltuEFeqfLIyWKFI224FsMSQ/nsJQA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - jest-get-type: 29.4.2 - dev: true - - /@jest/expect@29.4.2: - resolution: {integrity: sha512-NUAeZVApzyaeLjfWIV/64zXjA2SS+NuUPHpAlO7IwVMGd5Vf9szTl9KEDlxY3B4liwLO31os88tYNHl6cpjtKQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - expect: 29.4.2 - jest-snapshot: 29.4.2 - transitivePeerDependencies: - - supports-color - dev: true - - /@jest/fake-timers@29.4.2: - resolution: {integrity: sha512-Ny1u0Wg6kCsHFWq7A/rW/tMhIedq2siiyHyLpHCmIhP7WmcAmd2cx95P+0xtTZlj5ZbJxIRQi4OPydZZUoiSQQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/types': 29.4.2 - '@sinonjs/fake-timers': 10.0.2 - '@types/node': 18.13.0 - jest-message-util: 29.4.2 - jest-mock: 29.4.2 - jest-util: 29.4.2 - dev: true - - /@jest/globals@29.4.2: - resolution: {integrity: sha512-zCk70YGPzKnz/I9BNFDPlK+EuJLk21ur/NozVh6JVM86/YYZtZHqxFFQ62O9MWq7uf3vIZnvNA0BzzrtxD9iyg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/environment': 29.4.2 - '@jest/expect': 29.4.2 - '@jest/types': 29.4.2 - jest-mock: 29.4.2 - transitivePeerDependencies: - - supports-color - dev: true - - /@jest/reporters@29.4.2: - resolution: {integrity: sha512-10yw6YQe75zCgYcXgEND9kw3UZZH5tJeLzWv4vTk/2mrS1aY50A37F+XT2hPO5OqQFFnUWizXD8k1BMiATNfUw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - dependencies: - '@bcoe/v8-coverage': 0.2.3 - '@jest/console': 29.4.2 - '@jest/test-result': 29.4.2 - '@jest/transform': 29.4.2 - '@jest/types': 29.4.2 - '@jridgewell/trace-mapping': 0.3.17 - '@types/node': 18.13.0 - chalk: 4.1.2 - collect-v8-coverage: 1.0.1 - exit: 0.1.2 - glob: 7.2.3 - graceful-fs: 4.2.10 - istanbul-lib-coverage: 3.2.0 - istanbul-lib-instrument: 5.2.1 - istanbul-lib-report: 3.0.0 - istanbul-lib-source-maps: 4.0.1 - istanbul-reports: 3.1.5 - jest-message-util: 29.4.2 - jest-util: 29.4.2 - jest-worker: 29.4.2 - slash: 3.0.0 - string-length: 4.0.2 - strip-ansi: 6.0.1 - v8-to-istanbul: 9.0.1 - transitivePeerDependencies: - - supports-color - dev: true - - /@jest/schemas@29.4.2: - resolution: {integrity: sha512-ZrGzGfh31NtdVH8tn0mgJw4khQuNHiKqdzJAFbCaERbyCP9tHlxWuL/mnMu8P7e/+k4puWjI1NOzi/sFsjce/g==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@sinclair/typebox': 0.25.21 - dev: true - /@jest/schemas@29.6.3: resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -2120,81 +1889,6 @@ packages: '@sinclair/typebox': 0.27.8 dev: true - /@jest/source-map@29.4.2: - resolution: {integrity: sha512-tIoqV5ZNgYI9XCKXMqbYe5JbumcvyTgNN+V5QW4My033lanijvCD0D4PI9tBw4pRTqWOc00/7X3KVvUh+qnF4Q==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jridgewell/trace-mapping': 0.3.17 - callsites: 3.1.0 - graceful-fs: 4.2.10 - dev: true - - /@jest/test-result@29.4.2: - resolution: {integrity: sha512-HZsC3shhiHVvMtP+i55MGR5bPcc3obCFbA5bzIOb8pCjwBZf11cZliJncCgaVUbC5yoQNuGqCkC0Q3t6EItxZA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/console': 29.4.2 - '@jest/types': 29.4.2 - '@types/istanbul-lib-coverage': 2.0.4 - collect-v8-coverage: 1.0.1 - dev: true - - /@jest/test-sequencer@29.4.2: - resolution: {integrity: sha512-9Z2cVsD6CcObIVrWigHp2McRJhvCxL27xHtrZFgNC1RwnoSpDx6fZo8QYjJmziFlW9/hr78/3sxF54S8B6v8rg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/test-result': 29.4.2 - graceful-fs: 4.2.10 - jest-haste-map: 29.4.2 - slash: 3.0.0 - dev: true - - /@jest/transform@29.4.2: - resolution: {integrity: sha512-kf1v5iTJHn7p9RbOsBuc/lcwyPtJaZJt5885C98omWz79NIeD3PfoiiaPSu7JyCyFzNOIzKhmMhQLUhlTL9BvQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@babel/core': 7.20.12 - '@jest/types': 29.4.2 - '@jridgewell/trace-mapping': 0.3.17 - babel-plugin-istanbul: 6.1.1 - chalk: 4.1.2 - convert-source-map: 2.0.0 - fast-json-stable-stringify: 2.1.0 - graceful-fs: 4.2.10 - jest-haste-map: 29.4.2 - jest-regex-util: 29.4.2 - jest-util: 29.4.2 - micromatch: 4.0.5 - pirates: 4.0.5 - slash: 3.0.0 - write-file-atomic: 4.0.2 - transitivePeerDependencies: - - supports-color - dev: true - - /@jest/types@27.5.1: - resolution: {integrity: sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==} - engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} - dependencies: - '@types/istanbul-lib-coverage': 2.0.4 - '@types/istanbul-reports': 3.0.1 - '@types/node': 18.13.0 - '@types/yargs': 16.0.5 - chalk: 4.1.2 - dev: true - - /@jest/types@29.4.2: - resolution: {integrity: sha512-CKlngyGP0fwlgC1BRUtPZSiWLBhyS9dKwKmyGxk8Z6M82LBEGB2aLQSg+U1MyLsU+M7UjnlLllBM2BLWKVm/Uw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/schemas': 29.4.2 - '@types/istanbul-lib-coverage': 2.0.4 - '@types/istanbul-reports': 3.0.1 - '@types/node': 18.13.0 - '@types/yargs': 17.0.22 - chalk: 4.1.2 - dev: true - /@jridgewell/gen-mapping@0.1.1: resolution: {integrity: sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==} engines: {node: '>=6.0.0'} @@ -2727,214 +2421,51 @@ packages: resolution: {integrity: sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==} dev: true - /@sinclair/typebox@0.25.21: - resolution: {integrity: sha512-gFukHN4t8K4+wVC+ECqeqwzBDeFeTzBXroBTqE6vcWrQGbEUpHO7LYdG0f4xnvYq4VOEwITSlHlp0JBAIFMS/g==} - dev: true - /@sinclair/typebox@0.27.8: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true - /@sinonjs/commons@2.0.0: - resolution: {integrity: sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==} - dependencies: - type-detect: 4.0.8 - dev: true - - /@sinonjs/fake-timers@10.0.2: - resolution: {integrity: sha512-SwUDyjWnah1AaNl7kxsa7cfLhlTYoiyhDAIgyh+El30YvXs/o7OLXpYH88Zdhyx9JExKrmHDJ+10bwIcY80Jmw==} - dependencies: - '@sinonjs/commons': 2.0.0 - dev: true - /@steelydylan/markdown-it-imsize@1.0.2: resolution: {integrity: sha512-3tfhRLlv8w3GSNzjEx3y1JIyHpCuBhqXN6tILRTR4IhZcrJb6WJJo12jZ/lKiT9VITg9kHHHg6yVsDwO5nnZqw==} dev: false - /@swc/core-darwin-arm64@1.3.26: - resolution: {integrity: sha512-FWWflBfKRYrUJtko2xiedC5XCa31O75IZZqnTWuLpe9g3C5tnUuF3M8LSXZS/dn6wprome1MhtG9GMPkSYkhkg==} - engines: {node: '>=10'} - cpu: [arm64] - os: [darwin] - requiresBuild: true + /@tootallnate/once@2.0.0: + resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} + engines: {node: '>= 10'} dev: true - optional: true - /@swc/core-darwin-x64@1.3.26: - resolution: {integrity: sha512-0uQeebAtsewqJ2b35aPZstGrylwd6oJjUyAJOfVJNbremFSJ5JzytB3NoDCIw7CT5UQrSRpvD3mU95gfdQjDGA==} - engines: {node: '>=10'} - cpu: [x64] - os: [darwin] - requiresBuild: true + /@types/body-parser@1.19.2: + resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} + dependencies: + '@types/connect': 3.4.35 + '@types/node': 18.13.0 dev: true - optional: true - /@swc/core-linux-arm-gnueabihf@1.3.26: - resolution: {integrity: sha512-06T+LbVFlyciQtwrUB5/a16A1ju1jFoYvd/hq9TWhf7GrtL43U7oJIgqMOPHx2j0+Ps2R3S6R/UUN5YXu618zA==} - engines: {node: '>=10'} - cpu: [arm] - os: [linux] - requiresBuild: true + /@types/chai-subset@1.3.3: + resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} + dependencies: + '@types/chai': 4.3.6 dev: true - optional: true - /@swc/core-linux-arm64-gnu@1.3.26: - resolution: {integrity: sha512-2NT/0xALPfK+U01qIlHxjkGdIj6F0txhu1U2v6B0YP2+k0whL2gCgYeg9QUvkYEXSD5r1Yx+vcb2R/vaSCSClg==} - engines: {node: '>=10'} - cpu: [arm64] - os: [linux] - requiresBuild: true + /@types/chai@4.3.6: + resolution: {integrity: sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw==} dev: true - optional: true - /@swc/core-linux-arm64-musl@1.3.26: - resolution: {integrity: sha512-64KrTay9hC0mTvZ1AmEFmNEwV5QDjw9U7PJU5riotSc28I+Q/ZoM0qcSFW9JRRa6F2Tr+IfMtyv8+eB2//BQ5g==} - engines: {node: '>=10'} - cpu: [arm64] - os: [linux] - requiresBuild: true + /@types/configstore@6.0.0: + resolution: {integrity: sha512-GUvNiia85zTDDIx0iPrtF3pI8dwrQkfuokEqxqPDE55qxH0U5SZz4awVZjiJLWN2ZZRkXCUqgsMUbygXY+kytA==} dev: true - optional: true - /@swc/core-linux-x64-gnu@1.3.26: - resolution: {integrity: sha512-Te8G13l3dcRM1Mf3J4JzGUngzNXLKnMYlUmBOYN/ORsx7e+VNelR3zsTLHC0+0jGqELDgqvMyzDfk+dux/C/bQ==} - engines: {node: '>=10'} - cpu: [x64] - os: [linux] - requiresBuild: true + /@types/connect-history-api-fallback@1.3.5: + resolution: {integrity: sha512-h8QJa8xSb1WD4fpKBDcATDNGXghFj6/3GRWG6dhmRcu0RX1Ubasur2Uvx5aeEwlf0MwblEC2bMzzMQntxnw/Cw==} + dependencies: + '@types/express-serve-static-core': 4.17.33 + '@types/node': 18.13.0 dev: true - optional: true - /@swc/core-linux-x64-musl@1.3.26: - resolution: {integrity: sha512-nqQWuSM6OTKepUiQ9+rXgERq/JiO72RBOpXKO2afYppsL96sngjIRewV74v5f6IAfyzw+k+AhC5pgRA4Xu/Jkg==} - engines: {node: '>=10'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@swc/core-win32-arm64-msvc@1.3.26: - resolution: {integrity: sha512-xx34mx+9IBV1sun7sxoNFiqNom9wiOuvsQFJUyQptCnZHgYwOr9OI204LBF95dCcBCZsTm2hT1wBnySJOeimYw==} - engines: {node: '>=10'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@swc/core-win32-ia32-msvc@1.3.26: - resolution: {integrity: sha512-48LZ/HKNuU9zl8c7qG6IQKb5rBCwmJgysGOmEGzTRBYxAf/x6Scmt0aqxCoV4J02HOs2WduCBDnhUKsSQ2kcXQ==} - engines: {node: '>=10'} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@swc/core-win32-x64-msvc@1.3.26: - resolution: {integrity: sha512-UPe7S+MezD/S6cKBIc50TduGzmw6PBz1Ms5p+5wDLOKYNS/LSEM4iRmLwvePzP5X8mOyesXrsbwxLy8KHP65Yw==} - engines: {node: '>=10'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@swc/core@1.3.26: - resolution: {integrity: sha512-U7vEsaLn3IGg0XCRLJX/GTkK9WIfFHUX5USdrp1L2QD29sWPe25HqNndXmUR9KytzKmpDMNoUuHyiuhpVrnNeQ==} - engines: {node: '>=10'} - requiresBuild: true - optionalDependencies: - '@swc/core-darwin-arm64': 1.3.26 - '@swc/core-darwin-x64': 1.3.26 - '@swc/core-linux-arm-gnueabihf': 1.3.26 - '@swc/core-linux-arm64-gnu': 1.3.26 - '@swc/core-linux-arm64-musl': 1.3.26 - '@swc/core-linux-x64-gnu': 1.3.26 - '@swc/core-linux-x64-musl': 1.3.26 - '@swc/core-win32-arm64-msvc': 1.3.26 - '@swc/core-win32-ia32-msvc': 1.3.26 - '@swc/core-win32-x64-msvc': 1.3.26 - dev: true - - /@swc/jest@0.2.24(@swc/core@1.3.26): - resolution: {integrity: sha512-fwgxQbM1wXzyKzl1+IW0aGrRvAA8k0Y3NxFhKigbPjOJ4mCKnWEcNX9HQS3gshflcxq8YKhadabGUVfdwjCr6Q==} - engines: {npm: '>= 7.0.0'} - peerDependencies: - '@swc/core': '*' - dependencies: - '@jest/create-cache-key-function': 27.5.1 - '@swc/core': 1.3.26 - jsonc-parser: 3.2.0 - dev: true - - /@tootallnate/once@2.0.0: - resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} - engines: {node: '>= 10'} - dev: true - - /@types/babel__core@7.20.0: - resolution: {integrity: sha512-+n8dL/9GWblDO0iU6eZAwEIJVr5DWigtle+Q6HLOrh/pdbXOhOtqzq8VPPE2zvNJzSKY4vH/z3iT3tn0A3ypiQ==} - dependencies: - '@babel/parser': 7.20.15 - '@babel/types': 7.20.7 - '@types/babel__generator': 7.6.4 - '@types/babel__template': 7.4.1 - '@types/babel__traverse': 7.18.3 - dev: true - - /@types/babel__generator@7.6.4: - resolution: {integrity: sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==} - dependencies: - '@babel/types': 7.20.7 - dev: true - - /@types/babel__template@7.4.1: - resolution: {integrity: sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==} - dependencies: - '@babel/parser': 7.20.15 - '@babel/types': 7.20.7 - dev: true - - /@types/babel__traverse@7.18.3: - resolution: {integrity: sha512-1kbcJ40lLB7MHsj39U4Sh1uTd2E7rLEa79kmDpI6cy+XiXsteB3POdQomoq4FxszMrO3ZYchkhYJw7A2862b3w==} - dependencies: - '@babel/types': 7.20.7 - dev: true - - /@types/body-parser@1.19.2: - resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} - dependencies: - '@types/connect': 3.4.35 - '@types/node': 18.13.0 - dev: true - - /@types/chai-subset@1.3.3: - resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} - dependencies: - '@types/chai': 4.3.6 - dev: true - - /@types/chai@4.3.6: - resolution: {integrity: sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw==} - dev: true - - /@types/configstore@6.0.0: - resolution: {integrity: sha512-GUvNiia85zTDDIx0iPrtF3pI8dwrQkfuokEqxqPDE55qxH0U5SZz4awVZjiJLWN2ZZRkXCUqgsMUbygXY+kytA==} - dev: true - - /@types/connect-history-api-fallback@1.3.5: - resolution: {integrity: sha512-h8QJa8xSb1WD4fpKBDcATDNGXghFj6/3GRWG6dhmRcu0RX1Ubasur2Uvx5aeEwlf0MwblEC2bMzzMQntxnw/Cw==} - dependencies: - '@types/express-serve-static-core': 4.17.33 - '@types/node': 18.13.0 - dev: true - - /@types/connect@3.4.35: - resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} - dependencies: - '@types/node': 18.13.0 + /@types/connect@3.4.35: + resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} + dependencies: + '@types/node': 18.13.0 dev: true /@types/cookiejar@2.1.2: @@ -2990,12 +2521,6 @@ packages: '@types/node': 18.13.0 dev: true - /@types/graceful-fs@4.1.6: - resolution: {integrity: sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==} - dependencies: - '@types/node': 18.13.0 - dev: true - /@types/hoist-non-react-statics@3.3.1: resolution: {integrity: sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==} dependencies: @@ -3003,29 +2528,6 @@ packages: hoist-non-react-statics: 3.3.2 dev: true - /@types/istanbul-lib-coverage@2.0.4: - resolution: {integrity: sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==} - dev: true - - /@types/istanbul-lib-report@3.0.0: - resolution: {integrity: sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==} - dependencies: - '@types/istanbul-lib-coverage': 2.0.4 - dev: true - - /@types/istanbul-reports@3.0.1: - resolution: {integrity: sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==} - dependencies: - '@types/istanbul-lib-report': 3.0.0 - dev: true - - /@types/jest@29.4.0: - resolution: {integrity: sha512-VaywcGQ9tPorCX/Jkkni7RWGFfI11whqzs8dvxF41P17Z+z872thvEvlIbznjPJ02kl1HMX3LmLOonsj2n7HeQ==} - dependencies: - expect: 29.4.2 - pretty-format: 29.7.0 - dev: true - /@types/js-yaml@4.0.5: resolution: {integrity: sha512-FhpRzf927MNQdRZP0J5DLIdTXhjLYzeUTmLAu69mnVksLH9CJY3IuSeEgbKUki7GQZm0WqDkGzyxju2EZGD2wA==} dev: true @@ -3075,10 +2577,6 @@ packages: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} dev: true - /@types/prettier@2.7.2: - resolution: {integrity: sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg==} - dev: true - /@types/prismjs@1.26.0: resolution: {integrity: sha512-ZTaqn/qSqUuAq1YwvOFQfVW1AR/oQJlLSZVustdjwI+GZ8kr0MSHBj0tsXPW1EqHubx50gtBEjbPGsdZwQwCjQ==} dev: true @@ -3130,10 +2628,6 @@ packages: '@types/node': 18.13.0 dev: true - /@types/stack-utils@2.0.1: - resolution: {integrity: sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==} - dev: true - /@types/styled-components@5.1.26: resolution: {integrity: sha512-KuKJ9Z6xb93uJiIyxo/+ksS7yLjS1KzG6iv5i78dhVg/X3u5t1H7juRWqVmodIdz6wGVaIApo1u01kmFRdJHVw==} dependencies: @@ -3161,22 +2655,6 @@ packages: '@types/node': 18.13.0 dev: true - /@types/yargs-parser@21.0.0: - resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} - dev: true - - /@types/yargs@16.0.5: - resolution: {integrity: sha512-AxO/ADJOBFJScHbWhq2xAhlWP24rY4aCEG/NFaMvbT3X2MgRsLjhjQwsn0Zi5zn0LG9jUhCCZMeX9Dkuw6k+vQ==} - dependencies: - '@types/yargs-parser': 21.0.0 - dev: true - - /@types/yargs@17.0.22: - resolution: {integrity: sha512-pet5WJ9U8yPVRhkwuEIp5ktAeAqRZOq4UdAyWLWzxbtpyXnzbtLdKiXAjJzi/KLmPGS9wk86lUFWZFN6sISo4g==} - dependencies: - '@types/yargs-parser': 21.0.0 - dev: true - /@typescript-eslint/eslint-plugin@5.52.0(@typescript-eslint/parser@5.52.0)(eslint@8.34.0)(typescript@4.9.5): resolution: {integrity: sha512-lHazYdvYVsBokwCdKOppvYJKaJ4S41CgKBcPvyd0xjZNbvQdhn/pnJlGtQksQ/NhInzdaeaSarlBjDXHuclEbg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3763,47 +3241,6 @@ packages: - debug dev: true - /babel-jest@29.4.2(@babel/core@7.20.12): - resolution: {integrity: sha512-vcghSqhtowXPG84posYkkkzcZsdayFkubUgbE3/1tuGbX7AQtwCkkNA/wIbB0BMjuCPoqTkiDyKN7Ty7d3uwNQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - '@babel/core': ^7.8.0 - dependencies: - '@babel/core': 7.20.12 - '@jest/transform': 29.4.2 - '@types/babel__core': 7.20.0 - babel-plugin-istanbul: 6.1.1 - babel-preset-jest: 29.4.2(@babel/core@7.20.12) - chalk: 4.1.2 - graceful-fs: 4.2.10 - slash: 3.0.0 - transitivePeerDependencies: - - supports-color - dev: true - - /babel-plugin-istanbul@6.1.1: - resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} - engines: {node: '>=8'} - dependencies: - '@babel/helper-plugin-utils': 7.20.2 - '@istanbuljs/load-nyc-config': 1.1.0 - '@istanbuljs/schema': 0.1.3 - istanbul-lib-instrument: 5.2.1 - test-exclude: 6.0.0 - transitivePeerDependencies: - - supports-color - dev: true - - /babel-plugin-jest-hoist@29.4.2: - resolution: {integrity: sha512-5HZRCfMeWypFEonRbEkwWXtNS1sQK159LhRVyRuLzyfVBxDy/34Tr/rg4YVi0SScSJ4fqeaR/OIeceJ/LaQ0pQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@babel/template': 7.20.7 - '@babel/types': 7.20.7 - '@types/babel__core': 7.20.0 - '@types/babel__traverse': 7.18.3 - dev: true - /babel-plugin-polyfill-corejs2@0.3.3(@babel/core@7.20.12): resolution: {integrity: sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==} peerDependencies: @@ -3865,37 +3302,6 @@ packages: resolution: {integrity: sha512-qrPaCSo9c8RHNRHIotaufGbuOBN8rtdC4QrrFFc43vyWCCz7Kl7GL1PGaXtMGQZUXrkCjNEgxDfmAuAabr/rlw==} dev: true - /babel-preset-current-node-syntax@1.0.1(@babel/core@7.20.12): - resolution: {integrity: sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.20.12 - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.20.12) - '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.20.12) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.20.12) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.20.12) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.20.12) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.20.12) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.20.12) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.20.12) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.20.12) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.20.12) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.20.12) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.20.12) - dev: true - - /babel-preset-jest@29.4.2(@babel/core@7.20.12): - resolution: {integrity: sha512-ecWdaLY/8JyfUDr0oELBMpj3R5I1L6ZqG+kRJmwqfHtLWuPrJStR0LUkvUhfykJWTsXXMnohsayN/twltBbDrQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.20.12 - babel-plugin-jest-hoist: 29.4.2 - babel-preset-current-node-syntax: 1.0.1(@babel/core@7.20.12) - dev: true - /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} dev: true @@ -4004,12 +3410,6 @@ packages: update-browserslist-db: 1.0.10(browserslist@4.21.5) dev: true - /bser@2.1.1: - resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} - dependencies: - node-int64: 0.4.0 - dev: true - /buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} dev: true @@ -4165,11 +3565,6 @@ packages: supports-color: 7.2.0 dev: true - /char-regex@1.0.2: - resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} - engines: {node: '>=10'} - dev: true - /chardet@0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} dev: true @@ -4231,10 +3626,6 @@ packages: engines: {node: '>=8'} dev: true - /cjs-module-lexer@1.2.2: - resolution: {integrity: sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==} - dev: true - /clean-stack@2.2.0: resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} engines: {node: '>=6'} @@ -4303,15 +3694,6 @@ packages: engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dev: true - /co@4.6.0: - resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} - engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} - dev: true - - /collect-v8-coverage@1.0.1: - resolution: {integrity: sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==} - dev: true - /color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: @@ -4533,10 +3915,6 @@ packages: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} dev: true - /convert-source-map@2.0.0: - resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} - dev: true - /cookie-signature@1.0.6: resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} dev: true @@ -4741,6 +4119,7 @@ packages: /deepmerge@4.3.0: resolution: {integrity: sha512-z2wJZXrmeHdvYJp/Ux55wIjqo81G5Bp4c+oELTW+7ar6SogWHajt5a9gO3s3IDaGSAXjDk0vlQKN3rms8ab3og==} engines: {node: '>=0.10.0'} + dev: false /defaults@1.0.4: resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} @@ -4799,11 +4178,6 @@ packages: engines: {node: '>=8'} dev: true - /detect-newline@3.1.0: - resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} - engines: {node: '>=8'} - dev: true - /dezalgo@1.0.4: resolution: {integrity: sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==} dependencies: @@ -4811,11 +4185,6 @@ packages: wrappy: 1.0.2 dev: true - /diff-sequences@29.4.2: - resolution: {integrity: sha512-R6P0Y6PrsH3n4hUXxL3nns0rbRk6Q33js3ygJBeEpbzLzgcNuJ61+u0RXasFpTKISw99TxUzFnumSnRLsjhLaw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dev: true - /diff-sequences@29.6.3: resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -4900,11 +4269,6 @@ packages: resolution: {integrity: sha512-i/6Q+Y9bluDa2a0NbMvdtG5TuS/1Fr3TKK8L+7UUL9QjRS5iFJzCC3r70xjyOnLiYG8qGV4/mMpe6HuAbdJW4w==} dev: true - /emittery@0.13.1: - resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} - engines: {node: '>=12'} - dev: true - /emoji-regex@10.2.1: resolution: {integrity: sha512-97g6QgOk8zlDRdgq1WxwgTMgEWGVAQvB5Fdpgc1MkNy56la5SKP9GsMXKDOdqwn90/41a8yPwIGk1Y6WVbeMQA==} @@ -5099,11 +4463,6 @@ packages: engines: {node: '>=0.8.0'} dev: true - /escape-string-regexp@2.0.0: - resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} - engines: {node: '>=8'} - dev: true - /escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} @@ -5279,22 +4638,6 @@ packages: strip-final-newline: 2.0.0 dev: true - /exit@0.1.2: - resolution: {integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==} - engines: {node: '>= 0.8.0'} - dev: true - - /expect@29.4.2: - resolution: {integrity: sha512-+JHYg9O3hd3RlICG90OPVjRkPBoiUH7PxvDVMnRiaq1g6JUgZStX514erMl0v2Dc5SkfVbm7ztqbd6qHHPn+mQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/expect-utils': 29.4.2 - jest-get-type: 29.4.2 - jest-matcher-utils: 29.4.2 - jest-message-util: 29.4.2 - jest-util: 29.4.2 - dev: true - /express@4.18.2: resolution: {integrity: sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==} engines: {node: '>= 0.10.0'} @@ -5388,12 +4731,6 @@ packages: reusify: 1.0.4 dev: true - /fb-watchman@2.0.2: - resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} - dependencies: - bser: 2.1.1 - dev: true - /figures@3.2.0: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} @@ -5626,11 +4963,6 @@ packages: has-symbols: 1.0.3 dev: true - /get-package-type@0.1.0: - resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} - engines: {node: '>=8.0.0'} - dev: true - /get-pkg-repo@4.2.1: resolution: {integrity: sha512-2+QbHjFRfGB74v/pYWjd5OhU3TDIC2Gv/YKUTk/tCvAz0pkn/Mz6P3uByuBimLOcPvN2jYdScl3xGFSrx0jEcA==} engines: {node: '>=6.9.0'} @@ -5915,10 +5247,6 @@ packages: whatwg-encoding: 2.0.0 dev: true - /html-escaper@2.0.2: - resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} - dev: true - /htmlparser2@8.0.1: resolution: {integrity: sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA==} dependencies: @@ -6194,11 +5522,6 @@ packages: engines: {node: '>=8'} dev: true - /is-generator-fn@2.1.0: - resolution: {integrity: sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==} - engines: {node: '>=6'} - dev: true - /is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} @@ -6228,562 +5551,136 @@ packages: dev: true /is-number@7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} - requiresBuild: true - dev: true - - /is-obj@2.0.0: - resolution: {integrity: sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==} - engines: {node: '>=8'} - dev: true - - /is-path-inside@3.0.3: - resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} - engines: {node: '>=8'} - dev: true - - /is-plain-obj@1.1.0: - resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} - engines: {node: '>=0.10.0'} - dev: true - - /is-plain-obj@2.1.0: - resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} - engines: {node: '>=8'} - dev: true - - /is-plain-object@2.0.4: - resolution: {integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==} - engines: {node: '>=0.10.0'} - dependencies: - isobject: 3.0.1 - dev: true - - /is-plain-object@5.0.0: - resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==} - engines: {node: '>=0.10.0'} - - /is-potential-custom-element-name@1.0.1: - resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} - dev: true - - /is-regex@1.1.4: - resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - has-tostringtag: 1.0.0 - dev: true - - /is-shared-array-buffer@1.0.2: - resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} - dependencies: - call-bind: 1.0.2 - dev: true - - /is-ssh@1.4.0: - resolution: {integrity: sha512-x7+VxdxOdlV3CYpjvRLBv5Lo9OJerlYanjwFrPR9fuGPjCiNiCzFgAWpiLAohSbsnH4ZAys3SBh+hq5rJosxUQ==} - dependencies: - protocols: 2.0.1 - dev: true - - /is-stream@2.0.1: - resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} - engines: {node: '>=8'} - dev: true - - /is-string@1.0.7: - resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} - engines: {node: '>= 0.4'} - dependencies: - has-tostringtag: 1.0.0 - dev: true - - /is-symbol@1.0.4: - resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} - engines: {node: '>= 0.4'} - dependencies: - has-symbols: 1.0.3 - dev: true - - /is-text-path@1.0.1: - resolution: {integrity: sha512-xFuJpne9oFz5qDaodwmmG08e3CawH/2ZV8Qqza1Ko7Sk8POWbkRdwIoAWVhqvq0XeUzANEhKo2n0IXUGBm7A/w==} - engines: {node: '>=0.10.0'} - dependencies: - text-extensions: 1.9.0 - dev: true - - /is-typed-array@1.1.10: - resolution: {integrity: sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==} - engines: {node: '>= 0.4'} - dependencies: - available-typed-arrays: 1.0.5 - call-bind: 1.0.2 - for-each: 0.3.3 - gopd: 1.0.1 - has-tostringtag: 1.0.0 - dev: true - - /is-typedarray@1.0.0: - resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==} - dev: true - - /is-unicode-supported@0.1.0: - resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} - engines: {node: '>=10'} - dev: true - - /is-weakref@1.0.2: - resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} - dependencies: - call-bind: 1.0.2 - dev: true - - /is-wsl@2.2.0: - resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} - engines: {node: '>=8'} - dependencies: - is-docker: 2.2.1 - dev: true - - /isarray@1.0.0: - resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} - dev: true - - /isexe@2.0.0: - resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - dev: true - - /isobject@3.0.1: - resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==} - engines: {node: '>=0.10.0'} - dev: true - - /istanbul-lib-coverage@3.2.0: - resolution: {integrity: sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==} - engines: {node: '>=8'} - dev: true - - /istanbul-lib-instrument@5.2.1: - resolution: {integrity: sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==} - engines: {node: '>=8'} - dependencies: - '@babel/core': 7.20.12 - '@babel/parser': 7.20.15 - '@istanbuljs/schema': 0.1.3 - istanbul-lib-coverage: 3.2.0 - semver: 6.3.0 - transitivePeerDependencies: - - supports-color - dev: true - - /istanbul-lib-report@3.0.0: - resolution: {integrity: sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==} - engines: {node: '>=8'} - dependencies: - istanbul-lib-coverage: 3.2.0 - make-dir: 3.1.0 - supports-color: 7.2.0 - dev: true - - /istanbul-lib-source-maps@4.0.1: - resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} - engines: {node: '>=10'} - dependencies: - debug: 4.3.4(supports-color@5.5.0) - istanbul-lib-coverage: 3.2.0 - source-map: 0.6.1 - transitivePeerDependencies: - - supports-color - dev: true - - /istanbul-reports@3.1.5: - resolution: {integrity: sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==} - engines: {node: '>=8'} - dependencies: - html-escaper: 2.0.2 - istanbul-lib-report: 3.0.0 - dev: true - - /jest-changed-files@29.4.2: - resolution: {integrity: sha512-Qdd+AXdqD16PQa+VsWJpxR3kN0JyOCX1iugQfx5nUgAsI4gwsKviXkpclxOK9ZnwaY2IQVHz+771eAvqeOlfuw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - execa: 5.1.1 - p-limit: 3.1.0 - dev: true - - /jest-circus@29.4.2: - resolution: {integrity: sha512-wW3ztp6a2P5c1yOc1Cfrt5ozJ7neWmqeXm/4SYiqcSriyisgq63bwFj1NuRdSR5iqS0CMEYwSZd89ZA47W9zUg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/environment': 29.4.2 - '@jest/expect': 29.4.2 - '@jest/test-result': 29.4.2 - '@jest/types': 29.4.2 - '@types/node': 18.13.0 - chalk: 4.1.2 - co: 4.6.0 - dedent: 0.7.0 - is-generator-fn: 2.1.0 - jest-each: 29.4.2 - jest-matcher-utils: 29.4.2 - jest-message-util: 29.4.2 - jest-runtime: 29.4.2 - jest-snapshot: 29.4.2 - jest-util: 29.4.2 - p-limit: 3.1.0 - pretty-format: 29.7.0 - slash: 3.0.0 - stack-utils: 2.0.6 - transitivePeerDependencies: - - supports-color - dev: true - - /jest-cli@29.4.2: - resolution: {integrity: sha512-b+eGUtXq/K2v7SH3QcJvFvaUaCDS1/YAZBYz0m28Q/Ppyr+1qNaHmVYikOrbHVbZqYQs2IeI3p76uy6BWbXq8Q==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - hasBin: true - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - dependencies: - '@jest/core': 29.4.2 - '@jest/test-result': 29.4.2 - '@jest/types': 29.4.2 - chalk: 4.1.2 - exit: 0.1.2 - graceful-fs: 4.2.10 - import-local: 3.1.0 - jest-config: 29.4.2(@types/node@18.13.0) - jest-util: 29.4.2 - jest-validate: 29.4.2 - prompts: 2.4.2 - yargs: 17.6.2 - transitivePeerDependencies: - - '@types/node' - - supports-color - - ts-node - dev: true - - /jest-config@29.4.2(@types/node@18.13.0): - resolution: {integrity: sha512-919CtnXic52YM0zW4C1QxjG6aNueX1kBGthuMtvFtRTAxhKfJmiXC9qwHmi6o2josjbDz8QlWyY55F1SIVmCWA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - '@types/node': '*' - ts-node: '>=9.0.0' - peerDependenciesMeta: - '@types/node': - optional: true - ts-node: - optional: true - dependencies: - '@babel/core': 7.20.12 - '@jest/test-sequencer': 29.4.2 - '@jest/types': 29.4.2 - '@types/node': 18.13.0 - babel-jest: 29.4.2(@babel/core@7.20.12) - chalk: 4.1.2 - ci-info: 3.8.0 - deepmerge: 4.3.0 - glob: 7.2.3 - graceful-fs: 4.2.10 - jest-circus: 29.4.2 - jest-environment-node: 29.4.2 - jest-get-type: 29.4.2 - jest-regex-util: 29.4.2 - jest-resolve: 29.4.2 - jest-runner: 29.4.2 - jest-util: 29.4.2 - jest-validate: 29.4.2 - micromatch: 4.0.5 - parse-json: 5.2.0 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + requiresBuild: true dev: true - /jest-diff@29.4.2: - resolution: {integrity: sha512-EK8DSajVtnjx9sa1BkjZq3mqChm2Cd8rIzdXkQMA8e0wuXq53ypz6s5o5V8HRZkoEt2ywJ3eeNWFKWeYr8HK4g==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - chalk: 4.1.2 - diff-sequences: 29.4.2 - jest-get-type: 29.4.2 - pretty-format: 29.7.0 + /is-obj@2.0.0: + resolution: {integrity: sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==} + engines: {node: '>=8'} dev: true - /jest-docblock@29.4.2: - resolution: {integrity: sha512-dV2JdahgClL34Y5vLrAHde3nF3yo2jKRH+GIYJuCpfqwEJZcikzeafVTGAjbOfKPG17ez9iWXwUYp7yefeCRag==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - detect-newline: 3.1.0 + /is-path-inside@3.0.3: + resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} + engines: {node: '>=8'} dev: true - /jest-each@29.4.2: - resolution: {integrity: sha512-trvKZb0JYiCndc55V1Yh0Luqi7AsAdDWpV+mKT/5vkpnnFQfuQACV72IoRV161aAr6kAVIBpmYzwhBzm34vQkA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/types': 29.4.2 - chalk: 4.1.2 - jest-get-type: 29.4.2 - jest-util: 29.4.2 - pretty-format: 29.7.0 + /is-plain-obj@1.1.0: + resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} + engines: {node: '>=0.10.0'} dev: true - /jest-environment-node@29.4.2: - resolution: {integrity: sha512-MLPrqUcOnNBc8zTOfqBbxtoa8/Ee8tZ7UFW7hRDQSUT+NGsvS96wlbHGTf+EFAT9KC3VNb7fWEM6oyvmxtE/9w==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + /is-plain-obj@2.1.0: + resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} + engines: {node: '>=8'} + dev: true + + /is-plain-object@2.0.4: + resolution: {integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==} + engines: {node: '>=0.10.0'} dependencies: - '@jest/environment': 29.4.2 - '@jest/fake-timers': 29.4.2 - '@jest/types': 29.4.2 - '@types/node': 18.13.0 - jest-mock: 29.4.2 - jest-util: 29.4.2 + isobject: 3.0.1 dev: true - /jest-get-type@29.4.2: - resolution: {integrity: sha512-vERN30V5i2N6lqlFu4ljdTqQAgrkTFMC9xaIIfOPYBw04pufjXRty5RuXBiB1d72tGbURa/UgoiHB90ruOSivg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + /is-plain-object@5.0.0: + resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==} + engines: {node: '>=0.10.0'} + + /is-potential-custom-element-name@1.0.1: + resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} dev: true - /jest-haste-map@29.4.2: - resolution: {integrity: sha512-WkUgo26LN5UHPknkezrBzr7lUtV1OpGsp+NfXbBwHztsFruS3gz+AMTTBcEklvi8uPzpISzYjdKXYZQJXBnfvw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + /is-regex@1.1.4: + resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} + engines: {node: '>= 0.4'} dependencies: - '@jest/types': 29.4.2 - '@types/graceful-fs': 4.1.6 - '@types/node': 18.13.0 - anymatch: 3.1.3 - fb-watchman: 2.0.2 - graceful-fs: 4.2.10 - jest-regex-util: 29.4.2 - jest-util: 29.4.2 - jest-worker: 29.4.2 - micromatch: 4.0.5 - walker: 1.0.8 - optionalDependencies: - fsevents: 2.3.2 + call-bind: 1.0.2 + has-tostringtag: 1.0.0 dev: true - /jest-leak-detector@29.4.2: - resolution: {integrity: sha512-Wa62HuRJmWXtX9F00nUpWlrbaH5axeYCdyRsOs/+Rb1Vb6+qWTlB5rKwCCRKtorM7owNwKsyJ8NRDUcZ8ghYUA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + /is-shared-array-buffer@1.0.2: + resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} dependencies: - jest-get-type: 29.4.2 - pretty-format: 29.7.0 + call-bind: 1.0.2 dev: true - /jest-matcher-utils@29.4.2: - resolution: {integrity: sha512-EZaAQy2je6Uqkrm6frnxBIdaWtSYFoR8SVb2sNLAtldswlR/29JAgx+hy67llT3+hXBaLB0zAm5UfeqerioZyg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + /is-ssh@1.4.0: + resolution: {integrity: sha512-x7+VxdxOdlV3CYpjvRLBv5Lo9OJerlYanjwFrPR9fuGPjCiNiCzFgAWpiLAohSbsnH4ZAys3SBh+hq5rJosxUQ==} dependencies: - chalk: 4.1.2 - jest-diff: 29.4.2 - jest-get-type: 29.4.2 - pretty-format: 29.7.0 + protocols: 2.0.1 dev: true - /jest-message-util@29.4.2: - resolution: {integrity: sha512-SElcuN4s6PNKpOEtTInjOAA8QvItu0iugkXqhYyguRvQoXapg5gN+9RQxLAkakChZA7Y26j6yUCsFWN+hlKD6g==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@babel/code-frame': 7.18.6 - '@jest/types': 29.4.2 - '@types/stack-utils': 2.0.1 - chalk: 4.1.2 - graceful-fs: 4.2.10 - micromatch: 4.0.5 - pretty-format: 29.7.0 - slash: 3.0.0 - stack-utils: 2.0.6 + /is-stream@2.0.1: + resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} + engines: {node: '>=8'} dev: true - /jest-mock@29.4.2: - resolution: {integrity: sha512-x1FSd4Gvx2yIahdaIKoBjwji6XpboDunSJ95RpntGrYulI1ByuYQCKN/P7hvk09JB74IonU3IPLdkutEWYt++g==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + /is-string@1.0.7: + resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} + engines: {node: '>= 0.4'} dependencies: - '@jest/types': 29.4.2 - '@types/node': 18.13.0 - jest-util: 29.4.2 + has-tostringtag: 1.0.0 dev: true - /jest-pnp-resolver@1.2.3(jest-resolve@29.4.2): - resolution: {integrity: sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==} - engines: {node: '>=6'} - peerDependencies: - jest-resolve: '*' - peerDependenciesMeta: - jest-resolve: - optional: true + /is-symbol@1.0.4: + resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} + engines: {node: '>= 0.4'} dependencies: - jest-resolve: 29.4.2 + has-symbols: 1.0.3 dev: true - /jest-regex-util@29.4.2: - resolution: {integrity: sha512-XYZXOqUl1y31H6VLMrrUL1ZhXuiymLKPz0BO1kEeR5xER9Tv86RZrjTm74g5l9bPJQXA/hyLdaVPN/sdqfteig==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + /is-text-path@1.0.1: + resolution: {integrity: sha512-xFuJpne9oFz5qDaodwmmG08e3CawH/2ZV8Qqza1Ko7Sk8POWbkRdwIoAWVhqvq0XeUzANEhKo2n0IXUGBm7A/w==} + engines: {node: '>=0.10.0'} + dependencies: + text-extensions: 1.9.0 dev: true - /jest-resolve-dependencies@29.4.2: - resolution: {integrity: sha512-6pL4ptFw62rjdrPk7rRpzJYgcRqRZNsZTF1VxVTZMishbO6ObyWvX57yHOaNGgKoADtAHRFYdHQUEvYMJATbDg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + /is-typed-array@1.1.10: + resolution: {integrity: sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==} + engines: {node: '>= 0.4'} dependencies: - jest-regex-util: 29.4.2 - jest-snapshot: 29.4.2 - transitivePeerDependencies: - - supports-color + available-typed-arrays: 1.0.5 + call-bind: 1.0.2 + for-each: 0.3.3 + gopd: 1.0.1 + has-tostringtag: 1.0.0 dev: true - /jest-resolve@29.4.2: - resolution: {integrity: sha512-RtKWW0mbR3I4UdkOrW7552IFGLYQ5AF9YrzD0FnIOkDu0rAMlA5/Y1+r7lhCAP4nXSBTaE7ueeqj6IOwZpgoqw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - chalk: 4.1.2 - graceful-fs: 4.2.10 - jest-haste-map: 29.4.2 - jest-pnp-resolver: 1.2.3(jest-resolve@29.4.2) - jest-util: 29.4.2 - jest-validate: 29.4.2 - resolve: 1.22.2 - resolve.exports: 2.0.0 - slash: 3.0.0 + /is-typedarray@1.0.0: + resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==} dev: true - /jest-runner@29.4.2: - resolution: {integrity: sha512-wqwt0drm7JGjwdH+x1XgAl+TFPH7poowMguPQINYxaukCqlczAcNLJiK+OLxUxQAEWMdy+e6nHZlFHO5s7EuRg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/console': 29.4.2 - '@jest/environment': 29.4.2 - '@jest/test-result': 29.4.2 - '@jest/transform': 29.4.2 - '@jest/types': 29.4.2 - '@types/node': 18.13.0 - chalk: 4.1.2 - emittery: 0.13.1 - graceful-fs: 4.2.10 - jest-docblock: 29.4.2 - jest-environment-node: 29.4.2 - jest-haste-map: 29.4.2 - jest-leak-detector: 29.4.2 - jest-message-util: 29.4.2 - jest-resolve: 29.4.2 - jest-runtime: 29.4.2 - jest-util: 29.4.2 - jest-watcher: 29.4.2 - jest-worker: 29.4.2 - p-limit: 3.1.0 - source-map-support: 0.5.13 - transitivePeerDependencies: - - supports-color + /is-unicode-supported@0.1.0: + resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} + engines: {node: '>=10'} dev: true - /jest-runtime@29.4.2: - resolution: {integrity: sha512-3fque9vtpLzGuxT9eZqhxi+9EylKK/ESfhClv4P7Y9sqJPs58LjVhTt8jaMp/pRO38agll1CkSu9z9ieTQeRrw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + /is-weakref@1.0.2: + resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} dependencies: - '@jest/environment': 29.4.2 - '@jest/fake-timers': 29.4.2 - '@jest/globals': 29.4.2 - '@jest/source-map': 29.4.2 - '@jest/test-result': 29.4.2 - '@jest/transform': 29.4.2 - '@jest/types': 29.4.2 - '@types/node': 18.13.0 - chalk: 4.1.2 - cjs-module-lexer: 1.2.2 - collect-v8-coverage: 1.0.1 - glob: 7.2.3 - graceful-fs: 4.2.10 - jest-haste-map: 29.4.2 - jest-message-util: 29.4.2 - jest-mock: 29.4.2 - jest-regex-util: 29.4.2 - jest-resolve: 29.4.2 - jest-snapshot: 29.4.2 - jest-util: 29.4.2 - semver: 7.3.8 - slash: 3.0.0 - strip-bom: 4.0.0 - transitivePeerDependencies: - - supports-color + call-bind: 1.0.2 dev: true - /jest-snapshot@29.4.2: - resolution: {integrity: sha512-PdfubrSNN5KwroyMH158R23tWcAXJyx4pvSvWls1dHoLCaUhGul9rsL3uVjtqzRpkxlkMavQjGuWG1newPgmkw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + /is-wsl@2.2.0: + resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} + engines: {node: '>=8'} dependencies: - '@babel/core': 7.20.12 - '@babel/generator': 7.20.14 - '@babel/plugin-syntax-jsx': 7.18.6(@babel/core@7.20.12) - '@babel/plugin-syntax-typescript': 7.20.0(@babel/core@7.20.12) - '@babel/traverse': 7.20.13(supports-color@5.5.0) - '@babel/types': 7.20.7 - '@jest/expect-utils': 29.4.2 - '@jest/transform': 29.4.2 - '@jest/types': 29.4.2 - '@types/babel__traverse': 7.18.3 - '@types/prettier': 2.7.2 - babel-preset-current-node-syntax: 1.0.1(@babel/core@7.20.12) - chalk: 4.1.2 - expect: 29.4.2 - graceful-fs: 4.2.10 - jest-diff: 29.4.2 - jest-get-type: 29.4.2 - jest-haste-map: 29.4.2 - jest-matcher-utils: 29.4.2 - jest-message-util: 29.4.2 - jest-util: 29.4.2 - natural-compare: 1.4.0 - pretty-format: 29.7.0 - semver: 7.3.8 - transitivePeerDependencies: - - supports-color + is-docker: 2.2.1 dev: true - /jest-util@29.4.2: - resolution: {integrity: sha512-wKnm6XpJgzMUSRFB7YF48CuwdzuDIHenVuoIb1PLuJ6F+uErZsuDkU+EiExkChf6473XcawBrSfDSnXl+/YG4g==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/types': 29.4.2 - '@types/node': 18.13.0 - chalk: 4.1.2 - ci-info: 3.8.0 - graceful-fs: 4.2.10 - picomatch: 2.3.1 + /isarray@1.0.0: + resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} dev: true - /jest-validate@29.4.2: - resolution: {integrity: sha512-tto7YKGPJyFbhcKhIDFq8B5od+eVWD/ySZ9Tvcp/NGCvYA4RQbuzhbwYWtIjMT5W5zA2W0eBJwu4HVw34d5G6Q==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/types': 29.4.2 - camelcase: 6.3.0 - chalk: 4.1.2 - jest-get-type: 29.4.2 - leven: 3.1.0 - pretty-format: 29.7.0 + /isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} dev: true - /jest-watcher@29.4.2: - resolution: {integrity: sha512-onddLujSoGiMJt+tKutehIidABa175i/Ays+QvKxCqBwp7fvxP3ZhKsrIdOodt71dKxqk4sc0LN41mWLGIK44w==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/test-result': 29.4.2 - '@jest/types': 29.4.2 - '@types/node': 18.13.0 - ansi-escapes: 4.3.2 - chalk: 4.1.2 - emittery: 0.13.1 - jest-util: 29.4.2 - string-length: 4.0.2 + /isobject@3.0.1: + resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==} + engines: {node: '>=0.10.0'} dev: true /jest-worker@27.5.1: @@ -6795,36 +5692,6 @@ packages: supports-color: 8.1.1 dev: true - /jest-worker@29.4.2: - resolution: {integrity: sha512-VIuZA2hZmFyRbchsUCHEehoSf2HEl0YVF8SDJqtPnKorAaBuh42V8QsLnde0XP5F6TyCynGPEGgBOn3Fc+wZGw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@types/node': 18.13.0 - jest-util: 29.4.2 - merge-stream: 2.0.0 - supports-color: 8.1.1 - dev: true - - /jest@29.4.2: - resolution: {integrity: sha512-+5hLd260vNIHu+7ZgMIooSpKl7Jp5pHKb51e73AJU3owd5dEo/RfVwHbA/na3C/eozrt3hJOLGf96c7EWwIAzg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - hasBin: true - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - dependencies: - '@jest/core': 29.4.2 - '@jest/types': 29.4.2 - import-local: 3.1.0 - jest-cli: 29.4.2 - transitivePeerDependencies: - - '@types/node' - - supports-color - - ts-node - dev: true - /joi@17.7.1: resolution: {integrity: sha512-teoLhIvWE298R6AeJywcjR4sX2hHjB3/xJX4qPjg+gTg+c0mzUDsziYlqPmLomq9gVsfaMcgPaGc7VxtD/9StA==} dependencies: @@ -6972,16 +5839,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /kleur@3.0.3: - resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} - engines: {node: '>=6'} - dev: true - - /leven@3.1.0: - resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} - engines: {node: '>=6'} - dev: true - /levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} @@ -7219,12 +6076,6 @@ packages: - supports-color dev: true - /makeerror@1.0.12: - resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} - dependencies: - tmpl: 1.0.5 - dev: true - /map-obj@1.0.1: resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} engines: {node: '>=0.10.0'} @@ -7585,10 +6436,6 @@ packages: he: 1.2.0 dev: true - /node-int64@0.4.0: - resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} - dev: true - /node-loader@2.0.0(webpack@5.75.0): resolution: {integrity: sha512-I5VN34NO4/5UYJaUBtkrODPWxbobrE4hgDqPrjB25yPkonFhCmZ146vTH+Zg417E9Iwoh1l/MbRs1apc5J295Q==} engines: {node: '>= 10.13.0'} @@ -8156,11 +7003,6 @@ packages: engines: {node: '>=10'} dev: true - /pirates@4.0.5: - resolution: {integrity: sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==} - engines: {node: '>= 6'} - dev: true - /pkg-dir@4.2.0: resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} engines: {node: '>=8'} @@ -8259,14 +7101,6 @@ packages: retry: 0.12.0 dev: true - /prompts@2.4.2: - resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} - engines: {node: '>= 6'} - dependencies: - kleur: 3.0.3 - sisteransi: 1.0.5 - dev: true - /proto-list@1.2.4: resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==} dev: true @@ -8579,11 +7413,6 @@ packages: engines: {node: '>=8'} dev: true - /resolve.exports@2.0.0: - resolution: {integrity: sha512-6K/gDlqgQscOlg9fSRpWstA8sYe8rbELsSTNpx+3kTrsVCzvSl0zIvRErM7fdl9ERWDsKnrLnwB+Ne89918XOg==} - engines: {node: '>=10'} - dev: true - /resolve@1.22.2: resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==} hasBin: true @@ -8877,10 +7706,6 @@ packages: semver: 7.0.0 dev: true - /sisteransi@1.0.5: - resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} - dev: true - /slash@2.0.0: resolution: {integrity: sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==} engines: {node: '>=6'} @@ -8937,13 +7762,6 @@ packages: resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} - /source-map-support@0.5.13: - resolution: {integrity: sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==} - dependencies: - buffer-from: 1.1.2 - source-map: 0.6.1 - dev: true - /source-map-support@0.5.21: resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} dependencies: @@ -9008,13 +7826,6 @@ packages: minipass: 3.3.6 dev: true - /stack-utils@2.0.6: - resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} - engines: {node: '>=10'} - dependencies: - escape-string-regexp: 2.0.0 - dev: true - /stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} dev: true @@ -9028,14 +7839,6 @@ packages: resolution: {integrity: sha512-f9aPhy8fYBuMN+sNfakZV18U39PbalgjXG3lLB9WkaYTxijru61wb57V9wxxNthXM5Sd88ETBWi29qLAsHO52Q==} dev: true - /string-length@4.0.2: - resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} - engines: {node: '>=10'} - dependencies: - char-regex: 1.0.2 - strip-ansi: 6.0.1 - dev: true - /string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -9306,15 +8109,6 @@ packages: source-map-support: 0.5.21 dev: true - /test-exclude@6.0.0: - resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} - engines: {node: '>=8'} - dependencies: - '@istanbuljs/schema': 0.1.3 - glob: 7.2.3 - minimatch: 3.1.2 - dev: true - /text-extensions@1.9.0: resolution: {integrity: sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==} engines: {node: '>=0.10'} @@ -9362,10 +8156,6 @@ packages: os-tmpdir: 1.0.2 dev: true - /tmpl@1.0.5: - resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} - dev: true - /to-fast-properties@2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} @@ -9761,15 +8551,6 @@ packages: hasBin: true dev: true - /v8-to-istanbul@9.0.1: - resolution: {integrity: sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==} - engines: {node: '>=10.12.0'} - dependencies: - '@jridgewell/trace-mapping': 0.3.17 - '@types/istanbul-lib-coverage': 2.0.4 - convert-source-map: 1.9.0 - dev: true - /validate-npm-package-license@3.0.4: resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} dependencies: @@ -10008,12 +8789,6 @@ packages: resolution: {integrity: sha512-hwj/qMDUEjCU5h0xr90KGCf0tg0/LgJbmOWgrWKYlcJZM7XvquvUJZ0G/HMGr7F7OQMOUuPHWP9JpriinkAlkg==} dev: true - /walker@1.0.8: - resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} - dependencies: - makeerror: 1.0.12 - dev: true - /watchpack@2.4.0: resolution: {integrity: sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==} engines: {node: '>=10.13.0'} @@ -10277,14 +9052,6 @@ packages: typedarray-to-buffer: 3.1.5 dev: true - /write-file-atomic@4.0.2: - resolution: {integrity: sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} - dependencies: - imurmurhash: 0.1.4 - signal-exit: 3.0.7 - dev: true - /write-file-atomic@5.0.0: resolution: {integrity: sha512-R7NYMnHSlV42K54lwY9lvW6MnSm1HSJqZL3xiSgi9E7//FYaI74r2G0rd+/X6VAMkHEdzxQaU5HUOXWUz5kA/w==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} From 1cceed12d1a25a6e3b89541796f63547850a13e8 Mon Sep 17 00:00:00 2001 From: uttk-dev <97154037+uttk-dev@users.noreply.github.com> Date: Thu, 21 Sep 2023 15:06:12 +0900 Subject: [PATCH 10/14] =?UTF-8?q?fix:=20zenn-markdown-html=20=E3=81=AE?= =?UTF-8?q?=E4=B8=80=E9=83=A8=E3=81=AE=E3=83=86=E3=82=B9=E3=83=88=E3=81=8C?= =?UTF-8?q?=E5=A4=B1=E6=95=97=E3=81=99=E3=82=8B=E5=95=8F=E9=A1=8C=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../__tests__/highlight.test.ts | 5 ++ packages/zenn-markdown-html/package.json | 1 - packages/zenn-markdown-html/vitest.config.ts | 14 ------ pnpm-lock.yaml | 47 ++++++++++--------- 4 files changed, 31 insertions(+), 36 deletions(-) diff --git a/packages/zenn-markdown-html/__tests__/highlight.test.ts b/packages/zenn-markdown-html/__tests__/highlight.test.ts index 53faee4b..6d738de7 100644 --- a/packages/zenn-markdown-html/__tests__/highlight.test.ts +++ b/packages/zenn-markdown-html/__tests__/highlight.test.ts @@ -1,6 +1,11 @@ +import loadLanguages from 'prismjs/components/index'; + import { describe, test, expect } from 'vitest'; import markdownToHtml from '../src/index'; +// markdownToHtml で diff を使っているので、あらかじめ読み込んでおく +loadLanguages('diff'); + describe('コードハイライトのテスト', () => { test('コードブロックを正しいに変換する', () => { const html = markdownToHtml( diff --git a/packages/zenn-markdown-html/package.json b/packages/zenn-markdown-html/package.json index 6cf35e0f..4ae92e18 100644 --- a/packages/zenn-markdown-html/package.json +++ b/packages/zenn-markdown-html/package.json @@ -43,7 +43,6 @@ "node-html-parser": "^6.1.4", "rimraf": "^3.0.2", "typescript": "^4.9.5", - "vite-plugin-babel": "^1.1.3", "vitest": "^0.34.4" }, "dependencies": { diff --git a/packages/zenn-markdown-html/vitest.config.ts b/packages/zenn-markdown-html/vitest.config.ts index a0f4c48f..58942c4c 100644 --- a/packages/zenn-markdown-html/vitest.config.ts +++ b/packages/zenn-markdown-html/vitest.config.ts @@ -1,23 +1,9 @@ /// import { defineConfig } from 'vitest/config'; -import babel from 'vite-plugin-babel'; export default defineConfig({ - plugins: [ - babel({ - filter: /\.(j|t)sx?$/, - babelConfig: { - babelrc: false, - root: './', - presets: ['@babel/preset-env', '@babel/preset-typescript'], - plugins: [['prismjs', { languages: 'all' }]], - }, - }), - ], - test: { - environment: 'jsdom', include: ['./__tests__/**/*.test.ts'], }, }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e68ba33c..858864ad 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -330,12 +330,9 @@ importers: typescript: specifier: ^4.9.5 version: 4.9.5 - vite-plugin-babel: - specifier: ^1.1.3 - version: 1.1.3(@babel/core@7.20.12)(vite@4.2.1) vitest: specifier: ^0.34.4 - version: 0.34.4(jsdom@22.1.0) + version: 0.34.4 packages/zenn-model: dependencies: @@ -422,10 +419,10 @@ packages: '@babel/helpers': 7.20.13 '@babel/parser': 7.20.15 '@babel/template': 7.20.7 - '@babel/traverse': 7.20.13(supports-color@5.5.0) + '@babel/traverse': 7.20.13 '@babel/types': 7.20.7 convert-source-map: 1.9.0 - debug: 4.3.4(supports-color@5.5.0) + debug: 4.3.4 gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.0 @@ -509,7 +506,7 @@ packages: '@babel/core': 7.20.12 '@babel/helper-compilation-targets': 7.20.7(@babel/core@7.20.12) '@babel/helper-plugin-utils': 7.20.2 - debug: 4.3.4(supports-color@5.5.0) + debug: 4.3.4 lodash.debounce: 4.0.8 resolve: 1.22.2 semver: 6.3.0 @@ -568,7 +565,7 @@ packages: '@babel/helper-split-export-declaration': 7.18.6 '@babel/helper-validator-identifier': 7.19.1 '@babel/template': 7.20.7 - '@babel/traverse': 7.20.13(supports-color@5.5.0) + '@babel/traverse': 7.20.13 '@babel/types': 7.20.7 transitivePeerDependencies: - supports-color @@ -609,7 +606,7 @@ packages: '@babel/helper-member-expression-to-functions': 7.20.7 '@babel/helper-optimise-call-expression': 7.18.6 '@babel/template': 7.20.7 - '@babel/traverse': 7.20.13(supports-color@5.5.0) + '@babel/traverse': 7.20.13 '@babel/types': 7.20.7 transitivePeerDependencies: - supports-color @@ -657,7 +654,7 @@ packages: dependencies: '@babel/helper-function-name': 7.19.0 '@babel/template': 7.20.7 - '@babel/traverse': 7.20.13(supports-color@5.5.0) + '@babel/traverse': 7.20.13 '@babel/types': 7.20.7 transitivePeerDependencies: - supports-color @@ -668,7 +665,7 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.20.7 - '@babel/traverse': 7.20.13(supports-color@5.5.0) + '@babel/traverse': 7.20.13 '@babel/types': 7.20.7 transitivePeerDependencies: - supports-color @@ -1574,6 +1571,24 @@ packages: '@babel/types': 7.20.7 dev: true + /@babel/traverse@7.20.13: + resolution: {integrity: sha512-kMJXfF0T6DIS9E8cgdLCSAL+cuCK+YEZHWiLK0SXpTo8YRj5lpJu3CDNKiIBCne4m9hhTIqUg6SYTAI39tAiVQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.18.6 + '@babel/generator': 7.20.14 + '@babel/helper-environment-visitor': 7.18.9 + '@babel/helper-function-name': 7.19.0 + '@babel/helper-hoist-variables': 7.18.6 + '@babel/helper-split-export-declaration': 7.18.6 + '@babel/parser': 7.20.15 + '@babel/types': 7.20.7 + debug: 4.3.4 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + dev: true + /@babel/traverse@7.20.13(supports-color@5.5.0): resolution: {integrity: sha512-kMJXfF0T6DIS9E8cgdLCSAL+cuCK+YEZHWiLK0SXpTo8YRj5lpJu3CDNKiIBCne4m9hhTIqUg6SYTAI39tAiVQ==} engines: {node: '>=6.9.0'} @@ -8591,16 +8606,6 @@ packages: - terser dev: true - /vite-plugin-babel@1.1.3(@babel/core@7.20.12)(vite@4.2.1): - resolution: {integrity: sha512-WE8ORQm8530kj0geiDL1r/+P2MaU0b+5wL5E8Jq07aounFwRIUeJXziGiMr2DFQs78vaefB5GRKh257M8Z6gFQ==} - peerDependencies: - '@babel/core': ^7.0.0 - vite: ^2.7.0 || ^3.0.0 || ^4.0.0 - dependencies: - '@babel/core': 7.20.12 - vite: 4.2.1(@types/node@18.13.0) - dev: true - /vite@4.2.1(@types/node@18.13.0): resolution: {integrity: sha512-7MKhqdy0ISo4wnvwtqZkjke6XN4taqQ2TBaTccLIpOKv7Vp2h4Y+NpmWCnGDeSvvn45KxvWgGyb0MkHvY1vgbg==} engines: {node: ^14.18.0 || >=16.0.0} From 59809c481ebdec085fcc45be75b122d412c8663b Mon Sep 17 00:00:00 2001 From: uttk-dev <97154037+uttk-dev@users.noreply.github.com> Date: Thu, 21 Sep 2023 15:08:47 +0900 Subject: [PATCH 11/14] =?UTF-8?q?chore:=20zenn-cli=20=E3=81=AE=20`test:ser?= =?UTF-8?q?ver`=20=E3=82=B3=E3=83=9E=E3=83=B3=E3=83=89=E3=81=AE=E5=BE=AE?= =?UTF-8?q?=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/zenn-cli/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/zenn-cli/package.json b/packages/zenn-cli/package.json index d3b244cb..0e332868 100644 --- a/packages/zenn-cli/package.json +++ b/packages/zenn-cli/package.json @@ -31,7 +31,7 @@ "strict:lint": "eslint 'src/**/*.{ts,tsx}' --max-warnings 0", "test": "run-s test:client test:server", "test:client": "vitest run --config vitest.client.config.ts", - "test:server": "vitest run --config=vitest.server.config.ts", + "test:server": "vitest run --config vitest.server.config.ts", "exec:zenn": "node ./dist/server/zenn.js" }, "devDependencies": { From ed3dc744c5cf2e785318bc13a9b1f3031aa98631 Mon Sep 17 00:00:00 2001 From: uttk-dev <97154037+uttk-dev@users.noreply.github.com> Date: Thu, 21 Sep 2023 15:13:49 +0900 Subject: [PATCH 12/14] =?UTF-8?q?fix:=20=E5=90=84=E3=83=91=E3=83=83?= =?UTF-8?q?=E3=82=B1=E3=83=BC=E3=82=B8=E3=81=AE=20vitest=20=E3=81=AE?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/zenn-cli/package.json | 1 - packages/zenn-cli/vitest.client.config.ts | 5 - packages/zenn-cli/vitest.server.config.ts | 5 - packages/zenn-model/vitest.config.ts | 4 - pnpm-lock.yaml | 291 ++-------------------- 5 files changed, 15 insertions(+), 291 deletions(-) diff --git a/packages/zenn-cli/package.json b/packages/zenn-cli/package.json index 0e332868..06378227 100644 --- a/packages/zenn-cli/package.json +++ b/packages/zenn-cli/package.json @@ -72,7 +72,6 @@ "history": "^5.3.0", "image-size": "^1.0.2", "js-yaml": "^4.1.0", - "jsdom": "^22.1.0", "node-fetch": "^2.6.9", "node-loader": "^2.0.0", "nodemon": "^2.0.20", diff --git a/packages/zenn-cli/vitest.client.config.ts b/packages/zenn-cli/vitest.client.config.ts index 7d81d7c1..0e72514d 100644 --- a/packages/zenn-cli/vitest.client.config.ts +++ b/packages/zenn-cli/vitest.client.config.ts @@ -3,12 +3,7 @@ import { defineConfig } from 'vitest/config'; export default defineConfig({ - build: { - target: 'esnext', - }, - test: { - environment: 'jsdom', include: [ './src/client/__tests__/**/*.test.ts', './src/common/__tests__/**/*.test.ts', diff --git a/packages/zenn-cli/vitest.server.config.ts b/packages/zenn-cli/vitest.server.config.ts index 94ec1ff0..06a8c888 100644 --- a/packages/zenn-cli/vitest.server.config.ts +++ b/packages/zenn-cli/vitest.server.config.ts @@ -3,12 +3,7 @@ import { defineConfig } from 'vitest/config'; export default defineConfig({ - build: { - target: 'esnext', - }, - test: { - environment: 'jsdom', include: ['./src/server/__tests__/**/*.test.ts'], }, }); diff --git a/packages/zenn-model/vitest.config.ts b/packages/zenn-model/vitest.config.ts index 7b6a2e03..58942c4c 100644 --- a/packages/zenn-model/vitest.config.ts +++ b/packages/zenn-model/vitest.config.ts @@ -3,10 +3,6 @@ import { defineConfig } from 'vitest/config'; export default defineConfig({ - build: { - target: 'esnext', - }, - test: { include: ['./__tests__/**/*.test.ts'], }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 858864ad..4224ee55 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -131,9 +131,6 @@ importers: js-yaml: specifier: ^4.1.0 version: 4.1.0 - jsdom: - specifier: ^22.1.0 - version: 22.1.0 node-fetch: specifier: ^2.6.9 version: 2.6.9 @@ -190,7 +187,7 @@ importers: version: 4.2.1(@types/node@18.13.0) vitest: specifier: ^0.34.4 - version: 0.34.4(jsdom@22.1.0) + version: 0.34.4 wait-on: specifier: ^7.0.1 version: 7.0.1 @@ -419,10 +416,10 @@ packages: '@babel/helpers': 7.20.13 '@babel/parser': 7.20.15 '@babel/template': 7.20.7 - '@babel/traverse': 7.20.13 + '@babel/traverse': 7.20.13(supports-color@5.5.0) '@babel/types': 7.20.7 convert-source-map: 1.9.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@5.5.0) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.0 @@ -565,7 +562,7 @@ packages: '@babel/helper-split-export-declaration': 7.18.6 '@babel/helper-validator-identifier': 7.19.1 '@babel/template': 7.20.7 - '@babel/traverse': 7.20.13 + '@babel/traverse': 7.20.13(supports-color@5.5.0) '@babel/types': 7.20.7 transitivePeerDependencies: - supports-color @@ -665,7 +662,7 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.20.7 - '@babel/traverse': 7.20.13 + '@babel/traverse': 7.20.13(supports-color@5.5.0) '@babel/types': 7.20.7 transitivePeerDependencies: - supports-color @@ -1583,7 +1580,7 @@ packages: '@babel/helper-split-export-declaration': 7.18.6 '@babel/parser': 7.20.15 '@babel/types': 7.20.7 - debug: 4.3.4 + debug: 4.3.4(supports-color@5.5.0) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -1842,7 +1839,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 - debug: 4.3.4 + debug: 4.3.4(supports-color@5.5.0) espree: 9.4.1 globals: 13.20.0 ignore: 5.2.4 @@ -1873,7 +1870,7 @@ packages: engines: {node: '>=10.10.0'} dependencies: '@humanwhocodes/object-schema': 1.2.1 - debug: 4.3.4 + debug: 4.3.4(supports-color@5.5.0) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -2685,7 +2682,7 @@ packages: '@typescript-eslint/scope-manager': 5.52.0 '@typescript-eslint/type-utils': 5.52.0(eslint@8.34.0)(typescript@4.9.5) '@typescript-eslint/utils': 5.52.0(eslint@8.34.0)(typescript@4.9.5) - debug: 4.3.4 + debug: 4.3.4(supports-color@5.5.0) eslint: 8.34.0 grapheme-splitter: 1.0.4 ignore: 5.2.4 @@ -2711,7 +2708,7 @@ packages: '@typescript-eslint/scope-manager': 5.52.0 '@typescript-eslint/types': 5.52.0 '@typescript-eslint/typescript-estree': 5.52.0(typescript@4.9.5) - debug: 4.3.4 + debug: 4.3.4(supports-color@5.5.0) eslint: 8.34.0 typescript: 4.9.5 transitivePeerDependencies: @@ -2738,7 +2735,7 @@ packages: dependencies: '@typescript-eslint/typescript-estree': 5.52.0(typescript@4.9.5) '@typescript-eslint/utils': 5.52.0(eslint@8.34.0)(typescript@4.9.5) - debug: 4.3.4 + debug: 4.3.4(supports-color@5.5.0) eslint: 8.34.0 tsutils: 3.21.0(typescript@4.9.5) typescript: 4.9.5 @@ -2762,7 +2759,7 @@ packages: dependencies: '@typescript-eslint/types': 5.52.0 '@typescript-eslint/visitor-keys': 5.52.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@5.5.0) globby: 11.1.0 is-glob: 4.0.3 semver: 7.3.8 @@ -3013,10 +3010,6 @@ packages: through: 2.3.8 dev: true - /abab@2.0.6: - resolution: {integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==} - dev: true - /abbrev@1.1.1: resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} dev: true @@ -4022,13 +4015,6 @@ packages: hasBin: true dev: true - /cssstyle@3.0.0: - resolution: {integrity: sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg==} - engines: {node: '>=14'} - dependencies: - rrweb-cssom: 0.6.0 - dev: true - /csstype@3.1.1: resolution: {integrity: sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==} dev: true @@ -4038,15 +4024,6 @@ packages: engines: {node: '>=8'} dev: true - /data-urls@4.0.0: - resolution: {integrity: sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g==} - engines: {node: '>=14'} - dependencies: - abab: 2.0.6 - whatwg-mimetype: 3.0.0 - whatwg-url: 12.0.1 - dev: true - /dateformat@3.0.3: resolution: {integrity: sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==} dev: true @@ -4112,10 +4089,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /decimal.js@10.4.3: - resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} - dev: true - /dedent@0.7.0: resolution: {integrity: sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==} dev: true @@ -4229,13 +4202,6 @@ packages: /domelementtype@2.3.0: resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} - /domexception@4.0.0: - resolution: {integrity: sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==} - engines: {node: '>=12'} - dependencies: - webidl-conversions: 7.0.0 - dev: true - /domhandler@5.0.3: resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==} engines: {node: '>= 4'} @@ -4539,7 +4505,7 @@ packages: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.4 + debug: 4.3.4(supports-color@5.5.0) doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.1.1 @@ -5255,13 +5221,6 @@ packages: lru-cache: 7.14.1 dev: true - /html-encoding-sniffer@3.0.0: - resolution: {integrity: sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==} - engines: {node: '>=12'} - dependencies: - whatwg-encoding: 2.0.0 - dev: true - /htmlparser2@8.0.1: resolution: {integrity: sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA==} dependencies: @@ -5330,6 +5289,7 @@ packages: dependencies: safer-buffer: 2.1.2 dev: true + optional: true /ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} @@ -5602,10 +5562,6 @@ packages: resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==} engines: {node: '>=0.10.0'} - /is-potential-custom-element-name@1.0.1: - resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} - dev: true - /is-regex@1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} @@ -5740,44 +5696,6 @@ packages: argparse: 2.0.1 dev: true - /jsdom@22.1.0: - resolution: {integrity: sha512-/9AVW7xNbsBv6GfWho4TTNjEo9fe6Zhf9O7s0Fhhr3u+awPwAJMKwAMXnkk5vBxflqLW9hTHX/0cs+P3gW+cQw==} - engines: {node: '>=16'} - peerDependencies: - canvas: ^2.5.0 - peerDependenciesMeta: - canvas: - optional: true - dependencies: - abab: 2.0.6 - cssstyle: 3.0.0 - data-urls: 4.0.0 - decimal.js: 10.4.3 - domexception: 4.0.0 - form-data: 4.0.0 - html-encoding-sniffer: 3.0.0 - http-proxy-agent: 5.0.0 - https-proxy-agent: 5.0.1 - is-potential-custom-element-name: 1.0.1 - nwsapi: 2.2.7 - parse5: 7.1.2 - rrweb-cssom: 0.6.0 - saxes: 6.0.0 - symbol-tree: 3.2.4 - tough-cookie: 4.1.3 - w3c-xmlserializer: 4.0.0 - webidl-conversions: 7.0.0 - whatwg-encoding: 2.0.0 - whatwg-mimetype: 3.0.0 - whatwg-url: 12.0.1 - ws: 8.14.2 - xml-name-validator: 4.0.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - dev: true - /jsesc@0.5.0: resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} hasBin: true @@ -6650,10 +6568,6 @@ packages: dependencies: boolbase: 1.0.0 - /nwsapi@2.2.7: - resolution: {integrity: sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==} - dev: true - /object-inspect@1.12.3: resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} dev: true @@ -7132,10 +7046,6 @@ packages: ipaddr.js: 1.9.1 dev: true - /psl@1.9.0: - resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} - dev: true - /pstree.remy@1.1.8: resolution: {integrity: sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==} dev: true @@ -7157,10 +7067,6 @@ packages: side-channel: 1.0.4 dev: true - /querystringify@2.2.0: - resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} - dev: true - /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true @@ -7407,10 +7313,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /requires-port@1.0.0: - resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} - dev: true - /resolve-cwd@3.0.0: resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} engines: {node: '>=8'} @@ -7485,10 +7387,6 @@ packages: fsevents: 2.3.2 dev: true - /rrweb-cssom@0.6.0: - resolution: {integrity: sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==} - dev: true - /run-async@2.4.1: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} engines: {node: '>=0.12.0'} @@ -7547,13 +7445,6 @@ packages: source-map-js: 1.0.2 dev: true - /saxes@6.0.0: - resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} - engines: {node: '>=v12.22.7'} - dependencies: - xmlchars: 2.2.0 - dev: true - /scheduler@0.23.0: resolution: {integrity: sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==} dependencies: @@ -8057,10 +7948,6 @@ packages: react: 18.2.0 dev: true - /symbol-tree@3.2.4: - resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} - dev: true - /tapable@2.2.1: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} @@ -8196,27 +8083,10 @@ packages: nopt: 1.0.10 dev: true - /tough-cookie@4.1.3: - resolution: {integrity: sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==} - engines: {node: '>=6'} - dependencies: - psl: 1.9.0 - punycode: 2.3.0 - universalify: 0.2.0 - url-parse: 1.5.10 - dev: true - /tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} dev: true - /tr46@4.1.1: - resolution: {integrity: sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==} - engines: {node: '>=14'} - dependencies: - punycode: 2.3.0 - dev: true - /treeverse@3.0.0: resolution: {integrity: sha512-gcANaAnd2QDZFmHFEOF4k7uc1J/6a6z3DJMd/QwEyxLoKGiptJRwid582r7QIsFlFMIZ3SnxfS52S4hm2DHkuQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -8507,11 +8377,6 @@ packages: resolution: {integrity: sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==} dev: true - /universalify@0.2.0: - resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} - engines: {node: '>= 4.0.0'} - dev: true - /universalify@2.0.0: resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} engines: {node: '>= 10.0.0'} @@ -8539,13 +8404,6 @@ packages: punycode: 2.3.0 dev: true - /url-parse@1.5.10: - resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} - dependencies: - querystringify: 2.2.0 - requires-port: 1.0.0 - dev: true - /util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} dev: true @@ -8591,7 +8449,7 @@ packages: hasBin: true dependencies: cac: 6.7.14 - debug: 4.3.4 + debug: 4.3.4(supports-color@5.5.0) mlly: 1.4.2 pathe: 1.1.1 picocolors: 1.0.0 @@ -8641,70 +8499,6 @@ packages: dev: true /vitest@0.34.4: - resolution: {integrity: sha512-SE/laOsB6995QlbSE6BtkpXDeVNLJc1u2LHRG/OpnN4RsRzM3GQm4nm3PQCK5OBtrsUqnhzLdnT7se3aeNGdlw==} - engines: {node: '>=v14.18.0'} - hasBin: true - peerDependencies: - '@edge-runtime/vm': '*' - '@vitest/browser': '*' - '@vitest/ui': '*' - happy-dom: '*' - jsdom: '*' - playwright: '*' - safaridriver: '*' - webdriverio: '*' - peerDependenciesMeta: - '@edge-runtime/vm': - optional: true - '@vitest/browser': - optional: true - '@vitest/ui': - optional: true - happy-dom: - optional: true - jsdom: - optional: true - playwright: - optional: true - safaridriver: - optional: true - webdriverio: - optional: true - dependencies: - '@types/chai': 4.3.6 - '@types/chai-subset': 1.3.3 - '@types/node': 18.13.0 - '@vitest/expect': 0.34.4 - '@vitest/runner': 0.34.4 - '@vitest/snapshot': 0.34.4 - '@vitest/spy': 0.34.4 - '@vitest/utils': 0.34.4 - acorn: 8.10.0 - acorn-walk: 8.2.0 - cac: 6.7.14 - chai: 4.3.8 - debug: 4.3.4 - local-pkg: 0.4.3 - magic-string: 0.30.3 - pathe: 1.1.1 - picocolors: 1.0.0 - std-env: 3.4.3 - strip-literal: 1.3.0 - tinybench: 2.5.1 - tinypool: 0.7.0 - vite: 4.2.1(@types/node@18.13.0) - vite-node: 0.34.4(@types/node@18.13.0) - why-is-node-running: 2.2.2 - transitivePeerDependencies: - - less - - sass - - stylus - - sugarss - - supports-color - - terser - dev: true - - /vitest@0.34.4(jsdom@22.1.0): resolution: {integrity: sha512-SE/laOsB6995QlbSE6BtkpXDeVNLJc1u2LHRG/OpnN4RsRzM3GQm4nm3PQCK5OBtrsUqnhzLdnT7se3aeNGdlw==} engines: {node: '>=v14.18.0'} hasBin: true @@ -8748,7 +8542,6 @@ packages: cac: 6.7.14 chai: 4.3.8 debug: 4.3.4(supports-color@5.5.0) - jsdom: 22.1.0 local-pkg: 0.4.3 magic-string: 0.30.3 pathe: 1.1.1 @@ -8769,13 +8562,6 @@ packages: - terser dev: true - /w3c-xmlserializer@4.0.0: - resolution: {integrity: sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==} - engines: {node: '>=14'} - dependencies: - xml-name-validator: 4.0.0 - dev: true - /wait-on@7.0.1: resolution: {integrity: sha512-9AnJE9qTjRQOlTZIldAaf/da2eW0eSRSgcqq85mXQja/DW3MriHxkpODDSUEg+Gri/rKEcXUZHe+cevvYItaog==} engines: {node: '>=12.0.0'} @@ -8812,11 +8598,6 @@ packages: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} dev: true - /webidl-conversions@7.0.0: - resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} - engines: {node: '>=12'} - dev: true - /webpack-cli@5.0.1(webpack@5.75.0): resolution: {integrity: sha512-S3KVAyfwUqr0Mo/ur3NzIp6jnerNpo7GUO6so51mxLi1spqsA17YcMXy0WOIJtBSnj748lthxC6XLbNKh/ZC+A==} engines: {node: '>=14.15.0'} @@ -8911,26 +8692,6 @@ packages: - uglify-js dev: true - /whatwg-encoding@2.0.0: - resolution: {integrity: sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==} - engines: {node: '>=12'} - dependencies: - iconv-lite: 0.6.3 - dev: true - - /whatwg-mimetype@3.0.0: - resolution: {integrity: sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==} - engines: {node: '>=12'} - dev: true - - /whatwg-url@12.0.1: - resolution: {integrity: sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==} - engines: {node: '>=14'} - dependencies: - tr46: 4.1.1 - webidl-conversions: 7.0.0 - dev: true - /whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} dependencies: @@ -9111,33 +8872,11 @@ packages: optional: true dev: true - /ws@8.14.2: - resolution: {integrity: sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==} - engines: {node: '>=10.0.0'} - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: '>=5.0.2' - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - dev: true - /xdg-basedir@5.1.0: resolution: {integrity: sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==} engines: {node: '>=12'} dev: true - /xml-name-validator@4.0.0: - resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} - engines: {node: '>=12'} - dev: true - - /xmlchars@2.2.0: - resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} - dev: true - /xtend@4.0.2: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} engines: {node: '>=0.4'} From 3d176ef211184021ee7c546d365d4e63ae2c99b5 Mon Sep 17 00:00:00 2001 From: uttk-dev <97154037+uttk-dev@users.noreply.github.com> Date: Thu, 21 Sep 2023 15:23:47 +0900 Subject: [PATCH 13/14] =?UTF-8?q?fix:=20lint=20=E3=82=A8=E3=83=A9=E3=83=BC?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/zenn-cli/src/server/__tests__/lib/log.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/zenn-cli/src/server/__tests__/lib/log.test.ts b/packages/zenn-cli/src/server/__tests__/lib/log.test.ts index 12467727..4dbc1d2f 100644 --- a/packages/zenn-cli/src/server/__tests__/lib/log.test.ts +++ b/packages/zenn-cli/src/server/__tests__/lib/log.test.ts @@ -1,4 +1,4 @@ -import { vi, describe, test, expect, beforeEach, SpyInstance } from 'vitest'; +import { vi, describe, test, expect, beforeEach } from 'vitest'; import * as Log from '../../lib/log'; import colors from 'colors/safe'; From e92a90dae1937f68383c4aa6ede7c92d99a93316 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 2 Oct 2023 05:55:20 +0000 Subject: [PATCH 14/14] v0.1.147-alpha.1 --- lerna.json | 2 +- packages/zenn-cli/package.json | 2 +- packages/zenn-content-css/package.json | 2 +- packages/zenn-embed-elements/package.json | 2 +- packages/zenn-markdown-html/package.json | 2 +- packages/zenn-model/package.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lerna.json b/lerna.json index cfa3985c..368dadc3 100644 --- a/lerna.json +++ b/lerna.json @@ -2,6 +2,6 @@ "packages": [ "packages/*" ], - "version": "0.1.147-alpha.0", + "version": "0.1.147-alpha.1", "npmClient": "pnpm" } diff --git a/packages/zenn-cli/package.json b/packages/zenn-cli/package.json index 06378227..1571155c 100644 --- a/packages/zenn-cli/package.json +++ b/packages/zenn-cli/package.json @@ -1,6 +1,6 @@ { "name": "zenn-cli", - "version": "0.1.147-alpha.0", + "version": "0.1.147-alpha.1", "description": "Preview Zenn content locally.", "repository": { "type": "git", diff --git a/packages/zenn-content-css/package.json b/packages/zenn-content-css/package.json index cb95e99e..8eabe35d 100644 --- a/packages/zenn-content-css/package.json +++ b/packages/zenn-content-css/package.json @@ -1,6 +1,6 @@ { "name": "zenn-content-css", - "version": "0.1.147-alpha.0", + "version": "0.1.147-alpha.1", "license": "MIT", "description": "Zenn flavor content style.", "repository": { diff --git a/packages/zenn-embed-elements/package.json b/packages/zenn-embed-elements/package.json index 70989f7d..8365c539 100644 --- a/packages/zenn-embed-elements/package.json +++ b/packages/zenn-embed-elements/package.json @@ -1,6 +1,6 @@ { "name": "zenn-embed-elements", - "version": "0.1.147-alpha.0", + "version": "0.1.147-alpha.1", "license": "MIT", "description": "Web components for embedded contents.", "repository": { diff --git a/packages/zenn-markdown-html/package.json b/packages/zenn-markdown-html/package.json index 4ae92e18..2b0c62c3 100644 --- a/packages/zenn-markdown-html/package.json +++ b/packages/zenn-markdown-html/package.json @@ -1,6 +1,6 @@ { "name": "zenn-markdown-html", - "version": "0.1.147-alpha.0", + "version": "0.1.147-alpha.1", "license": "MIT", "description": "Convert markdown to zenn flavor html.", "main": "lib/index.js", diff --git a/packages/zenn-model/package.json b/packages/zenn-model/package.json index 53da5a84..df00acf3 100644 --- a/packages/zenn-model/package.json +++ b/packages/zenn-model/package.json @@ -1,6 +1,6 @@ { "name": "zenn-model", - "version": "0.1.147-alpha.0", + "version": "0.1.147-alpha.1", "license": "MIT", "description": "Model utils for Zenn contents", "main": "lib/index.js",