Skip to content

Switch from rollup to vite, from commonjs to ecmascript modules #3136

Switch from rollup to vite, from commonjs to ecmascript modules

Switch from rollup to vite, from commonjs to ecmascript modules #3136

Triggered via pull request October 5, 2024 15:22
Status Failure
Total duration 1m 53s
Artifacts

tests.yml

on: pull_request
style-check
14s
style-check
types-check
20s
types-check
Matrix: integration_tests
Fit to window
Zoom out
Zoom in

Annotations

17 errors
style-check
Process completed with exit code 1.
types-check: tests/env/typescript-browser/src/index.ts#L1
Could not find a declaration file for module '../../../../'. '/home/runner/work/meilisearch-js/meilisearch-js/dist/bundles/index.cjs' implicitly has an 'any' type.
types-check: tests/env/typescript-browser/src/index.ts#L2
ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled.
types-check: tests/env/typescript-browser/src/index.ts#L2
'IndexObject' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.
types-check: tests/env/typescript-browser/src/index.ts#L2
The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("../../../../src")' call instead.
types-check: tests/env/typescript-browser/src/index.ts#L3
ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled.
types-check: tests/env/typescript-browser/src/index.ts#L3
The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("../../../../src/token")' call instead.
types-check: tests/env/typescript-node/src/index.ts#L2
ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled.
types-check: tests/env/typescript-node/src/index.ts#L3
ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled.
types-check: tests/env/typescript-node/src/index.ts#L3
'IndexObject' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.
types-check: tests/env/typescript-node/src/index.ts#L4
ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled.
tests/token.test.ts > Tests on token generation > Admin key: Search in tenant token with expireAt value set in the past: src/token.ts#L68
MeiliSearchError: Meilisearch: The expiresAt field must be a date in the future. ❯ validateTokenParameters src/token.ts:68:13 ❯ Module.generateTenantToken src/token.ts:134:3 ❯ tests/token.test.ts:176:9
tests/token.test.ts > Tests on token generation > Admin key: Creates tenant token with an expiration date in the past throws an error: src/token.ts#L68
MeiliSearchError: Meilisearch: The expiresAt field must be a date in the future. ❯ validateTokenParameters src/token.ts:68:13 ❯ Module.generateTenantToken src/token.ts:134:3 ❯ tests/token.test.ts:251:9
integration-tests (Node.js 18)
Process completed with exit code 1.
tests/token.test.ts > Tests on token generation > Admin key: Search in tenant token with expireAt value set in the past: src/token.ts#L68
MeiliSearchError: Meilisearch: The expiresAt field must be a date in the future. ❯ validateTokenParameters src/token.ts:68:13 ❯ Module.generateTenantToken src/token.ts:134:3 ❯ tests/token.test.ts:176:9
tests/token.test.ts > Tests on token generation > Admin key: Creates tenant token with an expiration date in the past throws an error: src/token.ts#L68
MeiliSearchError: Meilisearch: The expiresAt field must be a date in the future. ❯ validateTokenParameters src/token.ts:68:13 ❯ Module.generateTenantToken src/token.ts:134:3 ❯ tests/token.test.ts:251:9
integration-tests (Node.js 20)
Process completed with exit code 1.