From f514bf8e2d751b48b3a5acb1077eb1292d9711b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Fri, 11 Apr 2025 22:45:59 +0800 Subject: [PATCH 1/7] refactor: remove unnecessary `toArray` --- src/utils/filter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/filter.ts b/src/utils/filter.ts index c84c750b..28ba9cf0 100644 --- a/src/utils/filter.ts +++ b/src/utils/filter.ts @@ -86,7 +86,7 @@ function normalizeFilter(filter: StringFilter): NormalizedStringFilter { } if (Array.isArray(filter)) { return { - include: toArray(filter), + include: filter, } } return { From 2f86391547ed3221ac8eff44c21156de66a1a401 Mon Sep 17 00:00:00 2001 From: Kanon <44870505+ysknsid25@users.noreply.github.com> Date: Sat, 12 Apr 2025 02:52:03 +0900 Subject: [PATCH 2/7] test: add test for rspack (#496) * test: add test for rspack Signed-off-by: ysknsid25 * test: add test for rspack Signed-off-by: ysknsid25 * test: add test for rspack Signed-off-by: ysknsid25 --------- Signed-off-by: ysknsid25 --- src/rspack/context.ts | 3 +- test/unit-tests/rspack/context.test.ts | 82 ++++++++++++++ test/unit-tests/rspack/loaders/load.test.ts | 107 ++++++++++++++++++ .../rspack/loaders/transform.test.ts | 75 ++++++++++++ 4 files changed, 266 insertions(+), 1 deletion(-) create mode 100644 test/unit-tests/rspack/context.test.ts create mode 100644 test/unit-tests/rspack/loaders/load.test.ts create mode 100644 test/unit-tests/rspack/loaders/transform.test.ts diff --git a/src/rspack/context.ts b/src/rspack/context.ts index b4ae6b1f..4edcdf61 100644 --- a/src/rspack/context.ts +++ b/src/rspack/context.ts @@ -15,7 +15,8 @@ export function createBuildContext(compiler: Compiler, compilation: Compilation, } }, addWatchFile(file) { - compilation.fileDependencies.add(resolve(process.cwd(), file)) + const cwd = process.cwd() + compilation.fileDependencies.add(resolve(cwd, file)) }, getWatchFiles() { return Array.from(compilation.fileDependencies) diff --git a/test/unit-tests/rspack/context.test.ts b/test/unit-tests/rspack/context.test.ts new file mode 100644 index 00000000..f62f5d1f --- /dev/null +++ b/test/unit-tests/rspack/context.test.ts @@ -0,0 +1,82 @@ +import { Buffer } from 'node:buffer' +import { describe, expect, it, vi } from 'vitest' +import { createBuildContext, createContext } from '../../../src/rspack/context' + +describe('createBuildContext', () => { + it('getNativeBuildContext - should return expected', () => { + const compiler = { name: 'testCompiler' } + const compilation = { name: 'testCompilation' } + const loaderContext = { name: 'testLoaderContext' } + + const buildContext = createBuildContext(compiler as any, compilation as any, loaderContext as any) + + expect(buildContext.getNativeBuildContext!()).toEqual({ + framework: 'rspack', + compiler, + compilation, + loaderContext, + }) + }) + + it('emitFile - should return expected', () => { + const emitAssetMock = vi.fn() + const RawSourceMock = vi.fn(content => ({ content })) + const compiler = { name: 'testCompiler' } + const compilation = { + name: 'testCompilation', + compiler: { + webpack: { + sources: { + RawSource: RawSourceMock, + }, + }, + }, + emitAsset: emitAssetMock, + } + const loaderContext = { name: 'testLoaderContext' } + + const buildContext = createBuildContext(compiler as any, compilation as any, loaderContext as any) + + buildContext.emitFile({ + fileName: 'testFile.js', + source: 'testSource', + } as any) + expect(emitAssetMock).toHaveBeenCalledWith( + 'testFile.js', + { + content: 'testSource', + }, + ) + emitAssetMock.mockClear() + + buildContext.emitFile({ + name: 'testFile.js', + source: Buffer.from('testBufferSource'), + } as any) + expect(emitAssetMock).toHaveBeenCalledWith( + 'testFile.js', + { + content: Buffer.from('testBufferSource'), + }, + ) + emitAssetMock.mockClear() + }) + + it('createContext - should return expected', () => { + const loaderContext = { + emitError: vi.fn(), + emitWarning: vi.fn(), + } + + const context = createContext(loaderContext as any) + + context.error('testError') + expect(loaderContext.emitError).toHaveBeenCalledWith(new Error('testError')) + + context.error({ message: 'testError' }) + expect(loaderContext.emitError).toHaveBeenCalledWith(new Error('testError')) + + context.warn('testWarning') + expect(loaderContext.emitWarning).toHaveBeenCalledWith(new Error('testWarning')) + }) +}) diff --git a/test/unit-tests/rspack/loaders/load.test.ts b/test/unit-tests/rspack/loaders/load.test.ts new file mode 100644 index 00000000..2be608f5 --- /dev/null +++ b/test/unit-tests/rspack/loaders/load.test.ts @@ -0,0 +1,107 @@ +import { describe, expect, it, vi } from 'vitest' +import load from '../../../../src/rspack/loaders/load' + +describe('load', () => { + it('should call callback with source and map when plugin.load is not defined', async () => { + const asyncMock = vi.fn() + const query = { plugin: {} } + await load.call({ async: () => asyncMock, query } as any, 'source', 'map') + + expect(asyncMock).toHaveBeenCalledWith(null, 'source', 'map') + }) + + it('should call callback with transformed code and map when handler returns an object', async () => { + const asyncMock = vi.fn() + const handlerMock = vi.fn().mockResolvedValue({ code: 'transformedCode', map: 'transformedMap' }) + const query = { + plugin: { + load: handlerMock, + }, + } + + await load.call( + { + async: () => asyncMock, + query, + resource: 'resourceId', + } as any, + 'source', + 'map', + ) + + expect(handlerMock).toHaveBeenCalled() + expect(asyncMock).toHaveBeenCalledWith(null, 'transformedCode', 'transformedMap') + }) + + it('should call callback with transformed code when handler returns a string', async () => { + const asyncMock = vi.fn() + const handlerMock = vi.fn().mockResolvedValue('transformedCode') + const query = { + plugin: { + load: handlerMock, + }, + } + + await load.call( + { + async: () => asyncMock, + query, + resource: 'resourceId', + } as any, + 'source', + 'map', + ) + + expect(handlerMock).toHaveBeenCalled() + expect(asyncMock).toHaveBeenCalledWith(null, 'transformedCode', 'map') + }) + + it('should call callback with source and map when handler returns null', async () => { + const asyncMock = vi.fn() + const handlerMock = vi.fn().mockResolvedValue(null) + const query = { + plugin: { + load: handlerMock, + }, + } + + await load.call( + { + async: () => asyncMock, + query, + resource: 'resourceId', + } as any, + 'source', + 'map', + ) + + expect(handlerMock).toHaveBeenCalled() + expect(asyncMock).toHaveBeenCalledWith(null, 'source', 'map') + }) + + it('should call callback with source and map when handler returns object', async () => { + const asyncMock = vi.fn() + const handlerMock = vi.fn().mockResolvedValue({ + code: 'code', + map: 'resmap', + }) + const query = { + plugin: { + load: handlerMock, + }, + } + + await load.call( + { + async: () => asyncMock, + query, + resource: 'resourceId', + } as any, + 'source', + 'map', + ) + + expect(handlerMock).toHaveBeenCalled() + expect(asyncMock).toHaveBeenCalledWith(null, 'code', 'resmap') + }) +}) diff --git a/test/unit-tests/rspack/loaders/transform.test.ts b/test/unit-tests/rspack/loaders/transform.test.ts new file mode 100644 index 00000000..48e1a2d1 --- /dev/null +++ b/test/unit-tests/rspack/loaders/transform.test.ts @@ -0,0 +1,75 @@ +import { describe, expect, it, vi } from 'vitest' +import transform from '../../../../src/rspack/loaders/transform' + +describe('transform', () => { + it('should call callback with source and map if plugin.transform is not defined', async () => { + const mockCallback = vi.fn() + const mockLoaderContext = { + async: () => mockCallback, + query: {}, + } as any + + const source = 'test source' + const map = 'test map' + + await transform.call(mockLoaderContext, source, map) + + expect(mockCallback).toHaveBeenCalledWith(null, source, map) + }) + + it('should call callback with an error if handler throws an error', async () => { + const mockCallback = vi.fn() + const mockLoaderContext = { + async: () => mockCallback, + query: { + plugin: { + transform: { + handler: vi.fn().mockRejectedValue(new Error('Handler error')), + filter: vi.fn().mockReturnValue(true), + }, + }, + }, + resource: 'test resource', + } as any + + const source = 'test source' + const map = 'test map' + + vi.mock('../../../../src/utils/filter', () => ({ + normalizeObjectHook: vi.fn(() => ({ handler: vi.fn().mockRejectedValue(new Error('Handler error')), filter: vi.fn().mockReturnValue(true) })), + })) + + await transform.call(mockLoaderContext, source, map) + + expect(mockCallback).toHaveBeenCalledWith(expect.any(Error)) + expect(mockCallback.mock.calls[0][0].message).toBe('Handler error') + }) + + it('should call callback with an error if handler throws string', async () => { + const mockCallback = vi.fn() + const mockLoaderContext = { + async: () => mockCallback, + query: { + plugin: { + transform: { + handler: vi.fn().mockRejectedValue('Handler error'), + filter: vi.fn().mockReturnValue(true), + }, + }, + }, + resource: 'test resource', + } as any + + const source = 'test source' + const map = 'test map' + + vi.mock('../../../../src/utils/filter', () => ({ + normalizeObjectHook: vi.fn(() => ({ handler: vi.fn().mockRejectedValue(new Error('Handler error')), filter: vi.fn().mockReturnValue(true) })), + })) + + await transform.call(mockLoaderContext, source, map) + + expect(mockCallback).toHaveBeenCalledWith(expect.any(Error)) + expect(mockCallback.mock.calls[0][0].message).toBe('Handler error') + }) +}) From 6c91c84c141991299c628e4634c2929dd23272b4 Mon Sep 17 00:00:00 2001 From: Kanon <44870505+ysknsid25@users.noreply.github.com> Date: Sat, 12 Apr 2025 02:53:22 +0900 Subject: [PATCH 3/7] test: add test for farm (#498) Signed-off-by: ysknsid25 --- test/unit-tests/farm/context.test.ts | 133 ++++++++++++++++++ test/unit-tests/farm/index.test.ts | 196 +++++++++++++++++++++++++++ test/unit-tests/farm/utils.test.ts | 132 ++++++++++++++++++ 3 files changed, 461 insertions(+) create mode 100644 test/unit-tests/farm/context.test.ts create mode 100644 test/unit-tests/farm/index.test.ts create mode 100644 test/unit-tests/farm/utils.test.ts diff --git a/test/unit-tests/farm/context.test.ts b/test/unit-tests/farm/context.test.ts new file mode 100644 index 00000000..e211610c --- /dev/null +++ b/test/unit-tests/farm/context.test.ts @@ -0,0 +1,133 @@ +import type { CompilationContext } from '@farmfe/core' +import { describe, expect, it, vi } from 'vitest' +import { createFarmContext, unpluginContext } from '../../../src/farm/context' + +describe('createFarmContext', () => { + it('should create a valid farm context with parse function', () => { + const mockContext = { + addWatchFile: vi.fn(), + emitFile: vi.fn(), + getWatchFiles: vi.fn().mockReturnValue(['file1', 'file2']), + } as unknown as CompilationContext + + const farmContext = createFarmContext(mockContext) + + expect(farmContext.parse).toBeDefined() + expect(farmContext.parse).toBeInstanceOf(Function) + }) + + it('should add a watch file', () => { + const mockContext = { + addWatchFile: vi.fn(), + } as unknown as CompilationContext + + const farmContext = createFarmContext(mockContext) + farmContext.addWatchFile('test-file') + + expect(mockContext.addWatchFile).toHaveBeenCalledWith('test-file', 'test-file') + }) + + it('should emit a file', () => { + const mockContext = { + emitFile: vi.fn(), + } as unknown as CompilationContext + + const farmContext = createFarmContext(mockContext) + farmContext.emitFile({ + fileName: 'test-file.js', + source: 'console.log("test")', + } as any) + + expect(mockContext.emitFile).toHaveBeenCalledWith({ + resolvedPath: 'test-file.js', + name: 'test-file.js', + content: expect.any(Array), + resourceType: '.js', + }) + }) + + it('should emit a file by name', () => { + const mockContext = { + emitFile: vi.fn(), + } as unknown as CompilationContext + + const farmContext = createFarmContext(mockContext) + farmContext.emitFile({ + name: 'test-file.js', + source: 'console.log("test")', + } as any) + + expect(mockContext.emitFile).toHaveBeenCalledWith({ + resolvedPath: 'test-file.js', + name: 'test-file.js', + content: expect.any(Array), + resourceType: '.js', + }) + }) + + it('should get watch files', () => { + const mockContext = { + getWatchFiles: vi.fn().mockReturnValue(['file1', 'file2']), + } as unknown as CompilationContext + + const farmContext = createFarmContext(mockContext) + const watchFiles = farmContext.getWatchFiles() + + expect(watchFiles).toEqual(['file1', 'file2']) + }) + + it('should return native build context', () => { + const mockContext = {} as CompilationContext + + const farmContext = createFarmContext(mockContext) + const nativeBuildContext = farmContext.getNativeBuildContext!() + + expect(nativeBuildContext).toEqual({ framework: 'farm', context: mockContext }) + }) +}) + +describe('unpluginContext', () => { + it('should call context.error with an Error object', () => { + const mockContext = { + error: vi.fn(), + } as unknown as CompilationContext + + const pluginContext = unpluginContext(mockContext) + pluginContext.error(new Error('Test error')) + + expect(mockContext.error).toHaveBeenCalledWith(new Error('Test error')) + }) + + it('should call context.error with an Error String', () => { + const mockContext = { + error: vi.fn(), + } as unknown as CompilationContext + + const pluginContext = unpluginContext(mockContext) + pluginContext.error('Test error') + + expect(mockContext.error).toHaveBeenCalledWith(new Error('Test error')) + }) + + it('should call context.warn with an Error object', () => { + const mockContext = { + warn: vi.fn(), + } as unknown as CompilationContext + + const pluginContext = unpluginContext(mockContext) + pluginContext.warn(new Error('Test warning')) + + expect(mockContext.warn).toHaveBeenCalledWith(new Error('Test warning')) + }) + + it('should call context.warn with an Error String', () => { + const mockContext = { + warn: vi.fn(), + } as unknown as CompilationContext + + const pluginContext = unpluginContext(mockContext) + pluginContext.warn('Test warning') + + expect(mockContext.warn).toHaveBeenCalledWith(new Error('Test warning')) + }) +}) diff --git a/test/unit-tests/farm/index.test.ts b/test/unit-tests/farm/index.test.ts new file mode 100644 index 00000000..9243e5b3 --- /dev/null +++ b/test/unit-tests/farm/index.test.ts @@ -0,0 +1,196 @@ +import type { UnpluginOptions } from '../../../src/types' +import { describe, expect, it, vi } from 'vitest' +import { getFarmPlugin, toFarmPlugin } from '../../../src/farm/index' + +describe('getFarmPlugin', () => { + it('should return a single plugin when factory returns one plugin', () => { + const mockFactory = vi.fn(() => ({ + name: 'test-plugin', + })) + + const plugin = getFarmPlugin(mockFactory as any) + + expect(plugin).toBeDefined() + }) + + it('should return an array of plugins when factory returns multiple plugins', () => { + const mockFactory = vi.fn().mockReturnValue([ + { name: 'test-plugin-1', farm: true }, + { name: 'test-plugin-2', farm: true }, + ]) + + const func = getFarmPlugin(mockFactory as any) + const plugins: any = func({}) + + expect(plugins).toBeDefined() + expect(plugins).toHaveLength(2) + expect(plugins[0]).toHaveProperty('name', 'test-plugin-1') + expect(plugins[1]).toHaveProperty('name', 'test-plugin-2') + }) +}) + +describe('toFarmPlugin', () => { + it('should convert a basic plugin to a Farm plugin', () => { + const plugin: UnpluginOptions = { + name: 'test-plugin', + } + + const farmPlugin = toFarmPlugin(plugin) + + expect(farmPlugin).toBeDefined() + expect(farmPlugin).toHaveProperty('name', 'test-plugin') + }) + + it('should handle buildStart hook', async () => { + const buildStartMock = vi.fn() + const plugin: UnpluginOptions = { + name: 'test-plugin', + buildStart: buildStartMock, + } + + const farmPlugin = toFarmPlugin(plugin) + + expect(farmPlugin.buildStart).toBeDefined() + await farmPlugin.buildStart?.executor({}, {} as any) + + expect(buildStartMock).toHaveBeenCalled() + }) + + it('should handle resolveId hook', async () => { + const resolveIdMock = vi.fn(() => 'resolved-id') + const plugin: UnpluginOptions = { + name: 'test-plugin', + resolveId: resolveIdMock, + } + + const farmPlugin = toFarmPlugin(plugin) + + expect(farmPlugin.resolve).toBeDefined() + const result = await farmPlugin.resolve?.executor( + { source: 'test-source', importer: 'test-importer' } as any, + {} as any, + ) + + expect(resolveIdMock).toHaveBeenCalled() + expect(result).toHaveProperty('resolvedPath', 'resolved-id') + }) + + it('should handle load hook', async () => { + const loadMock = vi.fn(() => ({ code: 'test-content' })) + const plugin: UnpluginOptions = { + name: 'test-plugin', + load: loadMock, + } + + const farmPlugin = toFarmPlugin(plugin) + + expect(farmPlugin.load).toBeDefined() + const result = await farmPlugin.load?.executor( + { resolvedPath: 'test-path', query: [['', '']] } as any, + {} as any, + ) + + expect(loadMock).toHaveBeenCalled() + expect(result).toHaveProperty('content', 'test-content') + }) + + it('should handle transform hook', async () => { + const transformMock = vi.fn(() => ({ code: 'transformed-content' })) + const plugin: UnpluginOptions = { + name: 'test-plugin', + transform: transformMock, + } + + const farmPlugin = toFarmPlugin(plugin) + + expect(farmPlugin.transform).toBeDefined() + const result = await farmPlugin.transform?.executor( + { resolvedPath: 'test-path', content: 'original-content', query: [['', '']] } as any, + {} as any, + ) + + expect(transformMock).toHaveBeenCalled() + expect(result).toHaveProperty('content', 'transformed-content') + }) + + it('should handle watchChange hook', async () => { + const watchChangeMock = vi.fn() + const plugin: UnpluginOptions = { + name: 'test-plugin', + watchChange: watchChangeMock, + } + + const farmPlugin = toFarmPlugin(plugin) + + expect(farmPlugin.updateModules).toBeDefined() + await farmPlugin.updateModules?.executor( + { paths: [['test-path', 'change']] }, + {} as any, + ) + + expect(watchChangeMock).toHaveBeenCalled() + }) + + it('should handle buildEnd hook', async () => { + const buildEndMock = vi.fn() + const plugin: UnpluginOptions = { + name: 'test-plugin', + buildEnd: buildEndMock, + } + + const farmPlugin = toFarmPlugin(plugin) + + expect(farmPlugin.buildEnd).toBeDefined() + await farmPlugin.buildEnd?.executor({}, {} as any) + + expect(buildEndMock).toHaveBeenCalled() + }) + + it('should handle farm-specific properties in plugins', () => { + const plugin = { + name: 'test-plugin', + farm: { + customProperty: 'custom-value', + }, + } + + const farmPlugin = toFarmPlugin(plugin as any) + + expect(farmPlugin).toHaveProperty('customProperty', 'custom-value') + }) + + it('should handle filters in resolveId hook', async () => { + const resolveIdMock = vi.fn(() => 'resolved-id') + const plugin: UnpluginOptions = { + name: 'test-plugin', + resolveId: resolveIdMock, + } + + const farmPlugin = toFarmPlugin(plugin, { filters: ['custom-filter'] }) + + expect(farmPlugin.resolve).toBeDefined() + expect(farmPlugin.resolve?.filters.sources).toContain('custom-filter') + }) + + it('should handle isEntry in resolveId hook', async () => { + const resolveIdMock = vi.fn(() => 'resolved-id') + const plugin: UnpluginOptions = { + name: 'test-plugin', + resolveId: resolveIdMock, + } + + const farmPlugin = toFarmPlugin(plugin) + + const result = await farmPlugin.resolve?.executor( + { source: 'test-source', importer: 'test-importer', kind: { entry: 'index' } } as any, + {} as any, + ) + + expect(resolveIdMock).toHaveBeenCalledWith( + 'test-source', + expect.anything(), + expect.objectContaining({ isEntry: true }), + ) + expect(result).toHaveProperty('resolvedPath', 'resolved-id') + }) +}) diff --git a/test/unit-tests/farm/utils.test.ts b/test/unit-tests/farm/utils.test.ts new file mode 100644 index 00000000..c21201fc --- /dev/null +++ b/test/unit-tests/farm/utils.test.ts @@ -0,0 +1,132 @@ +import { describe, expect, it } from 'vitest' +import { + appendQuery, + convertEnforceToPriority, + convertWatchEventChange, + customParseQueryString, + decodeStr, + encodeStr, + formatLoadModuleType, + formatTransformModuleType, + getContentValue, + getCssModuleType, + getJsModuleType, + guessIdLoader, + isObject, + isStartsWithSlash, + isString, + removeQuery, + stringifyQuery, + transformQuery, +} from '../../../src/farm/utils' + +describe('utils.ts', () => { + it('guessIdLoader should return correct loader based on file extension', () => { + expect(guessIdLoader('file.js')).toBe('js') + expect(guessIdLoader('file.ts')).toBe('ts') + expect(guessIdLoader('file.unknown')).toBe('js') + }) + + it('transformQuery should append query string to resolvedPath', () => { + const context = { + query: [['key', 'value']], + resolvedPath: '/path/to/file', + } + transformQuery(context) + expect(context.resolvedPath).toBe('/path/to/file?key=value') + }) + + it('convertEnforceToPriority should return correct priority', () => { + expect(convertEnforceToPriority('pre')).toBe(102) + expect(convertEnforceToPriority('post')).toBe(98) + expect(convertEnforceToPriority(undefined)).toBe(100) + }) + + it('convertWatchEventChange should map events correctly when Added', () => { + const actual = convertWatchEventChange('Added' as any) + expect(actual).toBe('create') + }) + + it('convertWatchEventChange should map events correctly when Updated', () => { + const actual = convertWatchEventChange('Updated' as any) + expect(actual).toBe('update') + }) + + it('convertWatchEventChange should map events correctly when Removed', () => { + const actual = convertWatchEventChange('Removed' as any) + expect(actual).toBe('delete') + }) + + it('isString should correctly identify strings', () => { + expect(isString('test')).toBe(true) + expect(isString(123)).toBe(false) + }) + + it('isObject should correctly identify objects', () => { + expect(isObject({})).toBe(true) + expect(isObject(null)).toBe(false) + expect(isObject('string')).toBe(false) + }) + + it('customParseQueryString should parse query strings correctly', () => { + expect(customParseQueryString('http://example.com?key=value')).toEqual([['key', 'value']]) + expect(customParseQueryString(null)).toEqual([]) + }) + + it('encodeStr should encode null characters', () => { + expect(encodeStr('hello\0world')).toBe('hello\\0world') + expect(encodeStr('hello')).toBe('hello') + }) + + it('decodeStr should decode null characters', () => { + expect(decodeStr('hello\\0world')).toBe('hello\0world') + expect(decodeStr('hello')).toBe('hello') + }) + + it('getContentValue should return encoded content', () => { + expect(getContentValue('test')).toBe('test') + expect(getContentValue({ code: 'test' })).toBe('test') + expect(() => getContentValue(null)).toThrow('Content cannot be null or undefined') + }) + + it('removeQuery should remove query string from path', () => { + expect(removeQuery('/path/to/file?query=1')).toBe('/path/to/file') + expect(removeQuery('/path/to/file')).toBe('/path/to/file') + }) + + it('isStartsWithSlash should check if string starts with a slash', () => { + expect(isStartsWithSlash('/path')).toBe(true) + expect(isStartsWithSlash('path')).toBe(false) + }) + + it('appendQuery should append query to id', () => { + expect(appendQuery('id', [['key', 'value']])).toBe('id?key=value') + expect(appendQuery('id', [])).toBe('id') + }) + + it('stringifyQuery should convert query array to string', () => { + expect(stringifyQuery([['key', 'value']])).toBe('key=value') + expect(stringifyQuery([])).toBe('') + }) + + it('getCssModuleType should return correct CSS module type', () => { + expect(getCssModuleType('file.less')).toBe('less') + expect(getCssModuleType('file.unknown')).toBe(null) + }) + + it('getJsModuleType should return correct JS module type', () => { + expect(getJsModuleType('file.js')).toBe('js') + expect(getJsModuleType('file.unknown')).toBe(null) + }) + + it('formatLoadModuleType should return correct module type', () => { + expect(formatLoadModuleType('file.css')).toBe('css') + expect(formatLoadModuleType('file.js')).toBe('js') + expect(formatLoadModuleType('file.unknown')).toBe('js') + }) + + it('formatTransformModuleType should return correct module type', () => { + expect(formatTransformModuleType('file.css')).toBe('css') + expect(formatTransformModuleType('file.js')).toBe('js') + }) +}) From 87d98bf29532ce9262e26e2061c20e66e13aef29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Sat, 12 Apr 2025 01:55:04 +0800 Subject: [PATCH 4/7] chore: upgrade deps --- docs/package.json | 4 +- package.json | 6 +- pnpm-lock.yaml | 444 ++++++++++++++++++++++++---------------------- 3 files changed, 233 insertions(+), 221 deletions(-) diff --git a/docs/package.json b/docs/package.json index 34cd2a6d..6ef7d925 100644 --- a/docs/package.json +++ b/docs/package.json @@ -14,10 +14,10 @@ }, "devDependencies": { "@iconify-json/ri": "^1.2.5", - "@shikijs/vitepress-twoslash": "^3.2.1", + "@shikijs/vitepress-twoslash": "^3.2.2", "case-police": "^2.0.0", "consola": "^3.4.2", - "dotenv": "^16.4.7", + "dotenv": "^16.5.0", "markdown-it": "^14.1.0", "markdown-it-github-alerts": "^1.0.0", "ofetch": "^1.4.1", diff --git a/package.json b/package.json index 571cefbb..3275a6ae 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ }, "devDependencies": { "@ampproject/remapping": "^2.3.0", - "@antfu/eslint-config": "^4.11.0", + "@antfu/eslint-config": "^4.12.0", "@antfu/ni": "^24.3.0", "@farmfe/cli": "^1.0.4", "@farmfe/core": "^1.7.2", @@ -66,7 +66,7 @@ "fast-glob": "^3.3.3", "fs-extra": "^11.3.0", "jiti": "^2.4.2", - "lint-staged": "^15.5.0", + "lint-staged": "^15.5.1", "magic-string": "^0.30.17", "rolldown": "^1.0.0-beta.7", "rollup": "^4.39.0", @@ -75,7 +75,7 @@ "typescript": "~5.8.3", "unloader": "^0.4.3", "unplugin": "workspace:*", - "vite": "^6.2.5", + "vite": "^6.2.6", "vitest": "^3.1.1", "webpack": "^5.99.5", "webpack-cli": "^6.0.1" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4145a03f..f5b67e52 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -25,8 +25,8 @@ importers: specifier: ^2.3.0 version: 2.3.0 '@antfu/eslint-config': - specifier: ^4.11.0 - version: 4.11.0(@vue/compiler-sfc@3.5.13)(eslint-plugin-format@1.0.1(eslint@9.24.0(jiti@2.4.2)))(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3)(vitest@3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1)) + specifier: ^4.12.0 + version: 4.12.0(@typescript-eslint/utils@8.29.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3))(@vue/compiler-sfc@3.5.13)(eslint-plugin-format@1.0.1(eslint@9.24.0(jiti@2.4.2)))(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3)(vitest@3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1)) '@antfu/ni': specifier: ^24.3.0 version: 24.3.0 @@ -38,10 +38,10 @@ importers: version: 1.7.2 '@rspack/cli': specifier: ^1.3.4 - version: 1.3.4(@rspack/core@1.3.4(@swc/helpers@0.5.15))(@types/express@4.17.21)(webpack-cli@6.0.1)(webpack@5.99.5) + version: 1.3.4(@rspack/core@1.3.4(@swc/helpers@0.5.17))(@types/express@4.17.21)(webpack-cli@6.0.1)(webpack@5.99.5) '@rspack/core': specifier: ^1.3.4 - version: 1.3.4(@swc/helpers@0.5.15) + version: 1.3.4(@swc/helpers@0.5.17) '@types/fs-extra': specifier: ^11.0.4 version: 11.0.4 @@ -79,8 +79,8 @@ importers: specifier: ^2.4.2 version: 2.4.2 lint-staged: - specifier: ^15.5.0 - version: 15.5.0 + specifier: ^15.5.1 + version: 15.5.1 magic-string: specifier: ^0.30.17 version: 0.30.17 @@ -106,8 +106,8 @@ importers: specifier: workspace:* version: 'link:' vite: - specifier: ^6.2.5 - version: 6.2.5(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1) + specifier: ^6.2.6 + version: 6.2.6(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1) vitest: specifier: ^3.1.1 version: 3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1) @@ -124,8 +124,8 @@ importers: specifier: ^1.2.5 version: 1.2.5 '@shikijs/vitepress-twoslash': - specifier: ^3.2.1 - version: 3.2.1(typescript@5.8.3) + specifier: ^3.2.2 + version: 3.2.2(typescript@5.8.3) case-police: specifier: ^2.0.0 version: 2.0.0 @@ -133,8 +133,8 @@ importers: specifier: ^3.4.2 version: 3.4.2 dotenv: - specifier: ^16.4.7 - version: 16.4.7 + specifier: ^16.5.0 + version: 16.5.0 markdown-it: specifier: ^14.1.0 version: 14.1.0 @@ -149,7 +149,7 @@ importers: version: 4.19.3 unocss: specifier: ^66.1.0-beta.10 - version: 66.1.0-beta.10(postcss@8.5.3)(vite@6.2.5(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))(vue@3.5.13(typescript@5.8.3)) + version: 66.1.0-beta.10(postcss@8.5.3)(vite@6.2.6(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))(vue@3.5.13(typescript@5.8.3)) unplugin: specifier: workspace:* version: link:.. @@ -250,11 +250,11 @@ packages: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} - '@antfu/eslint-config@4.11.0': - resolution: {integrity: sha512-KMLIrZflEFsOEF/N0Xl8iVaheLTdgT3gAwXVzdG5Ng8ieNhBsRsaThnqI7of10kh6psSBLJ6SkNK+ZF98fQIXQ==} + '@antfu/eslint-config@4.12.0': + resolution: {integrity: sha512-8NszLFXu9/cwOP/qliYS3heD+9ZCouGgOWQmsXgDHLNkjC9IjI1yXBOp6Xs4EvwTKsSAZp3SVw382M8naqMQUg==} hasBin: true peerDependencies: - '@eslint-react/eslint-plugin': ^1.19.0 + '@eslint-react/eslint-plugin': ^1.38.4 '@prettier/plugin-xml': ^3.4.1 '@unocss/eslint-plugin': '>=0.50.0' astro-eslint-parser: ^1.0.2 @@ -1335,49 +1335,49 @@ packages: '@shikijs/core@2.5.0': resolution: {integrity: sha512-uu/8RExTKtavlpH7XqnVYBrfBkUc20ngXiX9NSrBhOVZYv/7XQRKUyhtkeflY5QsxC0GbJThCerruZfsUaSldg==} - '@shikijs/core@3.2.1': - resolution: {integrity: sha512-FhsdxMWYu/C11sFisEp7FMGBtX/OSSbnXZDMBhGuUDBNTdsoZlMSgQv5f90rwvzWAdWIW6VobD+G3IrazxA6dQ==} + '@shikijs/core@3.2.2': + resolution: {integrity: sha512-yvlSKVMLjddAGBa2Yu+vUZxuu3sClOWW1AG+UtJkvejYuGM5BVL35s6Ijiwb75O9QdEx6IkMxinHZSi8ZyrBaA==} '@shikijs/engine-javascript@2.5.0': resolution: {integrity: sha512-VjnOpnQf8WuCEZtNUdjjwGUbtAVKuZkVQ/5cHy/tojVVRIRtlWMYVjyWhxOmIq05AlSOv72z7hRNRGVBgQOl0w==} - '@shikijs/engine-javascript@3.2.1': - resolution: {integrity: sha512-eMdcUzN3FMQYxOmRf2rmU8frikzoSHbQDFH2hIuXsrMO+IBOCI9BeeRkCiBkcLDHeRKbOCtYMJK3D6U32ooU9Q==} + '@shikijs/engine-javascript@3.2.2': + resolution: {integrity: sha512-tlDKfhWpF4jKLUyVAnmL+ggIC+0VyteNsUpBzh1iwWLZu4i+PelIRr0TNur6pRRo5UZIv3ss/PLMuwahg9S2hg==} '@shikijs/engine-oniguruma@2.5.0': resolution: {integrity: sha512-pGd1wRATzbo/uatrCIILlAdFVKdxImWJGQ5rFiB5VZi2ve5xj3Ax9jny8QvkaV93btQEwR/rSz5ERFpC5mKNIw==} - '@shikijs/engine-oniguruma@3.2.1': - resolution: {integrity: sha512-wZZAkayEn6qu2+YjenEoFqj0OyQI64EWsNR6/71d1EkG4sxEOFooowKivsWPpaWNBu3sxAG+zPz5kzBL/SsreQ==} + '@shikijs/engine-oniguruma@3.2.2': + resolution: {integrity: sha512-vyXRnWVCSvokwbaUD/8uPn6Gqsf5Hv7XwcW4AgiU4Z2qwy19sdr6VGzMdheKKN58tJOOe5MIKiNb901bgcUXYQ==} '@shikijs/langs@2.5.0': resolution: {integrity: sha512-Qfrrt5OsNH5R+5tJ/3uYBBZv3SuGmnRPejV9IlIbFH3HTGLDlkqgHymAlzklVmKBjAaVmkPkyikAV/sQ1wSL+w==} - '@shikijs/langs@3.2.1': - resolution: {integrity: sha512-If0iDHYRSGbihiA8+7uRsgb1er1Yj11pwpX1c6HLYnizDsKAw5iaT3JXj5ZpaimXSWky/IhxTm7C6nkiYVym+A==} + '@shikijs/langs@3.2.2': + resolution: {integrity: sha512-NY0Urg2dV9ETt3JIOWoMPuoDNwte3geLZ4M1nrPHbkDS8dWMpKcEwlqiEIGqtwZNmt5gKyWpR26ln2Bg2ecPgw==} '@shikijs/themes@2.5.0': resolution: {integrity: sha512-wGrk+R8tJnO0VMzmUExHR+QdSaPUl/NKs+a4cQQRWyoc3YFbUzuLEi/KWK1hj+8BfHRKm2jNhhJck1dfstJpiw==} - '@shikijs/themes@3.2.1': - resolution: {integrity: sha512-k5DKJUT8IldBvAm8WcrDT5+7GA7se6lLksR+2E3SvyqGTyFMzU2F9Gb7rmD+t+Pga1MKrYFxDIeyWjMZWM6uBQ==} + '@shikijs/themes@3.2.2': + resolution: {integrity: sha512-Zuq4lgAxVKkb0FFdhHSdDkALuRpsj1so1JdihjKNQfgM78EHxV2JhO10qPsMrm01FkE3mDRTdF68wfmsqjt6HA==} '@shikijs/transformers@2.5.0': resolution: {integrity: sha512-SI494W5X60CaUwgi8u4q4m4s3YAFSxln3tzNjOSYqq54wlVgz0/NbbXEb3mdLbqMBztcmS7bVTaEd2w0qMmfeg==} - '@shikijs/twoslash@3.2.1': - resolution: {integrity: sha512-2ZiL9xXY8JRXHG5BdJXE9KoIeSsyH9/yK+YTN90/SUIKkq7Nf5dWqXp5wJ6+4SL0FQO8mq2HUutwqU+gamOgOA==} + '@shikijs/twoslash@3.2.2': + resolution: {integrity: sha512-rqi1qQiQI3tYVciYVsbm2llQNGCslVWPcgzGSaapXPaSs3r9CfwmRHat9B7Vs6gT6likZN+qMxqIOqSqwCoJtQ==} peerDependencies: typescript: '>=5.5.0' '@shikijs/types@2.5.0': resolution: {integrity: sha512-ygl5yhxki9ZLNuNpPitBWvcy9fsSKKaRuO4BAlMyagszQidxcpLAr0qiW/q43DtSIDxO6hEbtYLiFZNXO/hdGw==} - '@shikijs/types@3.2.1': - resolution: {integrity: sha512-/NTWAk4KE2M8uac0RhOsIhYQf4pdU0OywQuYDGIGAJ6Mjunxl2cGiuLkvu4HLCMn+OTTLRWkjZITp+aYJv60yA==} + '@shikijs/types@3.2.2': + resolution: {integrity: sha512-a5TiHk7EH5Lso8sHcLHbVNNhWKP0Wi3yVnXnu73g86n3WoDgEra7n3KszyeCGuyoagspQ2fzvy4cpSc8pKhb0A==} - '@shikijs/vitepress-twoslash@3.2.1': - resolution: {integrity: sha512-lQNmw3v9gBFYdxfCW5upcDwfQu8BTJz4D4VPN72XElBA6gW82PKNmzZDoHhVcEmgm/cRQpPjpiY6CYChtv/AEw==} + '@shikijs/vitepress-twoslash@3.2.2': + resolution: {integrity: sha512-90nEoOBWgAjsvIBzJKRih89VTYCExWgF72BeesWJsxDpZasYyEZ/MpNaaDTSRHnEHXwfsmezZheiHOUmBi5G5g==} '@shikijs/vscode-textmate@10.0.2': resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} @@ -1388,8 +1388,8 @@ packages: peerDependencies: eslint: '>=9.0.0' - '@swc/helpers@0.5.15': - resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==} + '@swc/helpers@0.5.17': + resolution: {integrity: sha512-5IKx/Y13RsYd+sauPb2x+U/xZikHjolzfuDgTAl/Tdf3Q8rslRvC19NKDLgAJQ6wsqADk10ntlv08nPFw/gO/A==} '@tybys/wasm-util@0.9.0': resolution: {integrity: sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==} @@ -1661,78 +1661,83 @@ packages: peerDependencies: vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0 - '@unrs/resolver-binding-darwin-arm64@1.4.1': - resolution: {integrity: sha512-8Tv+Bsd0BjGwfEedIyor4inw8atppRxM5BdUnIt+3mAm/QXUm7Dw74CHnXpfZKXkp07EXJGiA8hStqCINAWhdw==} + '@unrs/resolver-binding-darwin-arm64@1.5.0': + resolution: {integrity: sha512-YmocNlEcX/AgJv8gI41bhjMOTcKcea4D2nRIbZj+MhRtSH5+vEU8r/pFuTuoF+JjVplLsBueU+CILfBPVISyGQ==} cpu: [arm64] os: [darwin] - '@unrs/resolver-binding-darwin-x64@1.4.1': - resolution: {integrity: sha512-X8c3PhWziEMKAzZz+YAYWfwawi5AEgzy/hmfizAB4C70gMHLKmInJcp1270yYAOs7z07YVFI220pp50z24Jk3A==} + '@unrs/resolver-binding-darwin-x64@1.5.0': + resolution: {integrity: sha512-qpUrXgH4e/0xu1LOhPEdfgSY3vIXOxDQv370NEL8npN8h40HcQDA+Pl2r4HBW6tTXezWIjxUFcP7tj529RZtDw==} cpu: [x64] os: [darwin] - '@unrs/resolver-binding-freebsd-x64@1.4.1': - resolution: {integrity: sha512-UUr/nREy1UdtxXQnmLaaTXFGOcGxPwNIzeJdb3KXai3TKtC1UgNOB9s8KOA4TaxOUBR/qVgL5BvBwmUjD5yuVA==} + '@unrs/resolver-binding-freebsd-x64@1.5.0': + resolution: {integrity: sha512-3tX8r8vgjvZzaJZB4jvxUaaFCDCb3aWDCpZN3EjhGnnwhztslI05KSG5NY/jNjlcZ5QWZ7dEZZ/rNBFsmTaSPw==} cpu: [x64] os: [freebsd] - '@unrs/resolver-binding-linux-arm-gnueabihf@1.4.1': - resolution: {integrity: sha512-e3pII53dEeS8inkX6A1ad2UXE0nuoWCqik4kOxaDnls0uJUq0ntdj5d9IYd+bv5TDwf9DSge/xPOvCmRYH+Tsw==} + '@unrs/resolver-binding-linux-arm-gnueabihf@1.5.0': + resolution: {integrity: sha512-FH+ixzBKaUU9fWOj3TYO+Yn/eO6kYvMLV9eNJlJlkU7OgrxkCmiMS6wUbyT0KA3FOZGxnEQ2z3/BHgYm2jqeLA==} cpu: [arm] os: [linux] - '@unrs/resolver-binding-linux-arm-musleabihf@1.4.1': - resolution: {integrity: sha512-e/AKKd9gR+HNmVyDEPI/PIz2t0DrA3cyonHNhHVjrkxe8pMCiYiqhtn1+h+yIpHUtUlM6Y1FNIdivFa+r7wrEQ==} + '@unrs/resolver-binding-linux-arm-musleabihf@1.5.0': + resolution: {integrity: sha512-pxCgXMgwB/4PfqFQg73lMhmWwcC0j5L+dNXhZoz/0ek0iS/oAWl65fxZeT/OnU7fVs52MgdP2q02EipqJJXHSg==} cpu: [arm] os: [linux] - '@unrs/resolver-binding-linux-arm64-gnu@1.4.1': - resolution: {integrity: sha512-vtIu34luF1jRktlHtiwm2mjuE8oJCsFiFr8hT5+tFQdqFKjPhbJXn83LswKsOhy0GxAEevpXDI4xxEwkjuXIPA==} + '@unrs/resolver-binding-linux-arm64-gnu@1.5.0': + resolution: {integrity: sha512-FX2FV7vpLE/+Z0NZX9/1pwWud5Wocm/2PgpUXbT5aSV3QEB10kBPJAzssOQylvdj8mOHoKl5pVkXpbCwww/T2g==} cpu: [arm64] os: [linux] - '@unrs/resolver-binding-linux-arm64-musl@1.4.1': - resolution: {integrity: sha512-H3PaOuGyhFXiyJd+09uPhGl4gocmhyi1BRzvsP8Lv5AQO3p3/ZY7WjV4t2NkBksm9tMjf3YbOVHyPWi2eWsNYw==} + '@unrs/resolver-binding-linux-arm64-musl@1.5.0': + resolution: {integrity: sha512-+gF97xst1BZb28T3nwwzEtq2ewCoMDGKsenYsZuvpmNrW0019G1iUAunZN+FG55L21y+uP7zsGX06OXDQ/viKw==} cpu: [arm64] os: [linux] - '@unrs/resolver-binding-linux-ppc64-gnu@1.4.1': - resolution: {integrity: sha512-4+GmJcaaFntCi1S01YByqp8wLMjV/FyQyHVGm0vedIhL1Vfx7uHkz/sZmKsidRwokBGuxi92GFmSzqT2O8KcNA==} + '@unrs/resolver-binding-linux-ppc64-gnu@1.5.0': + resolution: {integrity: sha512-5bEmVcQw9js8JYM2LkUBw5SeELSIxX+qKf9bFrfFINKAp4noZ//hUxLpbF7u/3gTBN1GsER6xOzIZlw/VTdXtA==} cpu: [ppc64] os: [linux] - '@unrs/resolver-binding-linux-s390x-gnu@1.4.1': - resolution: {integrity: sha512-6RDQVCmtFYTlhy89D5ixTqo9bTQqFhvNN0Ey1wJs5r+01Dq15gPHRXv2jF2bQATtMrOfYwv+R2ZR9ew1N1N3YQ==} + '@unrs/resolver-binding-linux-riscv64-gnu@1.5.0': + resolution: {integrity: sha512-GGk/8TPUsf1Q99F+lzMdjE6sGL26uJCwQ9TlvBs8zR3cLQNw/MIumPN7zrs3GFGySjnwXc8gA6J3HKbejywmqA==} + cpu: [riscv64] + os: [linux] + + '@unrs/resolver-binding-linux-s390x-gnu@1.5.0': + resolution: {integrity: sha512-5uRkFYYVNAeVaA4W/CwugjFN3iDOHCPqsBLCCOoJiMfFMMz4evBRsg+498OFa9w6VcTn2bD5aI+RRayaIgk2Sw==} cpu: [s390x] os: [linux] - '@unrs/resolver-binding-linux-x64-gnu@1.4.1': - resolution: {integrity: sha512-XpU9uzIkD86+19NjCXxlVPISMUrVXsXo5htxtuG+uJ59p5JauSRZsIxQxzzfKzkxEjdvANPM/lS1HFoX6A6QeA==} + '@unrs/resolver-binding-linux-x64-gnu@1.5.0': + resolution: {integrity: sha512-j905CZH3nehYy6NimNqC2B14pxn4Ltd7guKMyPTzKehbFXTUgihQS/ZfHQTdojkMzbSwBOSgq1dOrY+IpgxDsA==} cpu: [x64] os: [linux] - '@unrs/resolver-binding-linux-x64-musl@1.4.1': - resolution: {integrity: sha512-3CDjG/spbTKCSHl66QP2ekHSD+H34i7utuDIM5gzoNBcZ1gTO0Op09Wx5cikXnhORRf9+HyDWzm37vU1PLSM1A==} + '@unrs/resolver-binding-linux-x64-musl@1.5.0': + resolution: {integrity: sha512-dmLevQTuzQRwu5A+mvj54R5aye5I4PVKiWqGxg8tTaYP2k2oTs/3Mo8mgnhPk28VoYCi0fdFYpgzCd4AJndQvQ==} cpu: [x64] os: [linux] - '@unrs/resolver-binding-wasm32-wasi@1.4.1': - resolution: {integrity: sha512-50tYhvbCTnuzMn7vmP8IV2UKF7ITo1oihygEYq9wW2DUb/Y+QMqBHJUSCABRngATjZ4shOK6f2+s0gQX6ElENQ==} + '@unrs/resolver-binding-wasm32-wasi@1.5.0': + resolution: {integrity: sha512-LtJMhwu7avhoi+kKfAZOKN773RtzLBVVF90YJbB0wyMpUj9yQPeA+mteVUI9P70OG/opH47FeV5AWeaNWWgqJg==} engines: {node: '>=14.0.0'} cpu: [wasm32] - '@unrs/resolver-binding-win32-arm64-msvc@1.4.1': - resolution: {integrity: sha512-KyJiIne/AqV4IW0wyQO34wSMuJwy3VxVQOfIXIPyQ/Up6y/zi2P/WwXb78gHsLiGRUqCA9LOoCX+6dQZde0g1g==} + '@unrs/resolver-binding-win32-arm64-msvc@1.5.0': + resolution: {integrity: sha512-FTZBxLL4SO1mgIM86KykzJmPeTPisBDHQV6xtfDXbTMrentuZ6SdQKJUV5BWaoUK3p8kIULlrCcucqdCnk8Npg==} cpu: [arm64] os: [win32] - '@unrs/resolver-binding-win32-ia32-msvc@1.4.1': - resolution: {integrity: sha512-y2NUD7pygrBolN2NoXUrwVqBpKPhF8DiSNE5oB5/iFO49r2DpoYqdj5HPb3F42fPBH5qNqj6Zg63+xCEzAD2hw==} + '@unrs/resolver-binding-win32-ia32-msvc@1.5.0': + resolution: {integrity: sha512-i5bB7vJ1waUsFciU/FKLd4Zw0VnAkvhiJ4//jYQXyDUuiLKodmtQZVTcOPU7pp97RrNgCFtXfC1gnvj/DHPJTw==} cpu: [ia32] os: [win32] - '@unrs/resolver-binding-win32-x64-msvc@1.4.1': - resolution: {integrity: sha512-hVXaObGI2lGFmrtT77KSbPQ3I+zk9IU500wobjk0+oX59vg/0VqAzABNtt3YSQYgXTC2a/LYxekLfND/wlt0yQ==} + '@unrs/resolver-binding-win32-x64-msvc@1.5.0': + resolution: {integrity: sha512-wAvXp4k7jhioi4SebXW/yfzzYwsUCr9kIX4gCsUFKpCTUf8Mi7vScJXI3S+kupSUf0LbVHudR8qBbe2wFMSNUw==} cpu: [x64] os: [win32] @@ -1748,17 +1753,16 @@ packages: vite: ^5.0.0 || ^6.0.0 vue: ^3.2.25 - '@vitest/eslint-plugin@1.1.40': - resolution: {integrity: sha512-M7RpSSVa98U0gtDcLfoZqLuv4Wk/G7o6TqTULwVbPO/TU7qaw41XNP0t68+JVgtgy/WkVGbxVQMBdj3XsywKcQ==} + '@vitest/eslint-plugin@1.1.42': + resolution: {integrity: sha512-dTGNbh/angh+hoqp5L5A8YO/29mOXDXmDQ/1fzt/jiYzLvU6FvrMqJpGqMqh5g+Fz6MDoZi0AlxefnFUg93Q5A==} peerDependencies: + '@typescript-eslint/utils': '>= 8.24.0' eslint: '>= 8.57.0' typescript: '>= 5.0.0' vitest: '*' peerDependenciesMeta: typescript: optional: true - vitest: - optional: true '@vitest/expect@3.1.1': resolution: {integrity: sha512-q/zjrW9lgynctNbwvFtQkGK9+vvHA5UzVi2V8APrp1C6fG6/MuYYkmlx4FubuqLycCeSdHD5aadWfua/Vr0EUA==} @@ -2155,8 +2159,8 @@ packages: buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} - builtin-modules@4.0.0: - resolution: {integrity: sha512-p1n8zyCkt1BVrKNFymOHjcDSAl7oq/gUvfgULv2EblgpPVQlQr9yHnWjg9IJ2MhfwPqiYqMMrr01OY7yQoK2yA==} + builtin-modules@5.0.0: + resolution: {integrity: sha512-bkXY9WsVpY7CvMhKSR6pZilZu9Ln5WDrKVBUXf2S443etkmEO4V58heTecXcUIsNsi4Rx8JUO4NfX1IcQl4deg==} engines: {node: '>=18.20'} bumpp@10.1.0: @@ -2208,8 +2212,8 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - caniuse-lite@1.0.30001712: - resolution: {integrity: sha512-MBqPpGYYdQ7/hfKiet9SCI+nmN5/hp4ZzveOJubl5DTAMa5oggjAuoi0Z4onBpKPFI2ePGnQuQIzF3VxDjDJig==} + caniuse-lite@1.0.30001713: + resolution: {integrity: sha512-wCIWIg+A4Xr7NfhTuHdX+/FKh3+Op3LBbSp2N5Pfx6T/LhdQy3GTyoTg48BReaW/MyMNZAkTadsBtai3ldWK0Q==} case-police@2.0.0: resolution: {integrity: sha512-jPVlo+mrmaLQOc4PH00noGFcJsZBWy+eKnAoiqdDJZAx23l6JqvxzElug0GgvZf8zDOODWs9PmEY9GjZb+oMHg==} @@ -2544,8 +2548,8 @@ packages: resolution: {integrity: sha512-zIHwmZPRshsCdpMDyVsqGmgyP0yT8GAgXUnkdAoJisxvf33k7yO6OuoKmcTGuXPWSsm8Oh88nZicRLA9Y0rUeA==} engines: {node: '>=12'} - dotenv@16.4.7: - resolution: {integrity: sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==} + dotenv@16.5.0: + resolution: {integrity: sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==} engines: {node: '>=12'} dunder-proto@1.0.1: @@ -2558,8 +2562,8 @@ packages: ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} - electron-to-chromium@1.5.134: - resolution: {integrity: sha512-zSwzrLg3jNP3bwsLqWHmS5z2nIOQ5ngMnfMZOWWtXnqqQkPVyOipxK98w+1beLw1TB+EImPNcG8wVP/cLVs2Og==} + electron-to-chromium@1.5.136: + resolution: {integrity: sha512-kL4+wUTD7RSA5FHx5YwWtjDnEEkIIikFgWHR4P6fqjw1PPLlqYkxeOb++wAauAssat0YClCy8Y3C5SxgSkjibQ==} emoji-regex-xs@1.0.0: resolution: {integrity: sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg==} @@ -2762,11 +2766,11 @@ packages: peerDependencies: eslint: '>=6.0.0' - eslint-plugin-unicorn@57.0.0: - resolution: {integrity: sha512-zUYYa6zfNdTeG9BISWDlcLmz16c+2Ck2o5ZDHh0UzXJz3DEP7xjmlVDTzbyV0W+XksgZ0q37WEWzN2D2Ze+g9Q==} - engines: {node: '>=18.18'} + eslint-plugin-unicorn@58.0.0: + resolution: {integrity: sha512-fc3iaxCm9chBWOHPVjn+Czb/wHS0D2Mko7wkOdobqo9R2bbFObc4LyZaLTNy0mhZOP84nKkLhTUQxlLOZ7EjKw==} + engines: {node: ^18.20.0 || ^20.10.0 || >=21.0.0} peerDependencies: - eslint: '>=9.20.0' + eslint: '>=9.22.0' eslint-plugin-unused-imports@4.1.4: resolution: {integrity: sha512-YptD6IzQjDardkl0POxnnRBhU1OEePMV0nd6siHaRBbd+lyh6NAhFEobiznKU7kTsSsDeSD62Pe7kAM1b7dAZQ==} @@ -3245,8 +3249,8 @@ packages: http-parser-js@0.5.10: resolution: {integrity: sha512-Pysuw9XpUq5dVc/2SMHpuTY01RFl8fttgcyunjL7eEMhGM3cI4eOmiCycJDVCo/7O7ClfQD3SaI6ftDzqOXYMA==} - http-proxy-middleware@2.0.8: - resolution: {integrity: sha512-/iazaeFPmL8KLA6QB7DFAU4O5j+9y/TA0D019MbLtPuFI56VK4BXFzM6j6QS9oGpScy8IIDH4S2LHv3zg/63Bw==} + http-proxy-middleware@2.0.9: + resolution: {integrity: sha512-c1IyJYLYppU574+YI7R4QyX2ystMtVXZwIdzazUIPIJsHuWNd+mho2j+bKoHftndicGj9yh+xjd+l0yj7VeT1Q==} engines: {node: '>=12.0.0'} peerDependencies: '@types/express': ^4.17.13 @@ -3254,8 +3258,8 @@ packages: '@types/express': optional: true - http-proxy-middleware@3.0.4: - resolution: {integrity: sha512-LRX3BKgdEyHjLMz608kicoz5E6zGdkSpDwLYVBsJlDpQ3wcqh/Wdsopf2KrysXnNeM7jJJk4KXCV14u8SCLZzQ==} + http-proxy-middleware@3.0.5: + resolution: {integrity: sha512-GLZZm1X38BPY4lkXA01jhwxvDoOkkXqjgVyUzVxiEK4iuRu03PZoYHhHRwxnfhQMDuaxi3vVri0YgSro/1oWqg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} http-proxy@1.18.1: @@ -3340,8 +3344,8 @@ packages: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} - is-builtin-module@4.0.0: - resolution: {integrity: sha512-rWP3AMAalQSesXO8gleROyL2iKU73SX5Er66losQn9rWOWL4Gef0a/xOEOVqjWGMuR2vHG3FJ8UUmT700O8oFg==} + is-builtin-module@5.0.0: + resolution: {integrity: sha512-f4RqJKBUe5rQkJ2eJEJBXSticB3hGbN9j0yxxMQFqIW89Jp9WYFtzfTcRlstDKVUTRzSOTLKRfO9vIztenwtxA==} engines: {node: '>=18.20'} is-core-module@2.16.1: @@ -3586,13 +3590,13 @@ packages: linkify-it@5.0.0: resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} - lint-staged@15.5.0: - resolution: {integrity: sha512-WyCzSbfYGhK7cU+UuDDkzUiytbfbi0ZdPy2orwtM75P3WTtQBzmG40cCxIa8Ii2+XjfxzLH6Be46tUfWS85Xfg==} + lint-staged@15.5.1: + resolution: {integrity: sha512-6m7u8mue4Xn6wK6gZvSCQwBvMBR36xfY24nF5bMTf2MHDYG6S3yhJuOgdYVw99hsjyDt2d4z168b3naI8+NWtQ==} engines: {node: '>=18.12.0'} hasBin: true - listr2@8.3.1: - resolution: {integrity: sha512-tx4s1tp3IYxCyVdPunlZ7MHlQ3FkjadHkbTCcQsOCFK90nM/aFEVEKIwpnn4r1WK1pIRiVrfuEpHV7PmtfvSZw==} + listr2@8.3.2: + resolution: {integrity: sha512-vsBzcU4oE+v0lj4FhVLzr9dBTv4/fHIa57l+GCwovP8MoFNZJTOhGU8PXd4v2VJCbECAaijBiHntiekFMLvo0g==} engines: {node: '>=18.0.0'} loader-runner@4.3.0: @@ -4489,8 +4493,8 @@ packages: shiki@2.5.0: resolution: {integrity: sha512-mI//trrsaiCIPsja5CNfsyNOqgAZUb6VpJA+340toL42UpzQlXpwRV9nch69X6gaUxrr9kaOOa6e3y3uAkGFxQ==} - shiki@3.2.1: - resolution: {integrity: sha512-VML/2o1/KGYkEf/stJJ+s9Ypn7jUKQPomGLGYso4JJFMFxVDyPNsjsI3MB3KLjlMOeH44gyaPdXC6rik2WXvUQ==} + shiki@3.2.2: + resolution: {integrity: sha512-0qWBkM2t/0NXPRcVgtLhtHv6Ak3Q5yI4K/ggMqcgLRKm4+pCs3namgZlhlat/7u2CuqNtlShNs9lENOG6n7UaQ==} side-channel-list@1.0.0: resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==} @@ -4970,12 +4974,12 @@ packages: '@nuxt/kit': optional: true - unplugin@2.2.2: - resolution: {integrity: sha512-Qp+iiD+qCRnUek+nDoYvtWX7tfnYyXsrOnJ452FRTgOyKmTM7TUJ3l+PLPJOOWPTUyKISKp4isC5JJPSXUjGgw==} + unplugin@2.3.1: + resolution: {integrity: sha512-l9lOQPGN82rUAnyX7Qw8z0E9oLgQ8tkPxFyAqX3x7DnX/jvgLHUqKX1b8u5RP6u6K0/GKfgvaiaB018j7zr+Nw==} engines: {node: '>=18.12.0'} - unrs-resolver@1.4.1: - resolution: {integrity: sha512-MhPB3wBI5BR8TGieTb08XuYlE8oFVEXdSAgat3psdlRyejl8ojQ8iqPcjh094qCZ1r+TnkxzP6BeCd/umfHckQ==} + unrs-resolver@1.5.0: + resolution: {integrity: sha512-6aia3Oy7SEe0MuUGQm2nsyob0L2+g57w178K5SE/3pvSGAIp28BB2O921fKx424Ahc/gQ6v0DXFbhcpyhGZdOA==} untildify@4.0.0: resolution: {integrity: sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==} @@ -5027,8 +5031,8 @@ packages: engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true - vite@6.2.5: - resolution: {integrity: sha512-j023J/hCAa4pRIUH6J9HemwYfjB5llR2Ps0CWeikOtdR8+pAURAk0DoJC5/mm9kd+UgdnIy7d6HE4EAvlYhPhA==} + vite@6.2.6: + resolution: {integrity: sha512-9xpjNl3kR4rVDZgPNdTL0/c6ao4km69a/2ihNQbcANz8RuCOK3hQBmLSJf3bRKVQjVMda+YvizNE8AwvogcPbw==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true peerDependencies: @@ -5437,7 +5441,7 @@ snapshots: '@jridgewell/gen-mapping': 0.3.8 '@jridgewell/trace-mapping': 0.3.25 - '@antfu/eslint-config@4.11.0(@vue/compiler-sfc@3.5.13)(eslint-plugin-format@1.0.1(eslint@9.24.0(jiti@2.4.2)))(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3)(vitest@3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))': + '@antfu/eslint-config@4.12.0(@typescript-eslint/utils@8.29.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3))(@vue/compiler-sfc@3.5.13)(eslint-plugin-format@1.0.1(eslint@9.24.0(jiti@2.4.2)))(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3)(vitest@3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))': dependencies: '@antfu/install-pkg': 1.0.0 '@clack/prompts': 0.10.1 @@ -5446,7 +5450,7 @@ snapshots: '@stylistic/eslint-plugin': 4.2.0(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3) '@typescript-eslint/eslint-plugin': 8.29.1(@typescript-eslint/parser@8.29.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3) '@typescript-eslint/parser': 8.29.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3) - '@vitest/eslint-plugin': 1.1.40(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3)(vitest@3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1)) + '@vitest/eslint-plugin': 1.1.42(@typescript-eslint/utils@8.29.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3)(vitest@3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1)) ansis: 3.17.0 cac: 6.7.14 eslint: 9.24.0(jiti@2.4.2) @@ -5464,7 +5468,7 @@ snapshots: eslint-plugin-pnpm: 0.3.1(eslint@9.24.0(jiti@2.4.2)) eslint-plugin-regexp: 2.7.0(eslint@9.24.0(jiti@2.4.2)) eslint-plugin-toml: 0.12.0(eslint@9.24.0(jiti@2.4.2)) - eslint-plugin-unicorn: 57.0.0(eslint@9.24.0(jiti@2.4.2)) + eslint-plugin-unicorn: 58.0.0(eslint@9.24.0(jiti@2.4.2)) eslint-plugin-unused-imports: 4.1.4(@typescript-eslint/eslint-plugin@8.29.1(@typescript-eslint/parser@8.29.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.24.0(jiti@2.4.2)) eslint-plugin-vue: 10.0.0(eslint@9.24.0(jiti@2.4.2))(vue-eslint-parser@10.1.3(eslint@9.24.0(jiti@2.4.2))) eslint-plugin-yml: 1.17.0(eslint@9.24.0(jiti@2.4.2)) @@ -5480,6 +5484,7 @@ snapshots: eslint-plugin-format: 1.0.1(eslint@9.24.0(jiti@2.4.2)) transitivePeerDependencies: - '@eslint/json' + - '@typescript-eslint/utils' - '@vue/compiler-sfc' - supports-color - typescript @@ -5928,17 +5933,17 @@ snapshots: '@farmfe/runtime-plugin-import-meta': 0.2.3 '@farmfe/utils': 0.1.0 '@koa/cors': 5.0.0 - '@swc/helpers': 0.5.15 + '@swc/helpers': 0.5.17 chokidar: 3.6.0 deepmerge: 4.3.1 - dotenv: 16.4.7 + dotenv: 16.5.0 dotenv-expand: 11.0.7 execa: 7.2.0 farm-browserslist-generator: 1.0.5 farm-plugin-replace-dirname: 0.2.1 fast-glob: 3.3.3 fs-extra: 11.3.0 - http-proxy-middleware: 3.0.4 + http-proxy-middleware: 3.0.5 is-plain-object: 5.0.0 koa: 2.16.1 koa-compress: 5.1.1 @@ -6404,11 +6409,11 @@ snapshots: '@rspack/binding-win32-ia32-msvc': 1.3.4 '@rspack/binding-win32-x64-msvc': 1.3.4 - '@rspack/cli@1.3.4(@rspack/core@1.3.4(@swc/helpers@0.5.15))(@types/express@4.17.21)(webpack-cli@6.0.1)(webpack@5.99.5)': + '@rspack/cli@1.3.4(@rspack/core@1.3.4(@swc/helpers@0.5.17))(@types/express@4.17.21)(webpack-cli@6.0.1)(webpack@5.99.5)': dependencies: '@discoveryjs/json-ext': 0.5.7 - '@rspack/core': 1.3.4(@swc/helpers@0.5.15) - '@rspack/dev-server': 1.1.1(@rspack/core@1.3.4(@swc/helpers@0.5.15))(@types/express@4.17.21)(webpack-cli@6.0.1)(webpack@5.99.5) + '@rspack/core': 1.3.4(@swc/helpers@0.5.17) + '@rspack/dev-server': 1.1.1(@rspack/core@1.3.4(@swc/helpers@0.5.17))(@types/express@4.17.21)(webpack-cli@6.0.1)(webpack@5.99.5) colorette: 2.0.20 exit-hook: 4.0.0 interpret: 3.1.1 @@ -6424,21 +6429,21 @@ snapshots: - webpack - webpack-cli - '@rspack/core@1.3.4(@swc/helpers@0.5.15)': + '@rspack/core@1.3.4(@swc/helpers@0.5.17)': dependencies: '@module-federation/runtime-tools': 0.11.2 '@rspack/binding': 1.3.4 '@rspack/lite-tapable': 1.0.1 - caniuse-lite: 1.0.30001712 + caniuse-lite: 1.0.30001713 optionalDependencies: - '@swc/helpers': 0.5.15 + '@swc/helpers': 0.5.17 - '@rspack/dev-server@1.1.1(@rspack/core@1.3.4(@swc/helpers@0.5.15))(@types/express@4.17.21)(webpack-cli@6.0.1)(webpack@5.99.5)': + '@rspack/dev-server@1.1.1(@rspack/core@1.3.4(@swc/helpers@0.5.17))(@types/express@4.17.21)(webpack-cli@6.0.1)(webpack@5.99.5)': dependencies: - '@rspack/core': 1.3.4(@swc/helpers@0.5.15) + '@rspack/core': 1.3.4(@swc/helpers@0.5.17) chokidar: 3.6.0 express: 4.21.2 - http-proxy-middleware: 2.0.8(@types/express@4.17.21) + http-proxy-middleware: 2.0.9(@types/express@4.17.21) mime-types: 2.1.35 p-retry: 6.2.1 webpack-dev-middleware: 7.4.2(webpack@5.99.5) @@ -6464,9 +6469,9 @@ snapshots: '@types/hast': 3.0.4 hast-util-to-html: 9.0.5 - '@shikijs/core@3.2.1': + '@shikijs/core@3.2.2': dependencies: - '@shikijs/types': 3.2.1 + '@shikijs/types': 3.2.2 '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.4 hast-util-to-html: 9.0.5 @@ -6477,9 +6482,9 @@ snapshots: '@shikijs/vscode-textmate': 10.0.2 oniguruma-to-es: 3.1.1 - '@shikijs/engine-javascript@3.2.1': + '@shikijs/engine-javascript@3.2.2': dependencies: - '@shikijs/types': 3.2.1 + '@shikijs/types': 3.2.2 '@shikijs/vscode-textmate': 10.0.2 oniguruma-to-es: 4.1.0 @@ -6488,36 +6493,36 @@ snapshots: '@shikijs/types': 2.5.0 '@shikijs/vscode-textmate': 10.0.2 - '@shikijs/engine-oniguruma@3.2.1': + '@shikijs/engine-oniguruma@3.2.2': dependencies: - '@shikijs/types': 3.2.1 + '@shikijs/types': 3.2.2 '@shikijs/vscode-textmate': 10.0.2 '@shikijs/langs@2.5.0': dependencies: '@shikijs/types': 2.5.0 - '@shikijs/langs@3.2.1': + '@shikijs/langs@3.2.2': dependencies: - '@shikijs/types': 3.2.1 + '@shikijs/types': 3.2.2 '@shikijs/themes@2.5.0': dependencies: '@shikijs/types': 2.5.0 - '@shikijs/themes@3.2.1': + '@shikijs/themes@3.2.2': dependencies: - '@shikijs/types': 3.2.1 + '@shikijs/types': 3.2.2 '@shikijs/transformers@2.5.0': dependencies: '@shikijs/core': 2.5.0 '@shikijs/types': 2.5.0 - '@shikijs/twoslash@3.2.1(typescript@5.8.3)': + '@shikijs/twoslash@3.2.2(typescript@5.8.3)': dependencies: - '@shikijs/core': 3.2.1 - '@shikijs/types': 3.2.1 + '@shikijs/core': 3.2.2 + '@shikijs/types': 3.2.2 twoslash: 0.3.1(typescript@5.8.3) typescript: 5.8.3 transitivePeerDependencies: @@ -6528,19 +6533,19 @@ snapshots: '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.4 - '@shikijs/types@3.2.1': + '@shikijs/types@3.2.2': dependencies: '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.4 - '@shikijs/vitepress-twoslash@3.2.1(typescript@5.8.3)': + '@shikijs/vitepress-twoslash@3.2.2(typescript@5.8.3)': dependencies: - '@shikijs/twoslash': 3.2.1(typescript@5.8.3) + '@shikijs/twoslash': 3.2.2(typescript@5.8.3) floating-vue: 5.2.2(vue@3.5.13(typescript@5.8.3)) mdast-util-from-markdown: 2.0.2 mdast-util-gfm: 3.1.0 mdast-util-to-hast: 13.2.0 - shiki: 3.2.1 + shiki: 3.2.2 twoslash: 0.3.1(typescript@5.8.3) twoslash-vue: 0.3.1(typescript@5.8.3) vue: 3.5.13(typescript@5.8.3) @@ -6563,7 +6568,7 @@ snapshots: - supports-color - typescript - '@swc/helpers@0.5.15': + '@swc/helpers@0.5.17': dependencies: tslib: 2.8.1 @@ -6806,13 +6811,13 @@ snapshots: '@ungap/structured-clone@1.3.0': {} - '@unocss/astro@66.1.0-beta.10(vite@6.2.5(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))(vue@3.5.13(typescript@5.8.3))': + '@unocss/astro@66.1.0-beta.10(vite@6.2.6(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))(vue@3.5.13(typescript@5.8.3))': dependencies: '@unocss/core': 66.1.0-beta.10 '@unocss/reset': 66.1.0-beta.10 - '@unocss/vite': 66.1.0-beta.10(vite@6.2.5(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))(vue@3.5.13(typescript@5.8.3)) + '@unocss/vite': 66.1.0-beta.10(vite@6.2.6(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))(vue@3.5.13(typescript@5.8.3)) optionalDependencies: - vite: 6.2.5(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1) + vite: 6.2.6(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1) transitivePeerDependencies: - vue @@ -6943,7 +6948,7 @@ snapshots: dependencies: '@unocss/core': 66.1.0-beta.10 - '@unocss/vite@66.1.0-beta.10(vite@6.2.5(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))(vue@3.5.13(typescript@5.8.3))': + '@unocss/vite@66.1.0-beta.10(vite@6.2.6(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))(vue@3.5.13(typescript@5.8.3))': dependencies: '@ampproject/remapping': 2.3.0 '@unocss/config': 66.1.0-beta.10 @@ -6953,72 +6958,76 @@ snapshots: magic-string: 0.30.17 tinyglobby: 0.2.12 unplugin-utils: 0.2.4 - vite: 6.2.5(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1) + vite: 6.2.6(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1) transitivePeerDependencies: - vue - '@unrs/resolver-binding-darwin-arm64@1.4.1': + '@unrs/resolver-binding-darwin-arm64@1.5.0': + optional: true + + '@unrs/resolver-binding-darwin-x64@1.5.0': optional: true - '@unrs/resolver-binding-darwin-x64@1.4.1': + '@unrs/resolver-binding-freebsd-x64@1.5.0': optional: true - '@unrs/resolver-binding-freebsd-x64@1.4.1': + '@unrs/resolver-binding-linux-arm-gnueabihf@1.5.0': optional: true - '@unrs/resolver-binding-linux-arm-gnueabihf@1.4.1': + '@unrs/resolver-binding-linux-arm-musleabihf@1.5.0': optional: true - '@unrs/resolver-binding-linux-arm-musleabihf@1.4.1': + '@unrs/resolver-binding-linux-arm64-gnu@1.5.0': optional: true - '@unrs/resolver-binding-linux-arm64-gnu@1.4.1': + '@unrs/resolver-binding-linux-arm64-musl@1.5.0': optional: true - '@unrs/resolver-binding-linux-arm64-musl@1.4.1': + '@unrs/resolver-binding-linux-ppc64-gnu@1.5.0': optional: true - '@unrs/resolver-binding-linux-ppc64-gnu@1.4.1': + '@unrs/resolver-binding-linux-riscv64-gnu@1.5.0': optional: true - '@unrs/resolver-binding-linux-s390x-gnu@1.4.1': + '@unrs/resolver-binding-linux-s390x-gnu@1.5.0': optional: true - '@unrs/resolver-binding-linux-x64-gnu@1.4.1': + '@unrs/resolver-binding-linux-x64-gnu@1.5.0': optional: true - '@unrs/resolver-binding-linux-x64-musl@1.4.1': + '@unrs/resolver-binding-linux-x64-musl@1.5.0': optional: true - '@unrs/resolver-binding-wasm32-wasi@1.4.1': + '@unrs/resolver-binding-wasm32-wasi@1.5.0': dependencies: '@napi-rs/wasm-runtime': 0.2.8 optional: true - '@unrs/resolver-binding-win32-arm64-msvc@1.4.1': + '@unrs/resolver-binding-win32-arm64-msvc@1.5.0': optional: true - '@unrs/resolver-binding-win32-ia32-msvc@1.4.1': + '@unrs/resolver-binding-win32-ia32-msvc@1.5.0': optional: true - '@unrs/resolver-binding-win32-x64-msvc@1.4.1': + '@unrs/resolver-binding-win32-x64-msvc@1.5.0': optional: true '@valibot/to-json-schema@1.0.0(valibot@1.0.0(typescript@5.8.3))': dependencies: valibot: 1.0.0(typescript@5.8.3) - '@vitejs/plugin-vue@5.2.3(vite@6.2.5(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))(vue@3.5.13(typescript@5.8.3))': + '@vitejs/plugin-vue@5.2.3(vite@6.2.6(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))(vue@3.5.13(typescript@5.8.3))': dependencies: - vite: 6.2.5(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1) + vite: 6.2.6(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1) vue: 3.5.13(typescript@5.8.3) - '@vitest/eslint-plugin@1.1.40(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3)(vitest@3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))': + '@vitest/eslint-plugin@1.1.42(@typescript-eslint/utils@8.29.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3)(vitest@3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))': dependencies: + '@typescript-eslint/utils': 8.29.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3) eslint: 9.24.0(jiti@2.4.2) + vitest: 3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1) optionalDependencies: typescript: 5.8.3 - vitest: 3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1) '@vitest/expect@3.1.1': dependencies: @@ -7027,13 +7036,13 @@ snapshots: chai: 5.2.0 tinyrainbow: 2.0.0 - '@vitest/mocker@3.1.1(vite@6.2.5(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))': + '@vitest/mocker@3.1.1(vite@6.2.6(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))': dependencies: '@vitest/spy': 3.1.1 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - vite: 6.2.5(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1) + vite: 6.2.6(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1) '@vitest/pretty-format@3.1.1': dependencies: @@ -7465,8 +7474,8 @@ snapshots: browserslist@4.24.4: dependencies: - caniuse-lite: 1.0.30001712 - electron-to-chromium: 1.5.134 + caniuse-lite: 1.0.30001713 + electron-to-chromium: 1.5.136 node-releases: 2.0.19 update-browserslist-db: 1.1.3(browserslist@4.24.4) @@ -7477,7 +7486,7 @@ snapshots: base64-js: 1.5.1 ieee754: 1.2.1 - builtin-modules@4.0.0: {} + builtin-modules@5.0.0: {} bumpp@10.1.0: dependencies: @@ -7510,7 +7519,7 @@ snapshots: chokidar: 4.0.3 confbox: 0.2.2 defu: 6.1.4 - dotenv: 16.4.7 + dotenv: 16.5.0 exsolve: 1.0.4 giget: 2.0.0 jiti: 2.4.2 @@ -7546,7 +7555,7 @@ snapshots: callsites@3.1.0: {} - caniuse-lite@1.0.30001712: {} + caniuse-lite@1.0.30001713: {} case-police@2.0.0: {} @@ -7825,9 +7834,9 @@ snapshots: dotenv-expand@11.0.7: dependencies: - dotenv: 16.4.7 + dotenv: 16.5.0 - dotenv@16.4.7: {} + dotenv@16.5.0: {} dunder-proto@1.0.1: dependencies: @@ -7839,7 +7848,7 @@ snapshots: ee-first@1.1.1: {} - electron-to-chromium@1.5.134: {} + electron-to-chromium@1.5.136: {} emoji-regex-xs@1.0.0: {} @@ -8009,7 +8018,7 @@ snapshots: semver: 7.7.1 stable-hash: 0.0.5 tslib: 2.8.1 - unrs-resolver: 1.4.1 + unrs-resolver: 1.5.0 transitivePeerDependencies: - supports-color - typescript @@ -8100,18 +8109,19 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-unicorn@57.0.0(eslint@9.24.0(jiti@2.4.2)): + eslint-plugin-unicorn@58.0.0(eslint@9.24.0(jiti@2.4.2)): dependencies: '@babel/helper-validator-identifier': 7.25.9 '@eslint-community/eslint-utils': 4.5.1(eslint@9.24.0(jiti@2.4.2)) + '@eslint/plugin-kit': 0.2.8 ci-info: 4.2.0 clean-regexp: 1.0.0 core-js-compat: 3.41.0 eslint: 9.24.0(jiti@2.4.2) esquery: 1.6.0 - globals: 15.15.0 + globals: 16.0.0 indent-string: 5.0.0 - is-builtin-module: 4.0.0 + is-builtin-module: 5.0.0 jsesc: 3.1.0 pluralize: 8.0.0 read-package-up: 11.0.0 @@ -8344,7 +8354,7 @@ snapshots: '@types/semver': 7.7.0 '@types/ua-parser-js': 0.7.39 browserslist: 4.24.4 - caniuse-lite: 1.0.30001712 + caniuse-lite: 1.0.30001713 isbot: 3.8.0 object-path: 0.11.8 semver: 7.7.1 @@ -8681,7 +8691,7 @@ snapshots: http-parser-js@0.5.10: {} - http-proxy-middleware@2.0.8(@types/express@4.17.21): + http-proxy-middleware@2.0.9(@types/express@4.17.21): dependencies: '@types/http-proxy': 1.17.16 http-proxy: 1.18.1(debug@4.4.0) @@ -8693,7 +8703,7 @@ snapshots: transitivePeerDependencies: - debug - http-proxy-middleware@3.0.4: + http-proxy-middleware@3.0.5: dependencies: '@types/http-proxy': 1.17.16 debug: 4.4.0 @@ -8778,9 +8788,9 @@ snapshots: dependencies: binary-extensions: 2.3.0 - is-builtin-module@4.0.0: + is-builtin-module@5.0.0: dependencies: - builtin-modules: 4.0.0 + builtin-modules: 5.0.0 is-core-module@2.16.1: dependencies: @@ -9014,14 +9024,14 @@ snapshots: dependencies: uc.micro: 2.1.0 - lint-staged@15.5.0: + lint-staged@15.5.1: dependencies: chalk: 5.4.1 commander: 13.1.0 debug: 4.4.0 execa: 8.0.1 lilconfig: 3.1.3 - listr2: 8.3.1 + listr2: 8.3.2 micromatch: 4.0.8 pidtree: 0.6.0 string-argv: 0.3.2 @@ -9029,7 +9039,7 @@ snapshots: transitivePeerDependencies: - supports-color - listr2@8.3.1: + listr2@8.3.2: dependencies: cli-truncate: 4.0.0 colorette: 2.0.20 @@ -10164,14 +10174,14 @@ snapshots: '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.4 - shiki@3.2.1: + shiki@3.2.2: dependencies: - '@shikijs/core': 3.2.1 - '@shikijs/engine-javascript': 3.2.1 - '@shikijs/engine-oniguruma': 3.2.1 - '@shikijs/langs': 3.2.1 - '@shikijs/themes': 3.2.1 - '@shikijs/types': 3.2.1 + '@shikijs/core': 3.2.2 + '@shikijs/engine-javascript': 3.2.2 + '@shikijs/engine-oniguruma': 3.2.2 + '@shikijs/langs': 3.2.2 + '@shikijs/themes': 3.2.2 + '@shikijs/types': 3.2.2 '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.4 @@ -10585,9 +10595,9 @@ snapshots: transitivePeerDependencies: - supports-color - unocss@66.1.0-beta.10(postcss@8.5.3)(vite@6.2.5(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))(vue@3.5.13(typescript@5.8.3)): + unocss@66.1.0-beta.10(postcss@8.5.3)(vite@6.2.6(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))(vue@3.5.13(typescript@5.8.3)): dependencies: - '@unocss/astro': 66.1.0-beta.10(vite@6.2.5(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))(vue@3.5.13(typescript@5.8.3)) + '@unocss/astro': 66.1.0-beta.10(vite@6.2.6(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))(vue@3.5.13(typescript@5.8.3)) '@unocss/cli': 66.1.0-beta.10 '@unocss/core': 66.1.0-beta.10 '@unocss/postcss': 66.1.0-beta.10(postcss@8.5.3) @@ -10605,9 +10615,9 @@ snapshots: '@unocss/transformer-compile-class': 66.1.0-beta.10 '@unocss/transformer-directives': 66.1.0-beta.10 '@unocss/transformer-variant-group': 66.1.0-beta.10 - '@unocss/vite': 66.1.0-beta.10(vite@6.2.5(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))(vue@3.5.13(typescript@5.8.3)) + '@unocss/vite': 66.1.0-beta.10(vite@6.2.6(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))(vue@3.5.13(typescript@5.8.3)) optionalDependencies: - vite: 6.2.5(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1) + vite: 6.2.6(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1) transitivePeerDependencies: - postcss - supports-color @@ -10621,7 +10631,7 @@ snapshots: '@iconify/utils': 2.3.0 debug: 4.4.0 local-pkg: 1.1.1 - unplugin: 2.2.2 + unplugin: 2.3.1 optionalDependencies: '@vue/compiler-sfc': 3.5.13 transitivePeerDependencies: @@ -10633,7 +10643,7 @@ snapshots: magic-string: 0.30.17 oxc-parser: 0.62.0 oxc-transform: 0.62.0 - unplugin: 2.2.2 + unplugin: 2.3.1 unplugin-utils: 0.2.4 optionalDependencies: typescript: 5.8.3 @@ -10645,7 +10655,7 @@ snapshots: js-tokens: 9.0.1 picocolors: 1.1.1 pkg-types: 1.3.1 - unplugin: 2.2.2 + unplugin: 2.3.1 unplugin-utils: 0.2.4 optional: true @@ -10662,7 +10672,7 @@ snapshots: magic-string: 0.30.17 mlly: 1.7.4 tinyglobby: 0.2.12 - unplugin: 2.2.2 + unplugin: 2.3.1 unplugin-utils: 0.2.4 vue: 3.5.13(typescript@5.8.3) optionalDependencies: @@ -10670,28 +10680,30 @@ snapshots: transitivePeerDependencies: - supports-color - unplugin@2.2.2: + unplugin@2.3.1: dependencies: acorn: 8.14.1 + picomatch: 4.0.2 webpack-virtual-modules: 0.6.2 - unrs-resolver@1.4.1: + unrs-resolver@1.5.0: optionalDependencies: - '@unrs/resolver-binding-darwin-arm64': 1.4.1 - '@unrs/resolver-binding-darwin-x64': 1.4.1 - '@unrs/resolver-binding-freebsd-x64': 1.4.1 - '@unrs/resolver-binding-linux-arm-gnueabihf': 1.4.1 - '@unrs/resolver-binding-linux-arm-musleabihf': 1.4.1 - '@unrs/resolver-binding-linux-arm64-gnu': 1.4.1 - '@unrs/resolver-binding-linux-arm64-musl': 1.4.1 - '@unrs/resolver-binding-linux-ppc64-gnu': 1.4.1 - '@unrs/resolver-binding-linux-s390x-gnu': 1.4.1 - '@unrs/resolver-binding-linux-x64-gnu': 1.4.1 - '@unrs/resolver-binding-linux-x64-musl': 1.4.1 - '@unrs/resolver-binding-wasm32-wasi': 1.4.1 - '@unrs/resolver-binding-win32-arm64-msvc': 1.4.1 - '@unrs/resolver-binding-win32-ia32-msvc': 1.4.1 - '@unrs/resolver-binding-win32-x64-msvc': 1.4.1 + '@unrs/resolver-binding-darwin-arm64': 1.5.0 + '@unrs/resolver-binding-darwin-x64': 1.5.0 + '@unrs/resolver-binding-freebsd-x64': 1.5.0 + '@unrs/resolver-binding-linux-arm-gnueabihf': 1.5.0 + '@unrs/resolver-binding-linux-arm-musleabihf': 1.5.0 + '@unrs/resolver-binding-linux-arm64-gnu': 1.5.0 + '@unrs/resolver-binding-linux-arm64-musl': 1.5.0 + '@unrs/resolver-binding-linux-ppc64-gnu': 1.5.0 + '@unrs/resolver-binding-linux-riscv64-gnu': 1.5.0 + '@unrs/resolver-binding-linux-s390x-gnu': 1.5.0 + '@unrs/resolver-binding-linux-x64-gnu': 1.5.0 + '@unrs/resolver-binding-linux-x64-musl': 1.5.0 + '@unrs/resolver-binding-wasm32-wasi': 1.5.0 + '@unrs/resolver-binding-win32-arm64-msvc': 1.5.0 + '@unrs/resolver-binding-win32-ia32-msvc': 1.5.0 + '@unrs/resolver-binding-win32-x64-msvc': 1.5.0 untildify@4.0.0: {} @@ -10738,7 +10750,7 @@ snapshots: debug: 4.4.0 es-module-lexer: 1.6.0 pathe: 2.0.3 - vite: 6.2.5(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1) + vite: 6.2.6(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1) transitivePeerDependencies: - '@types/node' - jiti @@ -10753,7 +10765,7 @@ snapshots: - tsx - yaml - vite@6.2.5(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1): + vite@6.2.6(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1): dependencies: esbuild: 0.25.2 postcss: 8.5.3 @@ -10783,7 +10795,7 @@ snapshots: '@shikijs/transformers': 2.5.0 '@shikijs/types': 2.5.0 '@types/markdown-it': 14.1.2 - '@vitejs/plugin-vue': 5.2.3(vite@6.2.5(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))(vue@3.5.13(typescript@5.8.3)) + '@vitejs/plugin-vue': 5.2.3(vite@6.2.6(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))(vue@3.5.13(typescript@5.8.3)) '@vue/devtools-api': 7.7.2 '@vue/shared': 3.5.13 '@vueuse/core': 12.8.2(typescript@5.8.3) @@ -10792,7 +10804,7 @@ snapshots: mark.js: 8.11.1 minisearch: 7.1.2 shiki: 2.5.0 - vite: 6.2.5(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1) + vite: 6.2.6(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1) vue: 3.5.13(typescript@5.8.3) optionalDependencies: postcss: 8.5.3 @@ -10829,7 +10841,7 @@ snapshots: vitest@3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1): dependencies: '@vitest/expect': 3.1.1 - '@vitest/mocker': 3.1.1(vite@6.2.5(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1)) + '@vitest/mocker': 3.1.1(vite@6.2.6(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1)) '@vitest/pretty-format': 3.1.1 '@vitest/runner': 3.1.1 '@vitest/snapshot': 3.1.1 @@ -10845,7 +10857,7 @@ snapshots: tinyexec: 0.3.2 tinypool: 1.0.2 tinyrainbow: 2.0.0 - vite: 6.2.5(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1) + vite: 6.2.6(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1) vite-node: 3.1.1(@types/node@22.14.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1) why-is-node-running: 2.3.0 optionalDependencies: @@ -10982,7 +10994,7 @@ snapshots: connect-history-api-fallback: 2.0.0 express: 4.21.2 graceful-fs: 4.2.11 - http-proxy-middleware: 2.0.8(@types/express@4.17.21) + http-proxy-middleware: 2.0.9(@types/express@4.17.21) ipaddr.js: 2.2.0 launch-editor: 2.10.0 open: 10.1.0 From a0e08f5c7770ca98a5901d72fc9f2849ea5a3cb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Sat, 12 Apr 2025 19:01:36 +0800 Subject: [PATCH 5/7] fix: update minimum rollup version requirement for native filter support --- src/rollup/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rollup/index.ts b/src/rollup/index.ts index 38990d0c..777b0067 100644 --- a/src/rollup/index.ts +++ b/src/rollup/index.ts @@ -100,5 +100,6 @@ function supportNativeFilter(context: any) { return false const [major, minor] = rollupVersion.split('.') - return (Number(major) > 4 || (Number(major) === 4 && Number(minor) >= 38)) + // https://github.com/rollup/rollup/pull/5909#issuecomment-2798739729 + return (Number(major) > 4 || (Number(major) === 4 && Number(minor) >= 40)) } From 0e4fa2d4d5f02fe4ef6121aa8eb2d883d5e858f6 Mon Sep 17 00:00:00 2001 From: Kanon <44870505+ysknsid25@users.noreply.github.com> Date: Sat, 12 Apr 2025 20:02:57 +0900 Subject: [PATCH 6/7] test: add test for webpack (#497) * test: add test for webpack Signed-off-by: ysknsid25 * test: add test for webpack Signed-off-by: ysknsid25 --------- Signed-off-by: ysknsid25 --- test/unit-tests/webpack/context.test.ts | 80 +++++++++++++ test/unit-tests/webpack/loaders/load.test.ts | 65 +++++++++++ .../webpack/loaders/transform.test.ts | 107 ++++++++++++++++++ 3 files changed, 252 insertions(+) create mode 100644 test/unit-tests/webpack/context.test.ts create mode 100644 test/unit-tests/webpack/loaders/load.test.ts create mode 100644 test/unit-tests/webpack/loaders/transform.test.ts diff --git a/test/unit-tests/webpack/context.test.ts b/test/unit-tests/webpack/context.test.ts new file mode 100644 index 00000000..692eee2a --- /dev/null +++ b/test/unit-tests/webpack/context.test.ts @@ -0,0 +1,80 @@ +import type { Compilation, Compiler, LoaderContext } from 'webpack' +import { describe, expect, it, vi } from 'vitest' +import { contextOptionsFromCompilation, createBuildContext, createContext, normalizeMessage } from '../../../src/webpack/context' + +describe('webpack - utils', () => { + describe('contextOptionsFromCompilation', () => { + it('should add and retrieve watch files', () => { + const mockCompilation = { + fileDependencies: new Set(), + } as unknown as Compilation + + const contextOptions = contextOptionsFromCompilation(mockCompilation) + contextOptions.addWatchFile('test-file.js') + expect(contextOptions.getWatchFiles()).toContain('test-file.js') + }) + + it('should add and retrieve compilation dependencies', () => { + const mockCompilation = { + compilationDependencies: new Set(), + } as unknown as Compilation + + const contextOptions = contextOptionsFromCompilation(mockCompilation) + contextOptions.addWatchFile('test-file.js') + expect(contextOptions.getWatchFiles()).toContain('test-file.js') + }) + }) + + describe('createBuildContext', () => { + it('should add watch files and emit assets', () => { + const mockOptions = { + addWatchFile: vi.fn(), + getWatchFiles: vi.fn(() => ['file1.js']), + } + const mockCompiler = {} as Compiler + const mockCompilation = { + emitAsset: vi.fn(), + } as unknown as Compilation + + const buildContext = createBuildContext(mockOptions, mockCompiler, mockCompilation) + buildContext.addWatchFile('file2.js') + expect(mockOptions.addWatchFile).toHaveBeenCalledWith(expect.stringContaining('file2.js')) + + buildContext.emitFile({ fileName: 'output.js', source: 'content' } as any) + expect(mockCompilation.emitAsset).toHaveBeenCalledWith( + 'output.js', + expect.anything(), + ) + }) + }) + + describe('createContext', () => { + it('should emit errors and warnings', () => { + const mockLoader = { + emitError: vi.fn(), + emitWarning: vi.fn(), + } as unknown as LoaderContext<{ unpluginName: string }> + + const context = createContext(mockLoader) + context.error('Test error') + context.warn('Test warning') + + expect(mockLoader.emitError).toHaveBeenCalledWith(expect.any(Error)) + expect(mockLoader.emitWarning).toHaveBeenCalledWith(expect.any(Error)) + }) + }) + + describe('normalizeMessage', () => { + it('should normalize string messages', () => { + const error = normalizeMessage('Test error') + expect(error.message).toBe('Test error') + }) + + it('should normalize object messages', () => { + const error = normalizeMessage({ message: 'Test error', stack: 'stack trace', meta: 'meta info' }) + expect(error.message).toBe('Test error') + expect(error.stack).toBe('stack trace') + expect(error.cause).toBe('meta info') + }) + }) +}) diff --git a/test/unit-tests/webpack/loaders/load.test.ts b/test/unit-tests/webpack/loaders/load.test.ts new file mode 100644 index 00000000..f8f182ed --- /dev/null +++ b/test/unit-tests/webpack/loaders/load.test.ts @@ -0,0 +1,65 @@ +import { describe, expect, it, vi } from 'vitest' +import load from '../../../../src/webpack/loaders/load' + +describe('load function', () => { + const mockCallback = vi.fn() + const mockLoaderContext = { + async: () => mockCallback, + query: { + plugin: { + load: vi.fn(), + __virtualModulePrefix: '/virtual/', + }, + }, + resource: '/virtual/test.js', + addDependency: vi.fn(), + getDependencies: vi.fn().mockReturnValue(['/dependency1', '/dependency2']), + _compiler: {}, + _compilation: {}, + } + + it('should call callback with source and map if plugin.load is not defined', async () => { + const context = { ...mockLoaderContext, query: { plugin: {} } } + const source = 'source code' + const map = 'source map' + + await load.call(context as any, source, map) + + expect(mockCallback).toHaveBeenCalledWith(null, source, map) + }) + + it('should decode id if it starts with __virtualModulePrefix', async () => { + const source = 'source code' + const map = 'source map' + const pluginLoadHandler = vi.fn().mockResolvedValue(null) + mockLoaderContext.query.plugin.load = pluginLoadHandler + + await load.call(mockLoaderContext as any, source, map) + + expect(pluginLoadHandler).toHaveBeenCalledWith('test.js') + }) + + it('should call callback with transformed code and map if handler returns an object', async () => { + const source = 'source code' + const map = 'source map' + const transformedCode = { code: 'transformed code', map: 'transformed map' } + const pluginLoadHandler = vi.fn().mockResolvedValue(transformedCode) + mockLoaderContext.query.plugin.load = pluginLoadHandler + + await load.call(mockLoaderContext as any, source, map) + + expect(mockCallback).toHaveBeenCalledWith(null, transformedCode.code, transformedCode.map) + }) + + it('should call callback with transformed code if handler returns a string', async () => { + const source = 'source code' + const map = 'source map' + const transformedCode = 'transformed code' + const pluginLoadHandler = vi.fn().mockResolvedValue(transformedCode) + mockLoaderContext.query.plugin.load = pluginLoadHandler + + await load.call(mockLoaderContext as any, source, map) + + expect(mockCallback).toHaveBeenCalledWith(null, transformedCode, map) + }) +}) diff --git a/test/unit-tests/webpack/loaders/transform.test.ts b/test/unit-tests/webpack/loaders/transform.test.ts new file mode 100644 index 00000000..597587e7 --- /dev/null +++ b/test/unit-tests/webpack/loaders/transform.test.ts @@ -0,0 +1,107 @@ +import { describe, expect, it, vi } from 'vitest' +import transform from '../../../../src/webpack/loaders/transform' + +describe('transform loader', () => { + const mockCallback = vi.fn() + const mockLoaderContext = { + async: () => mockCallback, + query: {}, + resource: '/path/to/resource', + addDependency: vi.fn(), + getDependencies: vi.fn().mockReturnValue(['/path/to/dependency']), + _compiler: {}, + _compilation: {}, + } + + it('should return source and map if plugin.transform is not defined', async () => { + const source = 'source code' + const map = 'source map' + + mockLoaderContext.query = {} + + await transform.call(mockLoaderContext as any, source, map) + + expect(mockCallback).toHaveBeenCalledWith(null, source, map) + }) + + it('should return source and map if filter does not match', async () => { + const source = 'source code' + const map = 'source map' + + mockLoaderContext.query = { + plugin: { + transform: { + handler: vi.fn(), + filter: vi.fn().mockReturnValue(false), + }, + }, + } + + await transform.call(mockLoaderContext as any, source, map) + + expect(mockCallback).toHaveBeenCalledWith(null, source, map) + }) + + it('should call handler and return transformed code', async () => { + const source = 'source code' + const map = 'source map' + const transformedCode = 'transformed code' + + const handlerMock = vi.fn().mockResolvedValue(transformedCode) + mockLoaderContext.query = { + plugin: { + transform: { + handler: handlerMock, + filter: vi.fn().mockReturnValue(true), + }, + }, + } + + await transform.call(mockLoaderContext as any, source, map) + + expect(handlerMock).toHaveBeenCalled() + expect(mockCallback).toHaveBeenCalledWith(null, transformedCode, map) + }) + + it('should call handler and return transformed code and map if handler returns an object', async () => { + const source = 'source code' + const map = 'source map' + const transformedResult = { code: 'transformed code', map: 'transformed map' } + + const handlerMock = vi.fn().mockResolvedValue(transformedResult) + mockLoaderContext.query = { + plugin: { + transform: { + handler: handlerMock, + filter: vi.fn().mockReturnValue(true), + }, + }, + } + + await transform.call(mockLoaderContext as any, source, map) + + expect(handlerMock).toHaveBeenCalled() + expect(mockCallback).toHaveBeenCalledWith(null, transformedResult.code, transformedResult.map) + }) + + it('should handle errors thrown by the handler', async () => { + const source = 'source code' + const map = 'source map' + const error = new Error('Handler error') + + const handlerMock = vi.fn().mockRejectedValue(error) + mockLoaderContext.query = { + plugin: { + transform: { + handler: handlerMock, + filter: vi.fn().mockReturnValue(true), + }, + }, + } + + await transform.call(mockLoaderContext as any, source, map) + + expect(handlerMock).toHaveBeenCalled() + expect(mockCallback).toHaveBeenCalledWith(error) + }) +}) From 466f4d5be7ba048d81613d853c34d7eea2518507 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Sat, 12 Apr 2025 19:06:02 +0800 Subject: [PATCH 7/7] chore: release v2.3.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3275a6ae..15f34f4d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "unplugin", "type": "module", - "version": "2.3.1", + "version": "2.3.2", "packageManager": "pnpm@10.8.0", "description": "Unified plugin system for build tools", "license": "MIT",