-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
maintenance updates #35
Conversation
"presets": [ | ||
["@babel/preset-env", { | ||
"useBuiltIns": "usage", | ||
"corejs": 3 | ||
} | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From babel:
As of Babel 7.4.0, this package has been deprecated in favor of directly including core-js/stable (to polyfill ECMAScript features
testEnvironmentOptions: { | ||
url: 'http://localhost/' | ||
}, | ||
testEnvironment: 'jsdom', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From this post:
The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.
const config = { | ||
plugins: [ | ||
postCssImport, | ||
postcssAdvancedVariables(), | ||
postcssAtroot(), | ||
postcssExtendRule(), | ||
postcssNested(), | ||
postcssPresetEnv(), | ||
postcssPropertyLookup(), | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
precss
is no longer maintained. From this issue comment, I was able to re-create the functionality.
global._ = require('lodash'); | ||
global.faker = require('faker'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I opted to import these into the files that were using them instead of globally. I was getting a global
undefined error at some point
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = dirname(__filename); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These CommonJS variables are not available in ES modules.
__filename and __dirname use cases can be replicated via import.meta.url.
Some later TODOs:
|
Description
Starting some maintenance again! I used
zcli
to generate an app with Node 18, and moved pieces of the app over til it worked and tests passed. I removed a bunch of react stuff from as it wasn't used. I think for the most part, everything is working as it used to.TODO