diff --git a/package.json b/package.json index cd4b2ba..23cbbbe 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "@kiwi/eslint-config": "^2.0.2", "@kiwi/prettier-config": "^2.0.2", "@types/babel__core": "^7.20.5", - "@types/node": "^14.18.34", + "@types/node": "^18.0.0", "@types/pug": "^2.0.6", "@types/stylus": "^0.48.38", "autoprefixer": "^10.4.16", @@ -85,7 +85,6 @@ }, "dependencies": { "detect-indent": "^6.1.0", - "magic-string": "^0.30.5", "strip-indent": "^3.0.0" }, "peerDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8d224f2..f5c1446 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,9 +11,6 @@ importers: detect-indent: specifier: ^6.1.0 version: 6.1.0 - magic-string: - specifier: ^0.30.5 - version: 0.30.10 strip-indent: specifier: ^3.0.0 version: 3.0.0 @@ -32,7 +29,7 @@ importers: version: 11.0.0 '@kiwi/eslint-config': specifier: ^2.0.2 - version: 2.4.0(eslint@8.57.0)(jest@29.7.0(@types/node@14.18.63))(prettier@3.3.2)(svelte@4.2.18)(typescript@5.4.5) + version: 2.4.0(eslint@8.57.0)(jest@29.7.0(@types/node@18.19.34))(prettier@3.3.2)(svelte@4.2.18)(typescript@5.4.5) '@kiwi/prettier-config': specifier: ^2.0.2 version: 2.4.0(prettier@3.3.2)(svelte@4.2.18) @@ -40,8 +37,8 @@ importers: specifier: ^7.20.5 version: 7.20.5 '@types/node': - specifier: ^14.18.34 - version: 14.18.63 + specifier: ^18.0.0 + version: 18.19.34 '@types/pug': specifier: ^2.0.6 version: 2.0.10 @@ -98,7 +95,7 @@ importers: version: 5.4.5 vitest: specifier: ^1.6.0 - version: 1.6.0(@types/node@14.18.63)(less@3.13.1)(sass@1.77.5)(stylus@0.55.0)(sugarss@4.0.1(postcss@8.4.38)) + version: 1.6.0(@types/node@18.19.34)(less@3.13.1)(sass@1.77.5)(stylus@0.55.0)(sugarss@4.0.1(postcss@8.4.38)) packages: @@ -1201,8 +1198,8 @@ packages: '@types/minimist@1.2.5': resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} - '@types/node@14.18.63': - resolution: {integrity: sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ==} + '@types/node@18.19.34': + resolution: {integrity: sha512-eXF4pfBNV5DAMKGbI02NnDtWrQ40hAN558/2vvS4gMpMIxaf6JmD7YjnZbq0Q9TDSSkKBamime8ewRoomHdt4g==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -4000,6 +3997,9 @@ packages: unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} + undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + unicode-canonical-property-names-ecmascript@2.0.0: resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==} engines: {node: '>=4'} @@ -5227,7 +5227,7 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 14.18.63 + '@types/node': 18.19.34 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -5241,14 +5241,14 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 14.18.63 + '@types/node': 18.19.34 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@14.18.63) + jest-config: 29.7.0(@types/node@18.19.34) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -5274,7 +5274,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 14.18.63 + '@types/node': 18.19.34 jest-mock: 29.7.0 optional: true @@ -5295,7 +5295,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 14.18.63 + '@types/node': 18.19.34 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -5319,7 +5319,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 14.18.63 + '@types/node': 18.19.34 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -5394,7 +5394,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 14.18.63 + '@types/node': 18.19.34 '@types/yargs': 17.0.32 chalk: 4.1.2 optional: true @@ -5416,7 +5416,7 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.4.15 - '@kiwi/eslint-config@2.4.0(eslint@8.57.0)(jest@29.7.0(@types/node@14.18.63))(prettier@3.3.2)(svelte@4.2.18)(typescript@5.4.5)': + '@kiwi/eslint-config@2.4.0(eslint@8.57.0)(jest@29.7.0(@types/node@18.19.34))(prettier@3.3.2)(svelte@4.2.18)(typescript@5.4.5)': dependencies: '@kiwi/eslint-plugin': 2.4.0(eslint@8.57.0) '@typescript-eslint/eslint-plugin': 7.13.0(@typescript-eslint/parser@7.13.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) @@ -5426,7 +5426,7 @@ snapshots: eslint-config-prettier: 9.1.0(eslint@8.57.0) eslint-plugin-cypress: 2.15.2(eslint@8.57.0) eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.13.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0) - eslint-plugin-jest: 27.9.0(@typescript-eslint/eslint-plugin@7.13.0(@typescript-eslint/parser@7.13.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(jest@29.7.0(@types/node@14.18.63))(typescript@5.4.5) + eslint-plugin-jest: 27.9.0(@typescript-eslint/eslint-plugin@7.13.0(@typescript-eslint/parser@7.13.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(jest@29.7.0(@types/node@18.19.34))(typescript@5.4.5) eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.0) eslint-plugin-node: 11.1.0(eslint@8.57.0) eslint-plugin-prettier: 5.1.3(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.2) @@ -5436,7 +5436,7 @@ snapshots: espree: 9.6.1 svelte-eslint-parser: 0.33.1(svelte@4.2.18) optionalDependencies: - jest: 29.7.0(@types/node@14.18.63) + jest: 29.7.0(@types/node@18.19.34) prettier: 3.3.2 svelte: 4.2.18 typescript: 5.4.5 @@ -5557,7 +5557,7 @@ snapshots: '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 14.18.63 + '@types/node': 18.19.34 optional: true '@types/istanbul-lib-coverage@2.0.6': @@ -5579,7 +5579,9 @@ snapshots: '@types/minimist@1.2.5': {} - '@types/node@14.18.63': {} + '@types/node@18.19.34': + dependencies: + undici-types: 5.26.5 '@types/normalize-package-data@2.4.4': {} @@ -5594,7 +5596,7 @@ snapshots: '@types/stylus@0.48.42': dependencies: - '@types/node': 14.18.63 + '@types/node': 18.19.34 '@types/yargs-parser@21.0.3': optional: true @@ -6456,13 +6458,13 @@ snapshots: path-type: 4.0.0 yaml: 1.10.2 - create-jest@29.7.0(@types/node@14.18.63): + create-jest@29.7.0(@types/node@18.19.34): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@14.18.63) + jest-config: 29.7.0(@types/node@18.19.34) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -6799,13 +6801,13 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@7.13.0(@typescript-eslint/parser@7.13.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(jest@29.7.0(@types/node@14.18.63))(typescript@5.4.5): + eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@7.13.0(@typescript-eslint/parser@7.13.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(jest@29.7.0(@types/node@18.19.34))(typescript@5.4.5): dependencies: '@typescript-eslint/utils': 5.62.0(eslint@8.57.0)(typescript@5.4.5) eslint: 8.57.0 optionalDependencies: '@typescript-eslint/eslint-plugin': 7.13.0(@typescript-eslint/parser@7.13.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) - jest: 29.7.0(@types/node@14.18.63) + jest: 29.7.0(@types/node@18.19.34) transitivePeerDependencies: - supports-color - typescript @@ -7508,7 +7510,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 14.18.63 + '@types/node': 18.19.34 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.3 @@ -7529,16 +7531,16 @@ snapshots: - supports-color optional: true - jest-cli@29.7.0(@types/node@14.18.63): + jest-cli@29.7.0(@types/node@18.19.34): dependencies: '@jest/core': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@14.18.63) + create-jest: 29.7.0(@types/node@18.19.34) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(@types/node@14.18.63) + jest-config: 29.7.0(@types/node@18.19.34) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -7549,7 +7551,7 @@ snapshots: - ts-node optional: true - jest-config@29.7.0(@types/node@14.18.63): + jest-config@29.7.0(@types/node@18.19.34): dependencies: '@babel/core': 7.24.7 '@jest/test-sequencer': 29.7.0 @@ -7574,7 +7576,7 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 14.18.63 + '@types/node': 18.19.34 transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -7607,7 +7609,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 14.18.63 + '@types/node': 18.19.34 jest-mock: 29.7.0 jest-util: 29.7.0 optional: true @@ -7619,7 +7621,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 14.18.63 + '@types/node': 18.19.34 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -7662,7 +7664,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 14.18.63 + '@types/node': 18.19.34 jest-util: 29.7.0 optional: true @@ -7702,7 +7704,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 14.18.63 + '@types/node': 18.19.34 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -7731,7 +7733,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 14.18.63 + '@types/node': 18.19.34 chalk: 4.1.2 cjs-module-lexer: 1.3.1 collect-v8-coverage: 1.0.2 @@ -7779,7 +7781,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 14.18.63 + '@types/node': 18.19.34 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -7800,7 +7802,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 14.18.63 + '@types/node': 18.19.34 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -7810,18 +7812,18 @@ snapshots: jest-worker@29.7.0: dependencies: - '@types/node': 14.18.63 + '@types/node': 18.19.34 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 optional: true - jest@29.7.0(@types/node@14.18.63): + jest@29.7.0(@types/node@18.19.34): dependencies: '@jest/core': 29.7.0 '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@14.18.63) + jest-cli: 29.7.0(@types/node@18.19.34) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -9043,6 +9045,8 @@ snapshots: has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 + undici-types@5.26.5: {} + unicode-canonical-property-names-ecmascript@2.0.0: {} unicode-match-property-ecmascript@2.0.0: @@ -9092,13 +9096,13 @@ snapshots: spdx-correct: 3.2.0 spdx-expression-parse: 3.0.1 - vite-node@1.6.0(@types/node@14.18.63)(less@3.13.1)(sass@1.77.5)(stylus@0.55.0)(sugarss@4.0.1(postcss@8.4.38)): + vite-node@1.6.0(@types/node@18.19.34)(less@3.13.1)(sass@1.77.5)(stylus@0.55.0)(sugarss@4.0.1(postcss@8.4.38)): dependencies: cac: 6.7.14 debug: 4.3.5 pathe: 1.1.2 picocolors: 1.0.1 - vite: 5.2.13(@types/node@14.18.63)(less@3.13.1)(sass@1.77.5)(stylus@0.55.0)(sugarss@4.0.1(postcss@8.4.38)) + vite: 5.2.13(@types/node@18.19.34)(less@3.13.1)(sass@1.77.5)(stylus@0.55.0)(sugarss@4.0.1(postcss@8.4.38)) transitivePeerDependencies: - '@types/node' - less @@ -9109,20 +9113,20 @@ snapshots: - supports-color - terser - vite@5.2.13(@types/node@14.18.63)(less@3.13.1)(sass@1.77.5)(stylus@0.55.0)(sugarss@4.0.1(postcss@8.4.38)): + vite@5.2.13(@types/node@18.19.34)(less@3.13.1)(sass@1.77.5)(stylus@0.55.0)(sugarss@4.0.1(postcss@8.4.38)): dependencies: esbuild: 0.20.2 postcss: 8.4.38 rollup: 4.18.0 optionalDependencies: - '@types/node': 14.18.63 + '@types/node': 18.19.34 fsevents: 2.3.3 less: 3.13.1 sass: 1.77.5 stylus: 0.55.0 sugarss: 4.0.1(postcss@8.4.38) - vitest@1.6.0(@types/node@14.18.63)(less@3.13.1)(sass@1.77.5)(stylus@0.55.0)(sugarss@4.0.1(postcss@8.4.38)): + vitest@1.6.0(@types/node@18.19.34)(less@3.13.1)(sass@1.77.5)(stylus@0.55.0)(sugarss@4.0.1(postcss@8.4.38)): dependencies: '@vitest/expect': 1.6.0 '@vitest/runner': 1.6.0 @@ -9141,11 +9145,11 @@ snapshots: strip-literal: 2.1.0 tinybench: 2.8.0 tinypool: 0.8.4 - vite: 5.2.13(@types/node@14.18.63)(less@3.13.1)(sass@1.77.5)(stylus@0.55.0)(sugarss@4.0.1(postcss@8.4.38)) - vite-node: 1.6.0(@types/node@14.18.63)(less@3.13.1)(sass@1.77.5)(stylus@0.55.0)(sugarss@4.0.1(postcss@8.4.38)) + vite: 5.2.13(@types/node@18.19.34)(less@3.13.1)(sass@1.77.5)(stylus@0.55.0)(sugarss@4.0.1(postcss@8.4.38)) + vite-node: 1.6.0(@types/node@18.19.34)(less@3.13.1)(sass@1.77.5)(stylus@0.55.0)(sugarss@4.0.1(postcss@8.4.38)) why-is-node-running: 2.2.2 optionalDependencies: - '@types/node': 14.18.63 + '@types/node': 18.19.34 transitivePeerDependencies: - less - lightningcss diff --git a/src/transformers/stylus.ts b/src/transformers/stylus.ts index e7678d4..15ca515 100644 --- a/src/transformers/stylus.ts +++ b/src/transformers/stylus.ts @@ -1,14 +1,10 @@ import path from 'path'; - import stylus from 'stylus'; - import { getIncludePaths } from '../modules/utils'; - -import type { SourceMap } from 'magic-string'; import type { Transformer, Options } from '../types'; type StylusRendererWithSourceMap = ReturnType & { - sourcemap: SourceMap; + sourcemap: any; }; const transformer: Transformer = ({ diff --git a/tsconfig.json b/tsconfig.json index 9e9ff3b..026128f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,7 +9,7 @@ "lib": ["es2018"], "declaration": true, "skipLibCheck": true, - "types": ["jest", "node"], + "types": ["node"], "outDir": "dist" }, "include": ["**/*.ts"],