Skip to content

Commit

Permalink
chore(deps): update parcel packages (#1390)
Browse files Browse the repository at this point in the history
* chore(deps): update parcel packages

* Add dummy generic type so optimizer works with parcel v2.8.0+

Parcel v2.8.0 adds a BundleConfigType generic type to Optimizer
(parcel-bundler/parcel#8370) as part of
their `loadBundleConfig` method. We use a dummy type because we
don't need this functionality currently.

* Update snapshot tests for Parcel 2.8.3

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Grant Wong <gwong2@atlassian.com>
  • Loading branch information
2 people authored and AtlassianRubberDuck committed Feb 15, 2023
1 parent 097cff1 commit d905599
Show file tree
Hide file tree
Showing 11 changed files with 667 additions and 487 deletions.
12 changes: 6 additions & 6 deletions examples/parcel/package.json
Expand Up @@ -14,12 +14,12 @@
"devDependencies": {
"@compiled/parcel-config": "*",
"@compiled/parcel-transformer": "*",
"@parcel/config-default": "^2.3.1",
"@parcel/optimizer-htmlnano": "^2.3.2",
"@parcel/packager-html": "^2.3.2",
"@parcel/transformer-html": "^2.3.2",
"@parcel/transformer-posthtml": "^2.3.2",
"parcel": "^2.3.2"
"@parcel/config-default": "^2.8.3",
"@parcel/optimizer-htmlnano": "^2.8.3",
"@parcel/packager-html": "^2.8.3",
"@parcel/transformer-html": "^2.8.3",
"@parcel/transformer-posthtml": "^2.8.3",
"parcel": "^2.8.3"
},
"alias": {
"parcel-alias": "./lib/parcel-alias.ts"
Expand Down
2 changes: 1 addition & 1 deletion fixtures/parcel-optimizer-test-app/package.json
Expand Up @@ -9,6 +9,6 @@
},
"devDependencies": {
"@compiled/parcel-optimizer": "*",
"@parcel/config-default": "^2.3.1"
"@parcel/config-default": "^2.8.3"
}
}
2 changes: 1 addition & 1 deletion fixtures/parcel-transformer-test-app/package.json
Expand Up @@ -9,6 +9,6 @@
},
"devDependencies": {
"@compiled/parcel-transformer": "*",
"@parcel/config-default": "^2.3.1"
"@parcel/config-default": "^2.8.3"
}
}
Expand Up @@ -9,6 +9,6 @@
},
"devDependencies": {
"@compiled/parcel-transformer": "*",
"@parcel/config-default": "^2.3.1"
"@parcel/config-default": "^2.8.3"
}
}
2 changes: 1 addition & 1 deletion fixtures/parcel-transformer-test-extract-app/package.json
Expand Up @@ -10,6 +10,6 @@
"devDependencies": {
"@compiled/babel-component-fixture": "*",
"@compiled/parcel-transformer": "*",
"@parcel/config-default": "^2.3.1"
"@parcel/config-default": "^2.8.3"
}
}
2 changes: 1 addition & 1 deletion packages/parcel-config/package.json
Expand Up @@ -18,7 +18,7 @@
"dependencies": {
"@compiled/parcel-optimizer": "^0.2.0",
"@compiled/parcel-transformer": "^0.11.0",
"@parcel/plugin": "^2.3.1"
"@parcel/plugin": "^2.8.3"
},
"devDependencies": {},
"engines": {
Expand Down
8 changes: 4 additions & 4 deletions packages/parcel-optimizer/package.json
Expand Up @@ -21,15 +21,15 @@
"dependencies": {
"@compiled/css": "^0.8.8",
"@compiled/utils": "^0.6.17",
"@parcel/plugin": "^2.3.1",
"@parcel/plugin": "^2.8.3",
"posthtml": "^0.16.6",
"posthtml-insert-at": "^0.2.7"
},
"devDependencies": {
"@babel/types": "^7.20.7",
"@parcel/core": "^2.3.1",
"@parcel/fs": "^2.3.1",
"@parcel/types": "^2.3.1",
"@parcel/core": "^2.8.3",
"@parcel/fs": "^2.8.3",
"@parcel/types": "^2.8.3",
"prettier": "^2.8.4"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/parcel-optimizer/src/index.ts
Expand Up @@ -16,7 +16,7 @@ const configFiles = [
'compiledcss.config.js',
];

export default new Optimizer<ParcelOptimizerOpts>({
export default new Optimizer<ParcelOptimizerOpts, unknown>({
async loadConfig({ config, options }) {
const conf = await config.getConfigFrom(join(options.projectRoot, 'index'), configFiles, {
packageKey: '@compiled/parcel-optimizer',
Expand Down
10 changes: 5 additions & 5 deletions packages/parcel-transformer/package.json
Expand Up @@ -25,14 +25,14 @@
"@compiled/babel-plugin": "^0.17.3",
"@compiled/babel-plugin-strip-runtime": "^0.17.3",
"@compiled/utils": "^0.6.17",
"@parcel/plugin": "^2.3.2",
"@parcel/source-map": "^2.0.2",
"@parcel/plugin": "^2.8.3",
"@parcel/source-map": "^2.1.1",
"enhanced-resolve": "^5.12.0"
},
"devDependencies": {
"@parcel/core": "^2.3.1",
"@parcel/fs": "^2.3.1",
"@parcel/types": "^2.3.1",
"@parcel/core": "^2.8.3",
"@parcel/fs": "^2.8.3",
"@parcel/types": "^2.8.3",
"@types/babel__core": "^7.20.0",
"prettier": "^2.8.4"
},
Expand Down
Expand Up @@ -52,7 +52,7 @@ it('transforms assets with babel plugin', async () => {
"/* index.jsx generated by @compiled/babel-plugin v0.0.0 */ var _2 = \\"._syaz5scu{color:red}\\";
var _ = \\"._1wyb12am{font-size:50px}\\";
var App = function() {
/*#__PURE__*/ return (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
children: /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_runtime.CC, {
children: [
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_runtime.CS, {
Expand Down Expand Up @@ -97,21 +97,21 @@ it('transforms assets with compiled and extraction babel plugins', async () => {
.find((asset) => asset.filePath === join(extractionFixtureRoot, 'src/index.jsx'))
?.getCode();
expect(indexJsCode).toMatchInlineSnapshot(`
"var parcelHelpers = require(\\"@parcel/transformer-js/src/esmodule-helpers.js\\");
"/* index.jsx generated by @compiled/babel-plugin v0.0.0 */ var parcelHelpers = require(\\"@parcel/transformer-js/src/esmodule-helpers.js\\");
var _jsxRuntime = require(\\"react/jsx-runtime\\");
/* index.jsx generated by @compiled/babel-plugin v0.0.0 */ var _runtime = require(\\"@compiled/react/runtime\\");
var _runtime = require(\\"@compiled/react/runtime\\");
var _babelComponentFixture = require(\\"@compiled/babel-component-fixture\\");
var _babelComponentFixtureDefault = parcelHelpers.interopDefault(_babelComponentFixture);
var App = function() {
/*#__PURE__*/ return _jsxRuntime.jsxs(_jsxRuntime.Fragment, {
return /*#__PURE__*/ (0, _jsxRuntime.jsxs)((0, _jsxRuntime.Fragment), {
children: [
/*#__PURE__*/ _jsxRuntime.jsx(\\"div\\", {
className: _runtime.ax([
/*#__PURE__*/ (0, _jsxRuntime.jsx)(\\"div\\", {
className: (0, _runtime.ax)([
\\"_1wyb12am _syaz5scu\\"
]),
children: \\"CSS prop\\"
}),
/*#__PURE__*/ _jsxRuntime.jsx(_babelComponentFixtureDefault.default, {
/*#__PURE__*/ (0, _jsxRuntime.jsx)((0, _babelComponentFixtureDefault.default), {
children: \\"Babel component\\"
})
]
Expand Down Expand Up @@ -182,9 +182,7 @@ it('transforms assets with compiled and extraction babel plugins', async () => {
expect(extractedComponent).toMatchInlineSnapshot(`
"var Button = (0, _react.forwardRef)(function(_ref, __cmplr) {
var _ref$as = _ref.as, C = _ref$as === void 0 ? \\"button\\" : _ref$as, __cmpls = _ref.style, __cmplp = _objectWithoutProperties(_ref, _excluded);
return (0, _jsxRuntime.jsx)(C, _objectSpread(_objectSpread({
}, __cmplp), {
}, {
return (0, _jsxRuntime.jsx)(C, _objectSpread(_objectSpread({}, __cmplp), {}, {
style: __cmpls,
ref: __cmplr,
className: (0, _runtime.ax)([
Expand All @@ -193,7 +191,7 @@ it('transforms assets with compiled and extraction babel plugins', async () => {
])
}));
});
Button.displayName = 'Button';
Button.displayName = \\"Button\\";
function BabelComponent(_ref2) {
var children = _ref2.children;
return (0, _jsxRuntime.jsx)(\\"div\\", {
Expand Down

0 comments on commit d905599

Please sign in to comment.