Skip to content

Commit

Permalink
Upgrade swc and rollup depdendencies
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Jan 11, 2025
1 parent fd9d43d commit 4f782e6
Show file tree
Hide file tree
Showing 10 changed files with 941 additions and 662 deletions.
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,25 +57,25 @@
},
"license": "MIT",
"dependencies": {
"@rollup/plugin-commonjs": "^28.0.1",
"@rollup/plugin-commonjs": "^28.0.2",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.3.0",
"@rollup/plugin-replace": "^6.0.1",
"@rollup/plugin-node-resolve": "^16.0.0",
"@rollup/plugin-replace": "^6.0.2",
"@rollup/plugin-wasm": "^6.2.2",
"@rollup/pluginutils": "^5.1.3",
"@swc/core": "^1.9.3",
"@swc/core": "^1.10.7",
"@swc/helpers": "^0.5.11",
"clean-css": "^5.3.3",
"glob": "^11.0.0",
"magic-string": "^0.30.14",
"magic-string": "^0.30.17",
"ora": "^8.0.1",
"picomatch": "^4.0.2",
"pretty-bytes": "^5.6.0",
"rollup": "^4.27.4",
"rollup": "^4.30.1",
"rollup-plugin-dts": "^6.1.1",
"rollup-plugin-swc3": "^0.11.1",
"rollup-preserve-directives": "^1.1.3",
"tslib": "^2.7.0",
"tslib": "^2.8.1",
"yargs": "^17.7.2"
},
"peerDependencies": {
Expand All @@ -92,8 +92,8 @@
"devDependencies": {
"@huozhi/testing-package": "1.0.0",
"@swc-node/register": "^1.10.9",
"@swc/jest": "^0.2.31",
"@swc/types": "^0.1.9",
"@swc/jest": "^0.2.37",
"@swc/types": "^0.1.17",
"@types/clean-css": "^4.2.11",
"@types/jest": "29.0.0",
"@types/node": "^22.9.3",
Expand All @@ -103,7 +103,7 @@
"bunchee": "link:./",
"cross-env": "^7.0.3",
"husky": "^9.0.11",
"jest": "29.0.1",
"jest": "29.7.0",
"lint-staged": "^15.2.2",
"next": "^15.0.4",
"picocolors": "^1.0.0",
Expand Down
1,567 changes: 923 additions & 644 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const foo = {
bar: 'hello'
};
console.log('bar', foo == null ? void 0 : foo.bar);
console.log('bar', foo == null ? undefined : foo.bar);
var _foo_bar;
const prop = (_foo_bar = foo.bar) != null ? _foo_bar : 'default';
console.log('name', prop);
2 changes: 1 addition & 1 deletion test/compile/es-basic/__snapshot__/es-basic.js.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class A {
constructor(){
Object.defineProperty(this, _x, {
writable: true,
value: void 0
value: undefined
});
_class_private_field_loose_base(this, _x)[_x] = 1;
this.getX = ()=>{
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
function e(){return /*#__PURE__*/React.createElement(React.Fragment,null,/*#__PURE__*/React.createElement("div",null,"hello"),/*#__PURE__*/React.createElement("h1",null,"yep"))}export{e as default};
function e(){return React.createElement(React.Fragment,null,React.createElement("div",null,"hello"),React.createElement("h1",null,"yep"))}export{e as default};
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import{jsxs as e,Fragment as r,jsx as i}from"react/jsx-runtime";function n(){return /*#__PURE__*/e(r,{children:[/*#__PURE__*/i("div",{children:"hello"}),/*#__PURE__*/i("h1",{children:"yep"})]})}export{n as default};
import{jsxs as e,Fragment as r,jsx as i}from"react/jsx-runtime";function n(){return e(r,{children:[i("div",{children:"hello"}),i("h1",{children:"yep"})]})}export{n as default};
2 changes: 1 addition & 1 deletion test/compile/jsx/__snapshot__/jsx.min.js.snapshot
Original file line number Diff line number Diff line change
@@ -1 +1 @@
function e(){return /*#__PURE__*/React.createElement(React.Fragment,null,/*#__PURE__*/React.createElement("div",null,"hello"),/*#__PURE__*/React.createElement("h1",null,"yep"))}export{e as default};
function e(){return React.createElement(React.Fragment,null,React.createElement("div",null,"hello"),React.createElement("h1",null,"yep"))}export{e as default};
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"use client";function e(){return /*#__PURE__*/React.createElement("p",{className:"foo"},"foo")}!function(e){if(!e||"undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}(".foo{transform-origin:center}");export{e as default};
"use client";function e(){return React.createElement("p",{className:"foo"},"foo")}!function(e){if(!e||"undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}(".foo{transform-origin:center}");export{e as default};
2 changes: 1 addition & 1 deletion test/compile/tsx/__snapshot__/tsx.min.js.snapshot
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import e from"react";function t(){return /*#__PURE__*/e.createElement("div",null,"hello")}export{t as default};
import e from"react";function t(){return e.createElement("div",null,"hello")}export{t as default};
2 changes: 1 addition & 1 deletion test/integration/edge-variable/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('integration edge-variable', () => {
async ({ distDir }) => {
assertFilesContent(distDir, {
'index.js': /typeof EdgeRuntime/,
'index.edge.js': /typeof "edge-runtime"/,
'index.edge.js': /const variable = \"string\"/, // typeof "edge-runtime"
})
},
)
Expand Down

0 comments on commit 4f782e6

Please sign in to comment.