Skip to content

Refactor codes

Refactor codes #348

Triggered via pull request February 4, 2025 15:21
Status Failure
Total duration 1m 25s
Artifacts

ci.yml

on: pull_request
Matrix: e2e
Matrix: test
Fit to window
Zoom out
Zoom in

Annotations

31 errors
lint: packages/codegen/src/dts-writer.test.ts#L12
Object literal may only specify known properties, and 'cwd' does not exist in type 'WriteDtsFileOption'.
lint: packages/codegen/src/dts-writer.test.ts#L17
Argument of type '{ outDir: string; cwd: string; arbitraryExtensions: boolean; }' is not assignable to parameter of type 'WriteDtsFileOption'.
lint: packages/codegen/src/dts-writer.test.ts#L22
Argument of type '{ arbitraryExtensions: true; cwd: string; outDir: string; }' is not assignable to parameter of type 'WriteDtsFileOption'.
lint: packages/codegen/src/dts-writer.test.ts#L39
Object literal may only specify known properties, and 'cwd' does not exist in type 'WriteDtsFileOption'.
lint: packages/codegen/src/dts-writer.test.ts#L62
Object literal may only specify known properties, and 'cwd' does not exist in type 'WriteDtsFileOption'.
lint
Process completed with exit code 1.
packages/codegen/src/dts-writer.test.ts > getDtsFilePath > cwd: packages/codegen/src/dts-writer.ts#L12
TypeError: The "from" argument must be of type string. Received undefined ❯ getDtsFilePath packages/codegen/src/dts-writer.ts:12:24 ❯ packages/codegen/src/dts-writer.test.ts:12:12 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { code: 'ERR_INVALID_ARG_TYPE' }
packages/codegen/src/dts-writer.test.ts > getDtsFilePath > outDir: packages/codegen/src/dts-writer.ts#L12
TypeError: The "from" argument must be of type string. Received undefined ❯ getDtsFilePath packages/codegen/src/dts-writer.ts:12:24 ❯ packages/codegen/src/dts-writer.test.ts:17:12 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { code: 'ERR_INVALID_ARG_TYPE' }
packages/codegen/src/dts-writer.test.ts > getDtsFilePath > arbitraryExtensions: packages/codegen/src/dts-writer.ts#L12
TypeError: The "from" argument must be of type string. Received undefined ❯ getDtsFilePath packages/codegen/src/dts-writer.ts:12:24 ❯ packages/codegen/src/dts-writer.test.ts:22:12 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { code: 'ERR_INVALID_ARG_TYPE' }
packages/codegen/src/dts-writer.test.ts > writeDtsFile > writes a d.ts file: packages/codegen/src/dts-writer.ts#L12
TypeError: The "from" argument must be of type string. Received undefined ❯ getDtsFilePath packages/codegen/src/dts-writer.ts:12:24 ❯ writeDtsFile packages/codegen/src/dts-writer.ts:43:23 ❯ packages/codegen/src/dts-writer.test.ts:31:11 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { code: 'ERR_INVALID_ARG_TYPE' }
test (22, ubuntu-latest)
Process completed with exit code 1.
packages/codegen/e2e/index.test.ts > generates .d.ts: packages/codegen/e2e/index.test.ts#L37
Error: Snapshot `generates .d.ts 1` mismatched - Expected + Received "declare const styles = { a1: '' as readonly string, - ...(await import('./b.module.css')).default, ...(await import('@/c.module.css')).default, }; export default styles; " ❯ packages/codegen/e2e/index.test.ts:37:75
packages/codegen/e2e/index.test.ts > generates .d.ts with circular import: packages/codegen/e2e/index.test.ts#L104
Error: Snapshot `generates .d.ts with circular import 1` mismatched - Expected + Received "declare const styles = { a1: '' as readonly string, - ...(await import('./b.module.css')).default, }; export default styles; " ❯ packages/codegen/e2e/index.test.ts:104:75
packages/ts-plugin/e2e/find-all-references.test.ts > Find All References > Find All References for '\'./b.module.css\' in a.module.css': packages/ts-plugin/e2e/find-all-references.test.ts#L244
AssertionError: expected [] to strictly equal [ { …(3) } ] - Expected + Received - [ - { - "end": { - "line": 1, - "offset": 24, - }, - "file": "C:/Users/RUNNER~1/AppData/Local/Temp/ts-honey-css-modules-plugin/2/52f6112c-c71f-469c-a3ce-084b0083dcb3/a.module.css", - "start": { - "line": 1, - "offset": 10, - }, - }, - ] + [] ❯ packages/ts-plugin/e2e/find-all-references.test.ts:244:58
packages/ts-plugin/e2e/find-all-references.test.ts > Find All References > Find All References for '\'./c.module.css\' in a.module.css': packages/ts-plugin/e2e/find-all-references.test.ts#L244
AssertionError: expected [] to strictly equal [ { …(3) } ] - Expected + Received - [ - { - "end": { - "line": 2, - "offset": 48, - }, - "file": "C:/Users/RUNNER~1/AppData/Local/Temp/ts-honey-css-modules-plugin/2/52f6112c-c71f-469c-a3ce-084b0083dcb3/a.module.css", - "start": { - "line": 2, - "offset": 34, - }, - }, - ] + [] ❯ packages/ts-plugin/e2e/find-all-references.test.ts:244:58
packages/ts-plugin/e2e/find-all-references.test.ts > Find All References > Find All References for 'b_1 in index.ts': packages/ts-plugin/e2e/find-all-references.test.ts#L244
AssertionError: expected [] to strictly equal [ { …(3) }, { …(3) } ] - Expected + Received - [ - { - "end": { - "line": 1, - "offset": 5, - }, - "file": "C:/Users/RUNNER~1/AppData/Local/Temp/ts-honey-css-modules-plugin/2/52f6112c-c71f-469c-a3ce-084b0083dcb3/b.module.css", - "start": { - "line": 1, - "offset": 2, - }, - }, - { - "end": { - "line": 3, - "offset": 11, - }, - "file": "C:/Users/RUNNER~1/AppData/Local/Temp/ts-honey-css-modules-plugin/2/52f6112c-c71f-469c-a3ce-084b0083dcb3/index.ts", - "start": { - "line": 3, - "offset": 8, - }, - }, - ] + [] ❯ packages/ts-plugin/e2e/find-all-references.test.ts:244:58
packages/ts-plugin/e2e/find-all-references.test.ts > Find All References > Find All References for 'b_1 in b.module.css': packages/ts-plugin/e2e/find-all-references.test.ts#L244
AssertionError: expected [ { …(3) } ] to strictly equal [ { …(3) }, { …(3) } ] - Expected + Received [ { "end": { "line": 1, "offset": 5, }, "file": "C:/Users/RUNNER~1/AppData/Local/Temp/ts-honey-css-modules-plugin/2/52f6112c-c71f-469c-a3ce-084b0083dcb3/b.module.css", "start": { "line": 1, "offset": 2, }, }, - { - "end": { - "line": 3, - "offset": 11, - }, - "file": "C:/Users/RUNNER~1/AppData/Local/Temp/ts-honey-css-modules-plugin/2/52f6112c-c71f-469c-a3ce-084b0083dcb3/index.ts", - "start": { - "line": 3, - "offset": 8, - }, - }, ] ❯ packages/ts-plugin/e2e/find-all-references.test.ts:244:58
packages/ts-plugin/e2e/find-all-references.test.ts > Find All References > Find All References for 'c_1 in index.ts': packages/ts-plugin/e2e/find-all-references.test.ts#L244
AssertionError: expected [] to strictly equal [ { …(3) }, { …(3) }, { …(3) }, …(1) ] - Expected + Received - [ - { - "end": { - "line": 2, - "offset": 11, - }, - "file": "C:/Users/RUNNER~1/AppData/Local/Temp/ts-honey-css-modules-plugin/2/52f6112c-c71f-469c-a3ce-084b0083dcb3/a.module.css", - "start": { - "line": 2, - "offset": 8, - }, - }, - { - "end": { - "line": 2, - "offset": 11, - }, - "file": "C:/Users/RUNNER~1/AppData/Local/Temp/ts-honey-css-modules-plugin/2/52f6112c-c71f-469c-a3ce-084b0083dcb3/a.module.css", - "start": { - "line": 2, - "offset": 8, - }, - }, - { - "end": { - "line": 1, - "offset": 11, - }, - "file": "C:/Users/RUNNER~1/AppData/Local/Temp/ts-honey-css-modules-plugin/2/52f6112c-c71f-469c-a3ce-084b0083dcb3/c.module.css", - "start": { - "line": 1, - "offset": 8, - }, - }, - { - "end": { - "line": 4, - "offset": 11, - }, - "file": "C:/Users/RUNNER~1/AppData/Local/Temp/ts-honey-css-modules-plugin/2/52f6112c-c71f-469c-a3ce-084b0083dcb3/index.ts", - "start": { - "line": 4, - "offset": 8, - }, - }, - ] + [] ❯ packages/ts-plugin/e2e/find-all-references.test.ts:244:58
packages/ts-plugin/e2e/find-all-references.test.ts > Find All References > Find All References for 'c_1 in a.module.css': packages/ts-plugin/e2e/find-all-references.test.ts#L244
AssertionError: expected [] to strictly equal [ { …(3) }, { …(3) }, { …(3) }, …(1) ] - Expected + Received - [ - { - "end": { - "line": 2, - "offset": 11, - }, - "file": "C:/Users/RUNNER~1/AppData/Local/Temp/ts-honey-css-modules-plugin/2/52f6112c-c71f-469c-a3ce-084b0083dcb3/a.module.css", - "start": { - "line": 2, - "offset": 8, - }, - }, - { - "end": { - "line": 2, - "offset": 11, - }, - "file": "C:/Users/RUNNER~1/AppData/Local/Temp/ts-honey-css-modules-plugin/2/52f6112c-c71f-469c-a3ce-084b0083dcb3/a.module.css", - "start": { - "line": 2, - "offset": 8, - }, - }, - { - "end": { - "line": 1, - "offset": 11, - }, - "file": "C:/Users/RUNNER~1/AppData/Local/Temp/ts-honey-css-modules-plugin/2/52f6112c-c71f-469c-a3ce-084b0083dcb3/c.module.css", - "start": { - "line": 1, - "offset": 8, - }, - }, - { - "end": { - "line": 4, - "offset": 11, - }, - "file": "C:/Users/RUNNER~1/AppData/Local/Temp/ts-honey-css-modules-plugin/2/52f6112c-c71f-469c-a3ce-084b0083dcb3/index.ts", - "start": { - "line": 4, - "offset": 8, - }, - }, - ] + [] ❯ packages/ts-plugin/e2e/find-all-references.test.ts:244:58
packages/ts-plugin/e2e/find-all-references.test.ts > Find All References > Find All References for 'c_1 in c.module.css': packages/ts-plugin/e2e/find-all-references.test.ts#L244
AssertionError: expected [ { …(3) } ] to strictly equal [ { …(3) }, { …(3) }, { …(3) }, …(1) ] - Expected + Received [ { "end": { - "line": 2, - "offset": 11, - }, - "file": "C:/Users/RUNNER~1/AppData/Local/Temp/ts-honey-css-modules-plugin/2/52f6112c-c71f-469c-a3ce-084b0083dcb3/a.module.css", - "start": { - "line": 2, - "offset": 8, - }, - }, - { - "end": { - "line": 2, - "offset": 11, - }, - "file": "C:/Users/RUNNER~1/AppData/Local/Temp/ts-honey-css-modules-plugin/2/52f6112c-c71f-469c-a3ce-084b0083dcb3/a.module.css", - "start": { - "line": 2, - "offset": 8, - }, - }, - { - "end": { "line": 1, "offset": 11, }, "file": "C:/Users/RUNNER~1/AppData/Local/Temp/ts-honey-css-modules-plugin/2/52f6112c-c71f-469c-a3ce-084b0083dcb3/c.module.css", "start": { "line": 1, - "offset": 8, - }, - }, - { - "end": { - "line": 4, - "offset": 11, - }, - "file": "C:/Users/RUNNER~1/AppData/Local/Temp/ts-honey-css-modules-plugin/2/52f6112c-c71f-469c-a3ce-084b0083dcb3/index.ts", - "start": { - "line": 4, "offset": 8, }, }, ] ❯ packages/ts-plugin/e2e/find-all-references.test.ts:244:58
packages/ts-plugin/e2e/find-all-references.test.ts > Find All References > Find All References for 'c_alias in index.ts': packages/ts-plugin/e2e/find-all-references.test.ts#L244
AssertionError: expected [] to strictly equal [ { …(3) }, { …(3) }, { …(3) }, …(1) ] - Expected + Received - [ - { - "end": { - "line": 2, - "offset": 16, - }, - "file": "C:/Users/RUNNER~1/AppData/Local/Temp/ts-honey-css-modules-plugin/2/52f6112c-c71f-469c-a3ce-084b0083dcb3/a.module.css", - "start": { - "line": 2, - "offset": 13, - }, - }, - { - "end": { - "line": 2, - "offset": 27, - }, - "file": "C:/Users/RUNNER~1/AppData/Local/Temp/ts-honey-css-modules-plugin/2/52f6112c-c71f-469c-a3ce-084b0083dcb3/a.module.css", - "start": { - "line": 2, - "offset": 20, - }, - }, - { - "end": { - "line": 2, - "offset": 11, - }, - "file": "C:/Users/RUNNER~1/AppData/Local/Temp/ts-honey-css-modules-plugin/2/52f6112c-c71f-469c-a3ce-084b0083dcb3/c.module.css", - "start": { - "line": 2, - "offset": 8, - }, - }, - { - "end": { - "line": 5, - "offset": 15, - }, - "file": "C:/Users/RUNNER~1/AppData/Local/Temp/ts-honey-css-modules-plugin/2/52f6112c-c71f-469c-a3ce-084b0083dcb3/index.ts", - "start": { - "line": 5, - "offset": 8, - }, - }, - ] + [] ❯ packages/ts-plugin/e2e/find-all-references.test.ts:244:58
packages/codegen/src/dts-writer.test.ts > getDtsFilePath > cwd: packages/codegen/src/dts-writer.ts#L12
TypeError: The "from" argument must be of type string. Received undefined ❯ getDtsFilePath packages/codegen/src/dts-writer.ts:12:24 ❯ packages/codegen/src/dts-writer.test.ts:12:12 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { code: 'ERR_INVALID_ARG_TYPE' }
packages/codegen/src/dts-writer.test.ts > getDtsFilePath > outDir: packages/codegen/src/dts-writer.ts#L12
TypeError: The "from" argument must be of type string. Received undefined ❯ getDtsFilePath packages/codegen/src/dts-writer.ts:12:24 ❯ packages/codegen/src/dts-writer.test.ts:17:12 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { code: 'ERR_INVALID_ARG_TYPE' }
packages/codegen/src/dts-writer.test.ts > getDtsFilePath > arbitraryExtensions: packages/codegen/src/dts-writer.ts#L12
TypeError: The "from" argument must be of type string. Received undefined ❯ getDtsFilePath packages/codegen/src/dts-writer.ts:12:24 ❯ packages/codegen/src/dts-writer.test.ts:22:12 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { code: 'ERR_INVALID_ARG_TYPE' }
packages/codegen/src/dts-writer.test.ts > writeDtsFile > writes a d.ts file: packages/codegen/src/dts-writer.ts#L12
TypeError: The "from" argument must be of type string. Received undefined ❯ getDtsFilePath packages/codegen/src/dts-writer.ts:12:24 ❯ writeDtsFile packages/codegen/src/dts-writer.ts:43:23 ❯ packages/codegen/src/dts-writer.test.ts:31:11 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { code: 'ERR_INVALID_ARG_TYPE' }
packages/codegen/src/runner.test.ts > runHCM > does not generate types derived from files not matched by `pattern`: packages/codegen/src/runner.test.ts#L65
Error: Snapshot `runHCM > does not generate types derived from files not matched by `pattern` 1` mismatched - Expected + Received - "declare const styles = { - ...(await import('./b.module.css')).default, - }; + "declare const styles = {}; export default styles; " ❯ packages/codegen/src/runner.test.ts:65:82
packages/core/src/resolver.test.ts > createResolver > resolves relative path > resolves ./a.module.css from /app/request.module.css: packages/core/src/resolver.test.ts#L12
AssertionError: expected '/D:/app/a.module.css' to be 'D:\app\a.module.css' // Object.is equality Expected: "D:\app\a.module.css" Received: "/D:/app/a.module.css" ❯ packages/core/src/resolver.test.ts:12:47
packages/core/src/resolver.test.ts > createResolver > resolves relative path > resolves ./dir/a.module.css from /app/request.module.css: packages/core/src/resolver.test.ts#L12
AssertionError: expected '/D:/app/dir/a.module.css' to be 'D:\app\dir\a.module.css' // Object.is equality Expected: "D:\app\dir\a.module.css" Received: "/D:/app/dir/a.module.css" ❯ packages/core/src/resolver.test.ts:12:47
packages/core/src/resolver.test.ts > createResolver > resolves absolute path > resolves /app/a.module.css from /app/request.module.css: packages/core/src/resolver.test.ts#L21
AssertionError: expected '/app/a.module.css' to be 'D:\app\a.module.css' // Object.is equality Expected: "D:\app\a.module.css" Received: "/app/a.module.css" ❯ packages/core/src/resolver.test.ts:21:47
packages/core/src/resolver.test.ts > createResolver > resolves absolute path > resolves /app/dir/a.module.css from /app/request.module.css: packages/core/src/resolver.test.ts#L21
AssertionError: expected '/app/dir/a.module.css' to be 'D:\app\dir\a.module.css' // Object.is equality Expected: "D:\app\dir\a.module.css" Received: "/app/dir/a.module.css" ❯ packages/core/src/resolver.test.ts:21:47
packages/core/src/resolver.test.ts > createResolver > resolves alias > alias is used if import specifiers start with alias > resolves @/a.module.css from /app/request.module.css: packages/core/src/resolver.test.ts#L34
AssertionError: expected '/app/alias/a.module.css' to be 'D:\app\alias\a.module.css' // Object.is equality Expected: "D:\app\alias\a.module.css" Received: "/app/alias/a.module.css" ❯ packages/core/src/resolver.test.ts:34:49