Skip to content

Commit

Permalink
refactor(console): remove babel macro
Browse files Browse the repository at this point in the history
It was only used to insert the PURE annotation, but it was buggy and it got inserted twice
TEST PLAN:
Compare the built binaries with previous versions. There should be no differences in other packages
  • Loading branch information
matyasf committed Sep 12, 2024
1 parent 6928c97 commit c3d9dc0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 124 deletions.
17 changes: 1 addition & 16 deletions package-lock.json

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

8 changes: 1 addition & 7 deletions packages/console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,7 @@
},
"license": "MIT",
"devDependencies": {
"@instructure/ui-babel-preset": "10.2.1",
"@types/babel-plugin-macros": "^3.1.3"
},
"dependencies": {
"@babel/helper-annotate-as-pure": "^7.22.5",
"@babel/helper-module-imports": "^7.24.3",
"babel-plugin-macros": "^3.1.0"
"@instructure/ui-babel-preset": "10.2.1"
},
"peerDependencies": {
"react": ">=16.8 <=18"
Expand Down
24 changes: 7 additions & 17 deletions packages/console/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@ import {
debug
} from './console'

import {
error as logError,
warn as logWarn,
warnDeprecated as logWarnDeprecated,
info as logInfo,
assert as logAssert,
debug as logDebug,
log as consoleLog
} from './macro'

export {
error,
warn,
Expand All @@ -49,11 +39,11 @@ export {
info,
assert,
debug,
logError,
logWarn,
logWarnDeprecated,
logInfo,
logDebug,
logAssert,
consoleLog
/*#__PURE__*/ error as logError,
/*#__PURE__*/ warn as logWarn,
/*#__PURE__*/ warnDeprecated as logWarnDeprecated,
/*#__PURE__*/ info as logInfo,
/*#__PURE__*/ debug as logDebug,
/*#__PURE__*/ assert as logAssert,
/*#__PURE__*/ log as consoleLog
}
83 changes: 0 additions & 83 deletions packages/console/src/macro.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/ui-babel-preset/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ function getWebEnvConfig(opts) {
},
useBuiltIns: 'entry',
// this version has to match the version in package.json
corejs: '3.26.1',
corejs: '3.37.1',
modules: opts.esModules ? false : 'commonjs',
// debug: true, // un-comment if you want to see what browsers are being targeted and what plugins that means it will activate
exclude: ['transform-typeof-symbol'],
Expand Down

0 comments on commit c3d9dc0

Please sign in to comment.