Skip to content

Commit

Permalink
fix(build): allow bundlers to process code properly (#2852)
Browse files Browse the repository at this point in the history
ApiDOM@0.68.0 comes with not correctly identified
sideEffects field in package.json.

ApiDOM@0.68.1 fixes this issue and allow bundlers
to bundle code properly again.
  • Loading branch information
char0n authored Feb 21, 2023
1 parent 82ed788 commit 4eb131e
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 144 deletions.
18 changes: 18 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/**
* This is override for https://github.com/lodash/babel-plugin-lodash/issues/259.
* babel-plugin-lodash is using deprecated babel API, which causes generation of many
* console.trace calls.
*/

const consoleTrace = console.trace.bind(console);
console.trace = (message, ...optionalParams) => {
if (
typeof message === 'string' &&
message.startsWith('`isModuleDeclaration` has been deprecated')
) {
return undefined; // noop
}

return consoleTrace(message, ...optionalParams);
};

module.exports = {
env: {
commonjs: {
Expand Down
2 changes: 1 addition & 1 deletion config/webpack/browser.config.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const browserMin = {
devtool: 'source-map',
performance: {
hints: 'error',
maxEntrypointSize: 350000,
maxEntrypointSize: 440000,
maxAssetSize: 50000000,
},
output: {
Expand Down
192 changes: 60 additions & 132 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,19 @@
],
"license": "Apache-2.0",
"devDependencies": {
"@babel/cli": "=7.21.0",
"@babel/core": "^7.18.10",
"@babel/plugin-proposal-class-properties": "=7.18.6",
"@babel/plugin-proposal-object-rest-spread": "=7.20.7",
"@babel/plugin-transform-runtime": "=7.21.0",
"@babel/preset-env": "^7.18.10",
"@babel/register": "=7.21.0",
"@babel/cli": "^7.21.0",
"@babel/core": "^7.21.0",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
"@babel/plugin-transform-runtime": "^7.21.0",
"@babel/preset-env": "^7.20.2",
"@babel/register": "^7.21.0",
"@commitlint/cli": "^17.0.0",
"@commitlint/config-conventional": "^17.0.0",
"@swagger-api/apidom-core": "=0.68.0",
"@swagger-api/apidom-json-pointer": "=0.68.0",
"@swagger-api/apidom-ns-openapi-3-1": "=0.68.0",
"@swagger-api/apidom-reference": "=0.68.0",
"@swagger-api/apidom-core": "=0.68.1",
"@swagger-api/apidom-json-pointer": "=0.68.1",
"@swagger-api/apidom-ns-openapi-3-1": "=0.68.1",
"@swagger-api/apidom-reference": "=0.68.1",
"abort-controller": "^3.0.0",
"babel-loader": "=9.1.2",
"babel-plugin-lodash": "=3.3.4",
Expand Down

0 comments on commit 4eb131e

Please sign in to comment.