From 17f9527ab497e7d3e7558bd91cd8877d52ff6a9a Mon Sep 17 00:00:00 2001 From: Alex <8125011+alex-kinokon@users.noreply.github.com> Date: Wed, 5 Feb 2025 22:02:20 -0500 Subject: [PATCH] Fix --- package.json | 8 ++++---- pnpm-lock.yaml | 43 +++++-------------------------------------- src/babel/index.ts | 3 ++- 3 files changed, 11 insertions(+), 43 deletions(-) diff --git a/package.json b/package.json index 7f7c956..43e724f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@aet/tailwind", - "version": "1.0.24", + "version": "1.0.25", "license": "MIT", "type": "module", "scripts": { @@ -35,7 +35,6 @@ "devDependencies": { "@aet/eslint-rules": "2.0.36", "@types/babel__core": "^7.20.5", - "@types/babel__traverse": "^7.20.6", "@types/bun": "^1.2.2", "@types/dedent": "^0.7.2", "@types/lodash-es": "^4.17.12", @@ -85,7 +84,8 @@ }, "pnpm": { "overrides": { - "is-core-module": "npm:@nolyfill/is-core-module@^1" + "is-core-module": "npm:@nolyfill/is-core-module@^1", + "@babel/types": "7.26.7" } } -} +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 48365dc..96f67e1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,6 +6,7 @@ settings: overrides: is-core-module: npm:@nolyfill/is-core-module@^1 + '@babel/types': 7.26.7 importers: @@ -45,15 +46,9 @@ importers: '@aet/eslint-rules': specifier: 2.0.36 version: 2.0.36(eslint@9.19.0(jiti@2.4.2))(ts-api-utils@2.0.1(typescript@5.7.3))(typescript@5.7.3) - '@babel/traverse': - specifier: ^7.26.7 - version: 7.26.7 '@types/babel__core': specifier: ^7.20.5 version: 7.20.5 - '@types/babel__traverse': - specifier: ^7.20.6 - version: 7.20.6 '@types/bun': specifier: ^1.2.2 version: 1.2.2 @@ -178,18 +173,10 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-string-parser@7.24.8': - resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==} - engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.25.9': resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.24.7': - resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} - engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.25.9': resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} engines: {node: '>=6.9.0'} @@ -220,10 +207,6 @@ packages: resolution: {integrity: sha512-1x1sgeyRLC3r5fQOM0/xtQKsYjyxmFjaOrLJNtZ81inNjyJHGIolTULPiSc/2qe1/qfpFLisLQYFnnZl7QoedA==} engines: {node: '>=6.9.0'} - '@babel/types@7.25.2': - resolution: {integrity: sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q==} - engines: {node: '>=6.9.0'} - '@babel/types@7.26.7': resolution: {integrity: sha512-t8kDRGrKXyp6+tjUh7hw2RLyclsW4TRoRvRHtSyAX9Bb5ldlFh+90YAYY6awRXrlB4G5G2izNeGySpATlFzmOg==} engines: {node: '>=6.9.0'} @@ -2118,10 +2101,6 @@ packages: resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==} engines: {node: '>=14.0.0'} - to-fast-properties@2.0.0: - resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} - engines: {node: '>=4'} - to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -2477,12 +2456,8 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-string-parser@7.24.8': {} - '@babel/helper-string-parser@7.25.9': {} - '@babel/helper-validator-identifier@7.24.7': {} - '@babel/helper-validator-identifier@7.25.9': {} '@babel/helper-validator-option@7.25.9': {} @@ -2494,7 +2469,7 @@ snapshots: '@babel/parser@7.25.3': dependencies: - '@babel/types': 7.25.2 + '@babel/types': 7.26.7 '@babel/parser@7.26.7': dependencies: @@ -2518,12 +2493,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/types@7.25.2': - dependencies: - '@babel/helper-string-parser': 7.24.8 - '@babel/helper-validator-identifier': 7.24.7 - to-fast-properties: 2.0.0 - '@babel/types@7.26.7': dependencies: '@babel/helper-string-parser': 7.25.9 @@ -2932,19 +2901,19 @@ snapshots: '@types/babel__core@7.20.5': dependencies: '@babel/parser': 7.25.3 - '@babel/types': 7.25.2 + '@babel/types': 7.26.7 '@types/babel__generator': 7.6.8 '@types/babel__template': 7.4.4 '@types/babel__traverse': 7.20.6 '@types/babel__generator@7.6.8': dependencies: - '@babel/types': 7.25.2 + '@babel/types': 7.26.7 '@types/babel__template@7.4.4': dependencies: '@babel/parser': 7.25.3 - '@babel/types': 7.25.2 + '@babel/types': 7.26.7 '@types/babel__traverse@7.20.6': dependencies: @@ -4394,8 +4363,6 @@ snapshots: tinyspy@3.0.2: {} - to-fast-properties@2.0.0: {} - to-regex-range@5.0.1: dependencies: is-number: 7.0.0 diff --git a/src/babel/index.ts b/src/babel/index.ts index fa7e89d..f613c57 100644 --- a/src/babel/index.ts +++ b/src/babel/index.ts @@ -2,7 +2,6 @@ import { basename, dirname, extname, join } from "node:path"; import type b from "@babel/core"; import { type NodePath, type types as t } from "@babel/core"; -import type { Scope } from "@babel/traverse"; import hash from "@emotion/hash"; import invariant from "tiny-invariant"; @@ -16,6 +15,8 @@ export type ClassNameCollector = (path: string, entries: StyleMapEntry[]) => voi type BabelTypes = typeof b.types; type Type = "css" | "js"; +type Scope = ReturnType; + export type BabelPluginUtils = ReturnType; interface Import {