Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove filescoping from babel-plugin, Add transform integration APIs #827

Merged
merged 28 commits into from Sep 21, 2022
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
cd631f1
Remoe filescoping from babel-plugin
mattcompiles Sep 13, 2022
dc12def
WIP
mattcompiles Sep 14, 2022
872d976
WIP
mattcompiles Sep 14, 2022
66d8afe
Add changesets
mattcompiles Sep 14, 2022
5a0bc9d
Fix site
mattcompiles Sep 14, 2022
49813ff
Update docs
mattcompiles Sep 14, 2022
36a137c
Fix changeset
mattcompiles Sep 14, 2022
65afdc1
Trim the README
mattcompiles Sep 14, 2022
e21ddd1
Merge branch 'master' into rm-filescope-babel
mattcompiles Sep 14, 2022
524387c
Rename babel-plugin
mattcompiles Sep 14, 2022
229786b
Fix integration package.json
mattcompiles Sep 14, 2022
2b000cf
Fix typo
mattcompiles Sep 14, 2022
b436e35
Update site/docs/overview/test-environments.md
mattcompiles Sep 14, 2022
63992df
Update packages/rollup-plugin/src/index.ts
mattcompiles Sep 14, 2022
5549217
Fix typo
mattcompiles Sep 14, 2022
752bbae
Merge branch 'rm-filescope-babel' of github.com:seek-oss/vanilla-extr…
mattcompiles Sep 14, 2022
9e32d55
Add next to changeset
mattcompiles Sep 14, 2022
a683a39
Update changesets
mattcompiles Sep 14, 2022
49c341e
Update to jest-transform
mattcompiles Sep 14, 2022
40b36ac
Update .changeset/nice-tools-wink.md
mattcompiles Sep 18, 2022
8c7fa66
Update changeset wording
mattcompiles Sep 19, 2022
b6af010
Merge branch 'master' into rm-filescope-babel
mattcompiles Sep 19, 2022
35b13bc
Add Vitest setup info
mattcompiles Sep 19, 2022
e1b1390
Merge branch 'master' into rm-filescope-babel
mattcompiles Sep 21, 2022
c4d3868
Fix install commands
mattcompiles Sep 21, 2022
862c528
Merge branch 'rm-filescope-babel' of github.com:seek-oss/vanilla-extr…
mattcompiles Sep 21, 2022
8cae667
Update language
mattcompiles Sep 21, 2022
c70aaaf
Improve docs
mattcompiles Sep 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/early-experts-bathe.md
@@ -0,0 +1,7 @@
---
'@vanilla-extract/esbuild-plugin': minor
'@vanilla-extract/vite-plugin': minor
'@vanilla-extract/rollup-plugin': minor
---

Add automatic debug Ids
7 changes: 7 additions & 0 deletions .changeset/fuzzy-bags-hide.md
@@ -0,0 +1,7 @@
---
'@vanilla-extract/integration': minor
---

Add `transform` and `transformSync` functions

The transform APIs can be used to append filescopes and automatic debug Ids to `.css.ts` files.
mattcompiles marked this conversation as resolved.
Show resolved Hide resolved
7 changes: 7 additions & 0 deletions .changeset/nice-tools-wink.md
@@ -0,0 +1,7 @@
---
'@vanilla-extract/webpack-plugin': minor
---

Add automatic debug Ids

Previously, to get automatic debug Ids you needed to use babel with the `@vanilla-extract/babel-plugin` in your webpack config. This is no longer the case so babel is no longer required.
5 changes: 5 additions & 0 deletions .changeset/strong-apricots-marry.md
@@ -0,0 +1,5 @@
---
'@vanilla-extract/integration': major
---

`vanillaExtractFilescopePlugin` has been renamed to `vanillaExtractTransformPlugin`
5 changes: 5 additions & 0 deletions .changeset/tasty-pans-fry.md
@@ -0,0 +1,5 @@
---
'@vanilla-extract/integration': major
---

`compile` now expects a valid `identOption` parameter
13 changes: 13 additions & 0 deletions .changeset/tender-yaks-poke.md
@@ -0,0 +1,13 @@
---
'@vanilla-extract/babel-plugin': major
mattcompiles marked this conversation as resolved.
Show resolved Hide resolved
---

Remove filescope appending

Previously, this plugin appended vanilla-extract filescopes to `.css.ts` files, as well as adding debug IDs to style calls. Filescopes are essential to make vanilla-extract work. Filescope appending has been moved exclusively to the `@vanilla-extract/integration` package.

Migration Guide

In most cases, you should remove this plugin entirely from your setup and everything will continue working as expected.

If you were using this plugin to make vanilla-extract work in [Jest](https://jestjs.io/) then you should migrate to [`@vanilla-extract/jest`](https://vanilla-extract.style/documentation/test-environments/).
1 change: 0 additions & 1 deletion babel-jest.config.js
@@ -1,5 +1,4 @@
module.exports = {
extends: './babel.config',
presets: [['@babel/preset-env', { targets: { node: 'current' } }]],
plugins: [require.resolve('@vanilla-extract/babel-plugin')],
};
1 change: 1 addition & 0 deletions jest.config.js
@@ -1,6 +1,7 @@
module.exports = {
setupFilesAfterEnv: ['./jest.setup.ts'],
transform: {
'\\.css\\.ts$': '@vanilla-extract/jest',
'\\.tsx?$': ['babel-jest', { configFile: './babel-jest.config.js' }],
},
testMatch: ['**/?(*.)+(test).[jt]s?(x)'],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -43,7 +43,7 @@
"@testing-library/jest-dom": "^5.11.9",
"@types/jest": "^27.0.3",
"@types/testing-library__jest-dom": "^5.14.5",
"@vanilla-extract/babel-plugin": "*",
"@vanilla-extract/jest": "*",
"babel-jest": "^27.3.1",
"fast-glob": "^3.2.7",
"jest": "^27.3.1",
Expand Down
7 changes: 2 additions & 5 deletions packages/babel-plugin/package.json
Expand Up @@ -20,12 +20,9 @@
"author": "SEEK",
"license": "MIT",
"dependencies": {
"@babel/core": "^7.13.10",
"@babel/template": "^7.12.13",
"@vanilla-extract/integration": "^5.0.0"
"@babel/core": "^7.13.10"
},
"devDependencies": {
"@types/babel__core": "^7.1.19",
"@types/babel__template": "^7.4.1"
"@types/babel__core": "^7.1.19"
}
}