From b0e4dda39ddf90941a82353310449de6830b54e8 Mon Sep 17 00:00:00 2001 From: p0nch000 Date: Mon, 16 Dec 2024 19:51:45 +0100 Subject: [PATCH 1/5] Considered deno.json, fix pr review comments Fixed flow and prettier tests failing Correct install of json5 dependency fix: Resolve alias paths to absolute paths --- flow-typed/json5.js | 29 +++ .../stylex-transform-alias-config-test.js | 177 +++++++++++++++++ packages/@stylexjs/babel-plugin/package.json | 3 +- .../babel-plugin/src/utils/state-manager.js | 180 ++++++++++++++++-- 4 files changed, 377 insertions(+), 12 deletions(-) create mode 100644 flow-typed/json5.js create mode 100644 packages/@stylexjs/babel-plugin/__tests__/stylex-transform-alias-config-test.js diff --git a/flow-typed/json5.js b/flow-typed/json5.js new file mode 100644 index 000000000..56187dfda --- /dev/null +++ b/flow-typed/json5.js @@ -0,0 +1,29 @@ +// @flow +type TSConfig = { + compilerOptions?: { + baseUrl?: string, + paths?: { [key: string]: Array }, + }, +}; + +type DenoConfig = { + imports?: { [key: string]: string | Array }, +}; + +type PackageJSON = { + name?: string, + imports?: { [key: string]: string | Array }, +}; + +type ConfigType = TSConfig | DenoConfig | PackageJSON; + +declare module 'json5' { + declare module.exports: { + parse: (input: string) => mixed, + stringify: ( + value: mixed, + replacer?: ?Function | ?Array, + space?: string | number, + ) => string, + }; +} diff --git a/packages/@stylexjs/babel-plugin/__tests__/stylex-transform-alias-config-test.js b/packages/@stylexjs/babel-plugin/__tests__/stylex-transform-alias-config-test.js new file mode 100644 index 000000000..64c86eaa9 --- /dev/null +++ b/packages/@stylexjs/babel-plugin/__tests__/stylex-transform-alias-config-test.js @@ -0,0 +1,177 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + */ + +'use strict'; + +import path from 'path'; +import fs from 'fs'; +import os from 'os'; +import StateManager from '../src/utils/state-manager'; + +describe('StyleX Alias Configuration', () => { + let tmpDir; + let state; + + beforeEach(() => { + // Create a temporary directory for our test files + tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'stylex-test-')); + + // Create a mock babel state + state = { + file: { + metadata: {}, + }, + filename: path.join(tmpDir, 'src/components/Button.js'), + }; + }); + + afterEach(() => { + // Clean up temporary directory + fs.rmSync(tmpDir, { recursive: true, force: true }); + }); + + const setupFiles = (files) => { + for (const [filePath, content] of Object.entries(files)) { + const fullPath = path.join(tmpDir, filePath); + fs.mkdirSync(path.dirname(fullPath), { recursive: true }); + fs.writeFileSync(fullPath, JSON.stringify(content, null, 2)); + } + }; + + test('discovers aliases from package.json imports', () => { + setupFiles({ + 'package.json': { + name: 'test-package', + imports: { + '#components': './src/components', + '#utils/*': './src/utils/*', + }, + }, + }); + + const manager = new StateManager(state); + + expect(manager.options.aliases).toEqual({ + components: ['./src/components'], + 'utils/*': ['./src/utils/*'], + }); + }); + + test('discovers aliases from tsconfig.json', () => { + setupFiles({ + 'package.json': { name: 'test-package' }, + 'tsconfig.json': { + compilerOptions: { + baseUrl: '.', + paths: { + '@components/*': ['src/components/*'], + '@utils/*': ['src/utils/*'], + }, + }, + }, + }); + + const manager = new StateManager(state); + + expect(manager.options.aliases).toEqual({ + '@components': ['src/components'], + '@utils': ['src/utils'], + }); + }); + + test('discovers aliases from deno.json', () => { + setupFiles({ + 'package.json': { name: 'test-package' }, + 'deno.json': { + imports: { + '@components/': './src/components/', + '@utils/': './src/utils/', + }, + }, + }); + + const manager = new StateManager(state); + + expect(manager.options.aliases).toEqual({ + '@components/': ['./src/components/'], + '@utils/': ['./src/utils/'], + }); + }); + + test('merges aliases from all config files', () => { + setupFiles({ + 'package.json': { + name: 'test-package', + imports: { + '#components': './src/components', + }, + }, + 'tsconfig.json': { + compilerOptions: { + baseUrl: '.', + paths: { + '@utils/*': ['src/utils/*'], + }, + }, + }, + 'deno.json': { + imports: { + '@styles/': './src/styles/', + }, + }, + }); + + const manager = new StateManager(state); + + expect(manager.options.aliases).toEqual({ + components: ['./src/components'], + '@utils': ['src/utils'], + '@styles/': ['./src/styles/'], + }); + }); + + test('manual configuration overrides discovered aliases', () => { + setupFiles({ + 'package.json': { + name: 'test-package', + imports: { + '#components': './src/components', + }, + }, + }); + + state.opts = { + aliases: { + components: './custom/path', + }, + }; + + const manager = new StateManager(state); + + expect(manager.options.aliases).toEqual({ + components: ['./custom/path'], + }); + }); + + test('handles missing configuration files gracefully', () => { + const manager = new StateManager(state); + expect(manager.options.aliases).toBeNull(); + }); + + test('handles invalid JSON files gracefully', () => { + setupFiles({ + 'package.json': '{invalid json', + 'tsconfig.json': '{also invalid', + 'deno.json': '{more invalid', + }); + + const manager = new StateManager(state); + expect(manager.options.aliases).toBeNull(); + }); +}); diff --git a/packages/@stylexjs/babel-plugin/package.json b/packages/@stylexjs/babel-plugin/package.json index 77a38be88..715a413dd 100644 --- a/packages/@stylexjs/babel-plugin/package.json +++ b/packages/@stylexjs/babel-plugin/package.json @@ -22,7 +22,8 @@ "@babel/types": "^7.26.8", "@dual-bundle/import-meta-resolve": "^4.1.0", "@stylexjs/stylex": "0.14.1", - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.1.0", + "json5": "^2.2.3" }, "devDependencies": { "@rollup/plugin-alias": "^5.1.1", diff --git a/packages/@stylexjs/babel-plugin/src/utils/state-manager.js b/packages/@stylexjs/babel-plugin/src/utils/state-manager.js index 69bab89c2..0d6b3c0dd 100644 --- a/packages/@stylexjs/babel-plugin/src/utils/state-manager.js +++ b/packages/@stylexjs/babel-plugin/src/utils/state-manager.js @@ -24,6 +24,7 @@ import url from 'url'; import * as z from './validate'; import { addDefault, addNamed } from '@babel/helper-module-imports'; import { moduleResolve } from '@dual-bundle/import-meta-resolve'; +import JSON5 from 'json5'; type ImportAdditionOptions = Omit< Partial, @@ -322,17 +323,7 @@ export default class StateManager { 'options.aliases', ); - const aliases: StyleXStateOptions['aliases'] = - aliasesOption == null - ? aliasesOption - : Object.fromEntries( - Object.entries(aliasesOption).map(([key, value]) => { - if (typeof value === 'string') { - return [key, [value]]; - } - return [key, value]; - }), - ); + const aliases = this.loadAliases(aliasesOption); const opts: StyleXStateOptions = { aliases, @@ -725,6 +716,141 @@ export default class StateManager { ): void { this.styleVarsToKeep.add(memberExpression); } + + loadAliases( + manualAliases: ?$ReadOnly<{ [string]: string | $ReadOnlyArray }>, + ): ?$ReadOnly<{ [string]: $ReadOnlyArray }> { + if (!this.filename) { + return manualAliases ? this.normalizeAliases(manualAliases) : null; + } + + let packageAliases = {}; + let tsconfigAliases = {}; + let denoAliases = {}; + + const pkgInfo = this.getPackageNameAndPath(this.filename); + if (!pkgInfo) { + return manualAliases ? this.normalizeAliases(manualAliases) : null; + } + + const [_packageName, projectDir] = pkgInfo; + + const resolveAliasPaths = (value: string | $ReadOnlyArray) => + (Array.isArray(value) ? value : [value]).map((p) => { + const endsWithStar = p.endsWith('/*'); + let basePath = p.replace(/\/\*$/, ''); + if (basePath.startsWith('.')) { + basePath = path.resolve(projectDir, basePath); + } + if (endsWithStar) { + basePath = basePath.endsWith('/') ? basePath + '*' : basePath + '/*'; + } + return basePath; + }); + + // Load aliases from package.json imports field + try { + const packageJsonPath = path.join(projectDir, 'package.json'); + if (fs.existsSync(packageJsonPath)) { + const rawConfig: mixed = JSON5.parse( + fs.readFileSync(packageJsonPath, 'utf8'), + ); + if (!isPackageJSON(rawConfig)) { + throw new Error('Invalid package.json format'); + } + const packageJson: PackageJSON = rawConfig as $FlowFixMe; + + // Handle Node.js native imports + const imports = packageJson.imports; + if (imports && typeof imports === 'object') { + packageAliases = Object.fromEntries( + Object.entries(imports) + .filter(([key]) => key.startsWith('#')) + .map(([key, value]) => [key.slice(1), resolveAliasPaths(value)]), + ); + } + } + } catch (err) { + console.warn('Failed to load aliases from package.json:', err.message); + } + + // Load aliases from tsconfig.json + try { + const tsconfigPath = path.join(projectDir, 'tsconfig.json'); + if (fs.existsSync(tsconfigPath)) { + const rawConfig: mixed = JSON5.parse( + fs.readFileSync(tsconfigPath, 'utf8'), + ); + if (!isTSConfig(rawConfig)) { + throw new Error('Invalid tsconfig.json format'); + } + const tsconfig: TSConfig = rawConfig as $FlowFixMe; + const tsConfigAliasPaths = tsconfig.compilerOptions?.paths; + if (tsConfigAliasPaths != null && isImportsObject(tsConfigAliasPaths)) { + tsconfigAliases = Object.fromEntries( + Object.entries(tsConfigAliasPaths).map(([key, value]) => [ + key, + resolveAliasPaths(value), + ]), + ); + } + } + } catch (err) { + console.warn('Failed to load aliases from tsconfig.json:', err.message); + } + + // Load aliases from deno.json + try { + const denoConfigPath = path.join(projectDir, 'deno.json'); + if (fs.existsSync(denoConfigPath)) { + const rawConfig: mixed = JSON5.parse( + fs.readFileSync(denoConfigPath, 'utf8'), + ); + if (!isDenoConfig(rawConfig)) { + throw new Error('Invalid deno.json format'); + } + const denoConfig: DenoConfig = rawConfig as $FlowFixMe; + if (denoConfig.imports) { + denoAliases = Object.fromEntries( + Object.entries(denoConfig.imports).map(([key, value]) => { + return [key, resolveAliasPaths(value)]; + }), + ); + } + } + } catch (err) { + console.warn('Failed to load aliases from deno.json:', err.message); + } + + // Merge aliases in priority: manual > package.json > tsconfig.json > deno.json + const mergedAliases = { + ...denoAliases, + ...tsconfigAliases, + ...packageAliases, + ...(manualAliases || {}), + }; + + return Object.keys(mergedAliases).length > 0 + ? this.normalizeAliases(mergedAliases) + : null; + } + + normalizeAliases( + aliases: $ReadOnly<{ [string]: string | $ReadOnlyArray }>, + ): $ReadOnly<{ [string]: $ReadOnlyArray }> { + return Object.fromEntries( + Object.entries(aliases).map(([key, value]) => [ + key, + Array.isArray(value) + ? value.map((p) => this.normalizePath(p)) + : [this.normalizePath(value)], + ]), + ); + } + + normalizePath(filePath: string): string { + return filePath.split(path.sep).join('/'); + } } function possibleAliasedPaths( @@ -864,3 +990,35 @@ function toPosixPath(filePath: string): string { function formatRelativePath(filePath: string) { return filePath.startsWith('.') ? filePath : './' + filePath; } + +function isImportsObject(obj: mixed): implies obj is { ... } { + return obj != null && typeof obj === 'object'; +} + +function isPackageJSON(obj: mixed): implies obj is { +imports: mixed, ... } { + return ( + obj != null && + typeof obj === 'object' && + (!('imports' in obj) || typeof obj.imports === 'object') + ); +} + +function isTSConfig( + obj: mixed, +): implies obj is { +compilerOptions: mixed, ... } { + return ( + obj != null && + typeof obj === 'object' && + 'compilerOptions' in obj && + obj.compilerOptions != null && + typeof obj.compilerOptions === 'object' + ); +} + +function isDenoConfig(obj: mixed): implies obj is { +imports: mixed, ... } { + return ( + obj != null && + typeof obj === 'object' && + (!('imports' in obj) || typeof obj.imports === 'object') + ); +} From 509ee2debdf36584df88eddd6fbed45eca40269e Mon Sep 17 00:00:00 2001 From: Naman Goel Date: Sun, 9 Feb 2025 21:09:53 -0800 Subject: [PATCH 2/5] fix: update tests and detect *all* relative paths --- .../stylex-transform-alias-config-test.js | 22 +++++++++---------- .../babel-plugin/src/utils/state-manager.js | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/@stylexjs/babel-plugin/__tests__/stylex-transform-alias-config-test.js b/packages/@stylexjs/babel-plugin/__tests__/stylex-transform-alias-config-test.js index 64c86eaa9..2b0da886a 100644 --- a/packages/@stylexjs/babel-plugin/__tests__/stylex-transform-alias-config-test.js +++ b/packages/@stylexjs/babel-plugin/__tests__/stylex-transform-alias-config-test.js @@ -58,8 +58,8 @@ describe('StyleX Alias Configuration', () => { const manager = new StateManager(state); expect(manager.options.aliases).toEqual({ - components: ['./src/components'], - 'utils/*': ['./src/utils/*'], + components: [path.join(tmpDir, './src/components')], + 'utils/*': [path.join(tmpDir, './src/utils/*')], }); }); @@ -80,8 +80,8 @@ describe('StyleX Alias Configuration', () => { const manager = new StateManager(state); expect(manager.options.aliases).toEqual({ - '@components': ['src/components'], - '@utils': ['src/utils'], + '@components/*': [path.join(tmpDir, 'src/components/*')], + '@utils/*': [path.join(tmpDir, 'src/utils/*')], }); }); @@ -99,8 +99,8 @@ describe('StyleX Alias Configuration', () => { const manager = new StateManager(state); expect(manager.options.aliases).toEqual({ - '@components/': ['./src/components/'], - '@utils/': ['./src/utils/'], + '@components/': [path.join(tmpDir, 'src/components')], + '@utils/': [path.join(tmpDir, 'src/utils')], }); }); @@ -130,9 +130,9 @@ describe('StyleX Alias Configuration', () => { const manager = new StateManager(state); expect(manager.options.aliases).toEqual({ - components: ['./src/components'], - '@utils': ['src/utils'], - '@styles/': ['./src/styles/'], + components: [path.join(tmpDir, 'src/components')], + '@utils/*': [path.join(tmpDir, 'src/utils/*')], + '@styles/': [path.join(tmpDir, 'src/styles')], }); }); @@ -148,14 +148,14 @@ describe('StyleX Alias Configuration', () => { state.opts = { aliases: { - components: './custom/path', + components: path.join(tmpDir, 'custom/path'), }, }; const manager = new StateManager(state); expect(manager.options.aliases).toEqual({ - components: ['./custom/path'], + components: [path.join(tmpDir, 'custom/path')], }); }); diff --git a/packages/@stylexjs/babel-plugin/src/utils/state-manager.js b/packages/@stylexjs/babel-plugin/src/utils/state-manager.js index 0d6b3c0dd..e9d0a91d4 100644 --- a/packages/@stylexjs/babel-plugin/src/utils/state-manager.js +++ b/packages/@stylexjs/babel-plugin/src/utils/state-manager.js @@ -739,7 +739,7 @@ export default class StateManager { (Array.isArray(value) ? value : [value]).map((p) => { const endsWithStar = p.endsWith('/*'); let basePath = p.replace(/\/\*$/, ''); - if (basePath.startsWith('.')) { + if (!path.isAbsolute(basePath)) { basePath = path.resolve(projectDir, basePath); } if (endsWithStar) { From 9173a70e54bb536de2364e14ad2aa558b76519b1 Mon Sep 17 00:00:00 2001 From: Naman Goel Date: Wed, 12 Feb 2025 21:13:25 -0800 Subject: [PATCH 3/5] chore: reduce code duplication --- .../babel-plugin/src/utils/state-manager.js | 139 ++++++++---------- 1 file changed, 61 insertions(+), 78 deletions(-) diff --git a/packages/@stylexjs/babel-plugin/src/utils/state-manager.js b/packages/@stylexjs/babel-plugin/src/utils/state-manager.js index e9d0a91d4..86c396412 100644 --- a/packages/@stylexjs/babel-plugin/src/utils/state-manager.js +++ b/packages/@stylexjs/babel-plugin/src/utils/state-manager.js @@ -724,10 +724,6 @@ export default class StateManager { return manualAliases ? this.normalizeAliases(manualAliases) : null; } - let packageAliases = {}; - let tsconfigAliases = {}; - let denoAliases = {}; - const pkgInfo = this.getPackageNameAndPath(this.filename); if (!pkgInfo) { return manualAliases ? this.normalizeAliases(manualAliases) : null; @@ -748,86 +744,73 @@ export default class StateManager { return basePath; }); - // Load aliases from package.json imports field - try { - const packageJsonPath = path.join(projectDir, 'package.json'); - if (fs.existsSync(packageJsonPath)) { - const rawConfig: mixed = JSON5.parse( - fs.readFileSync(packageJsonPath, 'utf8'), - ); - if (!isPackageJSON(rawConfig)) { - throw new Error('Invalid package.json format'); - } - const packageJson: PackageJSON = rawConfig as $FlowFixMe; - - // Handle Node.js native imports - const imports = packageJson.imports; - if (imports && typeof imports === 'object') { - packageAliases = Object.fromEntries( - Object.entries(imports) - .filter(([key]) => key.startsWith('#')) - .map(([key, value]) => [key.slice(1), resolveAliasPaths(value)]), - ); - } - } - } catch (err) { - console.warn('Failed to load aliases from package.json:', err.message); - } - - // Load aliases from tsconfig.json - try { - const tsconfigPath = path.join(projectDir, 'tsconfig.json'); - if (fs.existsSync(tsconfigPath)) { - const rawConfig: mixed = JSON5.parse( - fs.readFileSync(tsconfigPath, 'utf8'), - ); - if (!isTSConfig(rawConfig)) { - throw new Error('Invalid tsconfig.json format'); - } - const tsconfig: TSConfig = rawConfig as $FlowFixMe; - const tsConfigAliasPaths = tsconfig.compilerOptions?.paths; - if (tsConfigAliasPaths != null && isImportsObject(tsConfigAliasPaths)) { - tsconfigAliases = Object.fromEntries( - Object.entries(tsConfigAliasPaths).map(([key, value]) => [ - key, - resolveAliasPaths(value), - ]), - ); - } - } - } catch (err) { - console.warn('Failed to load aliases from tsconfig.json:', err.message); - } - - // Load aliases from deno.json - try { - const denoConfigPath = path.join(projectDir, 'deno.json'); - if (fs.existsSync(denoConfigPath)) { - const rawConfig: mixed = JSON5.parse( - fs.readFileSync(denoConfigPath, 'utf8'), - ); - if (!isDenoConfig(rawConfig)) { - throw new Error('Invalid deno.json format'); - } - const denoConfig: DenoConfig = rawConfig as $FlowFixMe; - if (denoConfig.imports) { - denoAliases = Object.fromEntries( - Object.entries(denoConfig.imports).map(([key, value]) => { - return [key, resolveAliasPaths(value)]; - }), - ); + const [packageAliases, tsconfigAliases, denoAliases] = [ + [ + 'package.json', + (rawConfig: mixed) => { + if (!isPackageJSON(rawConfig)) { + throw new Error('Invalid package.json format'); + } + return rawConfig.imports; + }, + ], + [ + 'tsconfig.json', + (rawConfig: mixed) => { + if (!isTSConfig(rawConfig)) { + throw new Error('Invalid tsconfig.json format'); + } + const config = rawConfig as $FlowFixMe; + return config.compilerOptions?.paths; + }, + ], + [ + 'deno.json', + (rawConfig: mixed) => { + if (!isDenoConfig(rawConfig)) { + throw new Error('Invalid deno.json format'); + } + return rawConfig.imports; + }, + ], + ].map( + ([fileName, getConfig]): $ReadOnly<{ + [string]: string | $ReadOnlyArray, + }> => { + try { + const filePath = path.join(projectDir, fileName); + if (fs.existsSync(filePath)) { + const rawConfig: mixed = JSON5.parse( + fs.readFileSync(filePath, 'utf8'), + ); + const config = getConfig(rawConfig); + + // Handle Node.js native imports + if (isImportsObject(config)) { + return Object.fromEntries( + Object.entries(config).map(([k, v]) => [ + k, + resolveAliasPaths(v as $FlowFixMe), + ]), + ) as $ReadOnly<{ [string]: $ReadOnlyArray }>; + } + } + return {}; + } catch (err) { + console.warn(`Failed to load aliases from ${fileName}`, err.message); } - } - } catch (err) { - console.warn('Failed to load aliases from deno.json:', err.message); - } + return {}; + }, + ); // Merge aliases in priority: manual > package.json > tsconfig.json > deno.json - const mergedAliases = { + const mergedAliases: { + [string]: string | $ReadOnlyArray, + } = { ...denoAliases, ...tsconfigAliases, ...packageAliases, - ...(manualAliases || {}), + ...manualAliases, }; return Object.keys(mergedAliases).length > 0 From 531de446dc268da6052b41276cbc8f6009988477 Mon Sep 17 00:00:00 2001 From: Naman Goel Date: Wed, 12 Feb 2025 22:52:26 -0800 Subject: [PATCH 4/5] chore: fix tests --- .../__tests__/stylex-transform-alias-config-test.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/@stylexjs/babel-plugin/__tests__/stylex-transform-alias-config-test.js b/packages/@stylexjs/babel-plugin/__tests__/stylex-transform-alias-config-test.js index 2b0da886a..1821542b1 100644 --- a/packages/@stylexjs/babel-plugin/__tests__/stylex-transform-alias-config-test.js +++ b/packages/@stylexjs/babel-plugin/__tests__/stylex-transform-alias-config-test.js @@ -58,8 +58,8 @@ describe('StyleX Alias Configuration', () => { const manager = new StateManager(state); expect(manager.options.aliases).toEqual({ - components: [path.join(tmpDir, './src/components')], - 'utils/*': [path.join(tmpDir, './src/utils/*')], + '#components': [path.join(tmpDir, './src/components')], + '#utils/*': [path.join(tmpDir, './src/utils/*')], }); }); @@ -130,7 +130,7 @@ describe('StyleX Alias Configuration', () => { const manager = new StateManager(state); expect(manager.options.aliases).toEqual({ - components: [path.join(tmpDir, 'src/components')], + '#components': [path.join(tmpDir, 'src/components')], '@utils/*': [path.join(tmpDir, 'src/utils/*')], '@styles/': [path.join(tmpDir, 'src/styles')], }); @@ -155,6 +155,7 @@ describe('StyleX Alias Configuration', () => { const manager = new StateManager(state); expect(manager.options.aliases).toEqual({ + '#components': [path.join(tmpDir, 'src/components')], components: [path.join(tmpDir, 'custom/path')], }); }); From 0a17112ce41df177f97d5c6efc9546cb72746d5b Mon Sep 17 00:00:00 2001 From: Naman Goel Date: Sun, 13 Jul 2025 14:09:22 +0530 Subject: [PATCH 5/5] rebase and fix test --- package-lock.json | 1 + ...ansform-alias-config-test.js => options-alias-config-test.js} | 0 2 files changed, 1 insertion(+) rename packages/@stylexjs/babel-plugin/__tests__/{stylex-transform-alias-config-test.js => options-alias-config-test.js} (100%) diff --git a/package-lock.json b/package-lock.json index a3ead274f..2b25ef2d7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26940,6 +26940,7 @@ "@babel/types": "^7.26.8", "@dual-bundle/import-meta-resolve": "^4.1.0", "@stylexjs/stylex": "0.14.1", + "json5": "^2.2.3", "postcss-value-parser": "^4.1.0" }, "devDependencies": { diff --git a/packages/@stylexjs/babel-plugin/__tests__/stylex-transform-alias-config-test.js b/packages/@stylexjs/babel-plugin/__tests__/options-alias-config-test.js similarity index 100% rename from packages/@stylexjs/babel-plugin/__tests__/stylex-transform-alias-config-test.js rename to packages/@stylexjs/babel-plugin/__tests__/options-alias-config-test.js