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

Update rollup and rollup plugins #1463

Merged
merged 2 commits into from
Aug 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/twenty-bananas-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@vanilla-extract/css': patch
'@vanilla-extract/integration': patch
'@vanilla-extract/private': patch
'@vanilla-extract/recipes': patch
'@vanilla-extract/sprinkles': patch
---

Export types with `export { type T }` syntax
Comment on lines +1 to +9
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rollup-plugin-dts@6 started emitting type exports this way. These are the only packages that export types.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
"jest-environment-jsdom": "^29.7.0",
"prettier": "^2.8.8",
"resolve.exports": "^2.0.2",
"rollup": "^2.7.0",
"rollup-plugin-dts": "^4.2.2",
"rollup-plugin-node-externals": "^5.0.0",
"rollup": "^4.20.0",
"rollup-plugin-dts": "^6.1.1",
"rollup-plugin-node-externals": "^7.1.3",
"tsx": "^4.17.0",
"typescript": "^5.5.4",
"vitest": "^1.5.0"
Expand Down
6 changes: 3 additions & 3 deletions packages/rollup-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
},
"devDependencies": {
"@fixtures/themed": "workspace:*",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-json": "^6.1.0",
"@vanilla-extract/css": "workspace:^",
"esbuild": "~0.23.1",
"rollup": "^2.7.0",
"rollup-plugin-esbuild": "^4.9.1"
"rollup": "^4.20.0",
"rollup-plugin-esbuild": "^6.1.1"
},
"peerDependencies": {
"rollup": "^2.0.0 || ^3.0.0 || ^4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/rollup-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export function vanillaExtractPlugin({

return {
code: output,
map: chunkInfo.map ?? null,
map: null,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The map property seems to have been removed, I think in rollup v4 (can't find patch notes for it though).

Based of the discussion in #706, I don't think this change affects anything as the null was merely used to suppress warnings caused by chunkInfo.map being undefined.

};
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`rollup-plugin should build with preserveModules 1`] = `
[
[
"assets/src/shared.css.ts.vanilla-16598c42.css",
"assets/src/shared.css.ts.vanilla-G_Gyt4-e.css",
".shared_shadow__4dtfen0 {
box-shadow: 0 0 5px red;
}
Expand All @@ -15,7 +15,7 @@ body, button {
}",
],
[
"assets/src/styles.css.ts.vanilla-1b9864b6.css",
"assets/src/styles.css.ts.vanilla-C7NI1Ovc.css",
"@font-face {
src: local("Impact");
font-family: "styles_impact__jteyb10";
Expand Down Expand Up @@ -68,7 +68,7 @@ html .styles_opacity_1\\/4__jteyb17 {
}",
],
[
"assets/src/themes.css.ts.vanilla-3ad7ca47.css",
"assets/src/themes.css.ts.vanilla-DMMXGwB8.css",
":root, .themes_theme__cvta170 {
--colors-backgroundColor__cvta171: blue;
--colors-text__cvta172: white;
Expand Down Expand Up @@ -183,7 +183,7 @@ render();
],
[
"src/shared.css.js",
"import './../assets/src/shared.css.ts.vanilla-16598c42.css';
"import './../assets/src/shared.css.ts.vanilla-G_Gyt4-e.css';

var shadow = "shared_shadow__4dtfen0";

Expand All @@ -192,9 +192,9 @@ export { shadow };
],
[
"src/styles.css.js",
"import './../assets/src/shared.css.ts.vanilla-16598c42.css';
import './../assets/src/themes.css.ts.vanilla-3ad7ca47.css';
import './../assets/src/styles.css.ts.vanilla-1b9864b6.css';
"import './../assets/src/shared.css.ts.vanilla-G_Gyt4-e.css';
import './../assets/src/themes.css.ts.vanilla-DMMXGwB8.css';
import './../assets/src/styles.css.ts.vanilla-C7NI1Ovc.css';

var button = "styles_button__jteyb13 shared_shadow__4dtfen0 styles_iDunno__jteyb12";
var container = "styles_container__jteyb11";
Expand All @@ -205,7 +205,7 @@ export { button, container, opacity };
],
[
"src/themes.css.js",
"import './../assets/src/themes.css.ts.vanilla-3ad7ca47.css';
"import './../assets/src/themes.css.ts.vanilla-DMMXGwB8.css';

var altTheme = "themes_altTheme__cvta176";
var responsiveTheme = "themes_responsiveTheme__cvta177";
Expand Down Expand Up @@ -507,44 +507,64 @@ export { altTheme, responsiveTheme, theme, vars };
exports[`rollup-plugin should build with sourcemaps 1`] = `
[
[
"assets/src/shared.css.ts.vanilla-16598c42.css",
"assets/src/shared.css.ts.vanilla-G_Gyt4-e.css",
"",
],
[
"assets/src/styles.css.ts.vanilla-1b9864b6.css",
"assets/src/styles.css.ts.vanilla-C7NI1Ovc.css",
"",
],
[
"assets/src/themes.css.ts.vanilla-3ad7ca47.css",
"assets/src/themes.css.ts.vanilla-DMMXGwB8.css",
"",
],
[
"src/index.js",
";;;;;;AAKA,MAAM,WAAW,GAAG,gBAAgB,CAAC,IAAI,EAAE;AAC3C,EAAE,MAAM,EAAE;AACV,IAAI,eAAe,EAAE,QAAQ;AAC7B,IAAI,IAAI,EAAE,OAAO;AACjB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,CAAC,EAAE,KAAK;AACZ,IAAI,CAAC,EAAE,KAAK;AACZ,IAAI,CAAC,EAAE,MAAM;AACb,GAAG;AACH,CAAC,CAAC,CAAC;AACH,SAAS,MAAM,GAAG;AAClB,EAAE,QAAQ,CAAC,IAAI,CAAC,SAAS,GAAG,CAAC;AAC7B,WAAW,EAAE,SAAS,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC;AAC9C;AACA,aAAa,EAA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,EAAA;AAAA,MACL,CAAG,EAAA,KAAA;AAAA,MACH,CAAG,EAAA,MAAA;AAAA,MACH,CAAG,EAAA,MAAA;AAAA,KACL;AAAA,GACD,CAAA,CAAA;AAED,EAAA,cAAA,CAAe,oBAAsB,EAAA;AAAA,IACnC,CAAC,IAAA,CAAK,MAAO,CAAA,eAAe,GAAG,YAAA;AAAA,GAChC,CAAA,CAAA;AACH,CAAA;AAEA,MAAO,EAAA",
],
[
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rollup@3 started emitting both inline and external sourcemaps by default.

"src/index.js.map",
"",
],
[
"src/shared.css.js",
";;;;;;",
],
[
"src/shared.css.js.map",
"",
],
[
"src/styles.css.js",
";;;;;;;;;;",
],
[
"src/styles.css.js.map",
"",
],
[
"src/themes.css.js",
";;;;;;;;;",
],
[
"src/themes.css.js.map",
"",
],
[
"test-nodes.json.js",
";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
],
[
"test-nodes.json.js.map",
"",
],
]
`;

exports[`rollup-plugin should build without preserveModules 1`] = `
[
[
"assets/src/shared.css.ts.vanilla-16598c42.css",
"assets/src/shared.css.ts.vanilla-G_Gyt4-e.css",
".shared_shadow__4dtfen0 {
box-shadow: 0 0 5px red;
}
Expand All @@ -556,7 +576,7 @@ body, button {
}",
],
[
"assets/src/styles.css.ts.vanilla-1b9864b6.css",
"assets/src/styles.css.ts.vanilla-C7NI1Ovc.css",
"@font-face {
src: local("Impact");
font-family: "styles_impact__jteyb10";
Expand Down Expand Up @@ -609,7 +629,7 @@ html .styles_opacity_1\\/4__jteyb17 {
}",
],
[
"assets/src/themes.css.ts.vanilla-3ad7ca47.css",
"assets/src/themes.css.ts.vanilla-DMMXGwB8.css",
":root, .themes_theme__cvta170 {
--colors-backgroundColor__cvta171: blue;
--colors-text__cvta172: white;
Expand Down Expand Up @@ -641,9 +661,9 @@ html .styles_opacity_1\\/4__jteyb17 {
[
"index.js",
"import { assignInlineVars, setElementVars } from '@vanilla-extract/dynamic';
import './assets/src/themes.css.ts.vanilla-3ad7ca47.css';
import './assets/src/shared.css.ts.vanilla-16598c42.css';
import './assets/src/styles.css.ts.vanilla-1b9864b6.css';
import './assets/src/themes.css.ts.vanilla-DMMXGwB8.css';
import './assets/src/shared.css.ts.vanilla-G_Gyt4-e.css';
import './assets/src/styles.css.ts.vanilla-C7NI1Ovc.css';

var altTheme = "themes_altTheme__cvta176";
var responsiveTheme = "themes_responsiveTheme__cvta177";
Expand Down
Loading