From 5ee835cc85b4ce62c7d6d1d689a4d8bee7e751e4 Mon Sep 17 00:00:00 2001 From: Brijesh Bittu Date: Tue, 5 Mar 2024 11:39:40 +0530 Subject: [PATCH] [pigment] Update to latest wyw version --- packages/pigment-react/package.json | 6 +-- packages/pigment-react/tests/pigment.test.ts | 25 ++++++----- packages/pigment-unplugin/package.json | 4 +- packages/pigment-vite-plugin/package.json | 4 +- pnpm-lock.yaml | 46 ++++++++++---------- renovate.json | 4 ++ 6 files changed, 47 insertions(+), 42 deletions(-) diff --git a/packages/pigment-react/package.json b/packages/pigment-react/package.json index 7dce298fabfabc..f9de3556d7405d 100644 --- a/packages/pigment-react/package.json +++ b/packages/pigment-react/package.json @@ -40,9 +40,9 @@ "@emotion/styled": "^11.11.0", "@emotion/react": "^11.11.4", "@mui/system": "workspace:^", - "@wyw-in-js/processor-utils": "^0.4.1", - "@wyw-in-js/shared": "^0.4.1", - "@wyw-in-js/transform": "^0.4.1", + "@wyw-in-js/processor-utils": "^0.5.0", + "@wyw-in-js/shared": "^0.5.0", + "@wyw-in-js/transform": "^0.5.0", "clsx": "^2.1.0", "cssesc": "^3.0.0", "csstype": "^3.1.3", diff --git a/packages/pigment-react/tests/pigment.test.ts b/packages/pigment-react/tests/pigment.test.ts index 11d4168a2e5ab4..34addd06ead91f 100644 --- a/packages/pigment-react/tests/pigment.test.ts +++ b/packages/pigment-react/tests/pigment.test.ts @@ -48,23 +48,24 @@ describe('zero-runtime', () => { const outputContent = fs.readFileSync(outputFilePath, 'utf8'); const outputCssContent = fs.readFileSync(outputCssFilePath, 'utf8'); + const pluginOptions = { + themeArgs: { + theme, + }, + babelOptions: { + configFile: false, + babelrc: false, + }, + tagResolver(_source: string, tag: string) { + return require.resolve(`../exports/${tag}`); + }, + }; const result = await transform( { options: { filename: inputFilePath, preprocessor, - pluginOptions: { - themeArgs: { - theme, - }, - babelOptions: { - configFile: false, - babelrc: false, - }, - tagResolver(_source, tag) { - return require.resolve(`../exports/${tag}`); - }, - }, + pluginOptions, }, cache, eventEmitter, diff --git a/packages/pigment-unplugin/package.json b/packages/pigment-unplugin/package.json index 865a30495c7a5c..b42ca85edcb7e1 100644 --- a/packages/pigment-unplugin/package.json +++ b/packages/pigment-unplugin/package.json @@ -30,8 +30,8 @@ "dependencies": { "@babel/core": "^7.23.9", "@pigment-css/react": "workspace:^", - "@wyw-in-js/shared": "^0.4.1", - "@wyw-in-js/transform": "^0.4.1", + "@wyw-in-js/shared": "^0.5.0", + "@wyw-in-js/transform": "^0.5.0", "babel-plugin-transform-react-remove-prop-types": "^0.4.24", "unplugin": "^1.7.1" }, diff --git a/packages/pigment-vite-plugin/package.json b/packages/pigment-vite-plugin/package.json index a5586e8be4b596..d91e7618636110 100644 --- a/packages/pigment-vite-plugin/package.json +++ b/packages/pigment-vite-plugin/package.json @@ -31,8 +31,8 @@ "@babel/core": "^7.23.9", "@babel/preset-typescript": "^7.23.3", "@pigment-css/react": "workspace:^", - "@wyw-in-js/shared": "^0.4.1", - "@wyw-in-js/transform": "^0.4.1", + "@wyw-in-js/shared": "^0.5.0", + "@wyw-in-js/transform": "^0.5.0", "babel-plugin-transform-react-remove-prop-types": "^0.4.24" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1eb766b4f36d95..5c14b8dda01161 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2128,14 +2128,14 @@ importers: specifier: workspace:^ version: link:../mui-system/build '@wyw-in-js/processor-utils': - specifier: ^0.4.1 - version: 0.4.1 + specifier: ^0.5.0 + version: 0.5.0 '@wyw-in-js/shared': - specifier: ^0.4.1 - version: 0.4.1 + specifier: ^0.5.0 + version: 0.5.0 '@wyw-in-js/transform': - specifier: ^0.4.1 - version: 0.4.1 + specifier: ^0.5.0 + version: 0.5.0 clsx: specifier: ^2.1.0 version: 2.1.0 @@ -2192,11 +2192,11 @@ importers: specifier: workspace:^ version: link:../pigment-react '@wyw-in-js/shared': - specifier: ^0.4.1 - version: 0.4.1 + specifier: ^0.5.0 + version: 0.5.0 '@wyw-in-js/transform': - specifier: ^0.4.1 - version: 0.4.1 + specifier: ^0.5.0 + version: 0.5.0 babel-plugin-transform-react-remove-prop-types: specifier: ^0.4.24 version: 0.4.24 @@ -2220,11 +2220,11 @@ importers: specifier: workspace:^ version: link:../pigment-react '@wyw-in-js/shared': - specifier: ^0.4.1 - version: 0.4.1 + specifier: ^0.5.0 + version: 0.5.0 '@wyw-in-js/transform': - specifier: ^0.4.1 - version: 0.4.1 + specifier: ^0.5.0 + version: 0.5.0 babel-plugin-transform-react-remove-prop-types: specifier: ^0.4.24 version: 0.4.24 @@ -8106,18 +8106,18 @@ packages: webpack: 5.90.3(esbuild@0.19.11)(webpack-cli@5.1.4) webpack-cli: 5.1.4(webpack-bundle-analyzer@4.10.1)(webpack@5.90.3) - /@wyw-in-js/processor-utils@0.4.1: - resolution: {integrity: sha512-0MVgPC3Svplm2WB4G4eSLLfx8n1EaIpClMXqNcTmfyrFcpLjYYcSXDP7aVgQVvy5wQCqqq+EmPbnU6yXq8X19w==} + /@wyw-in-js/processor-utils@0.5.0: + resolution: {integrity: sha512-3sRwuDTMy2GmD+44bhCTcBasCrjBexzYRzhxkmMrX49cpVDmQOH+4O7kX5OMRbmzMXe6Z5MsnxIlDlm3bJlcww==} engines: {node: '>=16.0.0'} dependencies: '@babel/generator': 7.23.6 - '@wyw-in-js/shared': 0.4.1 + '@wyw-in-js/shared': 0.5.0 transitivePeerDependencies: - supports-color dev: false - /@wyw-in-js/shared@0.4.1: - resolution: {integrity: sha512-luKAAP6augn+j7EE9bcVP1chs5RdtmJx1PbRIqT8j12oP2YV32fvhHFX/99XxPujYLxFIexZrhJkNKHnL5uyKA==} + /@wyw-in-js/shared@0.5.0: + resolution: {integrity: sha512-W6Uic3cqRs75XZfXGOYH/0fADbl3Wz/kqnNaowgyNTdTN7/9vdlqk/D/gMT5WGolj4t418+rYe2FHHs0LdlmvA==} engines: {node: '>=16.0.0'} dependencies: debug: 4.3.4(supports-color@8.1.1) @@ -8127,8 +8127,8 @@ packages: - supports-color dev: false - /@wyw-in-js/transform@0.4.1: - resolution: {integrity: sha512-MhU/A58QJ7SkAjVNgvmoa5kbg7h28u4RkwGxm0/qt49sPMSlY8AsIW4wXX2k0rX5GTKHASVcNKrSywE2acjzxQ==} + /@wyw-in-js/transform@0.5.0: + resolution: {integrity: sha512-tpa2/FsB30fdXB1E+9MmfxQYbRgLv/+VMKzpBKNraDH39zwnA2eGGAEho5gpqK40cEV7NH6zhVbaBcEnV0HQyw==} engines: {node: '>=16.0.0'} dependencies: '@babel/core': 7.23.9 @@ -8138,8 +8138,8 @@ packages: '@babel/template': 7.23.9 '@babel/traverse': 7.23.9 '@babel/types': 7.23.9 - '@wyw-in-js/processor-utils': 0.4.1 - '@wyw-in-js/shared': 0.4.1 + '@wyw-in-js/processor-utils': 0.5.0 + '@wyw-in-js/shared': 0.5.0 babel-merge: 3.0.0(@babel/core@7.23.9) cosmiconfig: 8.2.0 happy-dom: 12.10.3 diff --git a/renovate.json b/renovate.json index a6e41949546972..b5d4f9f892d666 100644 --- a/renovate.json +++ b/renovate.json @@ -25,6 +25,10 @@ "groupName": "Emotion", "matchPackagePatterns": "@emotion/*" }, + { + "groupName": "WyW-in-JS", + "matchPackagePatterns": ["@wyw-in-js/*"] + }, { "groupName": "Font awesome SVG icons", "matchPackagePatterns": "@fortawesome/*"