Skip to content

Commit

Permalink
fix(console): remove __PURE__ annotation from console to fix warnings…
Browse files Browse the repository at this point in the history
… in Vite/Rollup

It was in the wrong place and 2 times. The whole macro was used just to add these buggy annotations
  • Loading branch information
matyasf committed Sep 13, 2024
1 parent 4e201ea commit 48e78bb
Show file tree
Hide file tree
Showing 5 changed files with 11 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.2",
"@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.2"
},
"peerDependencies": {
"react": ">=16.8 <=18"
Expand Down
25 changes: 8 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,12 @@ export {
info,
assert,
debug,
logError,
logWarn,
logWarnDeprecated,
logInfo,
logDebug,
logAssert,
consoleLog
// kept for backwards compatibility, will be removed later
error as logError,
warn as logWarn,
warnDeprecated as logWarnDeprecated,
info as logInfo,
debug as logDebug,
assert as logAssert,
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 48e78bb

Please sign in to comment.