mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-06 10:02:43 +00:00
Move babel config to separate file
Jest struggles to read all babel configurations if directly inside package.json. This now allows us to install nanoid 5 and pass all tests with it.
This commit is contained in:
10
babel.config.json
Normal file
10
babel.config.json
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"presets": [
|
||||||
|
"@babel/preset-env",
|
||||||
|
"@babel/preset-react"
|
||||||
|
],
|
||||||
|
"plugins": [
|
||||||
|
"@babel/plugin-transform-runtime",
|
||||||
|
"babel-plugin-transform-import-meta"
|
||||||
|
]
|
||||||
|
}
|
||||||
13
package.json
13
package.json
@@ -57,6 +57,9 @@
|
|||||||
"shared",
|
"shared",
|
||||||
"server"
|
"server"
|
||||||
],
|
],
|
||||||
|
"transformIgnorePatterns": [
|
||||||
|
"node_modules/(?!nanoid/).*"
|
||||||
|
],
|
||||||
"coveragePathIgnorePatterns": [
|
"coveragePathIgnorePatterns": [
|
||||||
"build/*"
|
"build/*"
|
||||||
],
|
],
|
||||||
@@ -78,16 +81,6 @@
|
|||||||
"jest-expect-message"
|
"jest-expect-message"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"babel": {
|
|
||||||
"presets": [
|
|
||||||
"@babel/preset-env",
|
|
||||||
"@babel/preset-react"
|
|
||||||
],
|
|
||||||
"plugins": [
|
|
||||||
"@babel/plugin-transform-runtime",
|
|
||||||
"babel-plugin-transform-import-meta"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "^7.26.0",
|
"@babel/core": "^7.26.0",
|
||||||
"@babel/plugin-transform-runtime": "^7.25.9",
|
"@babel/plugin-transform-runtime": "^7.25.9",
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ const GoogleActions = {
|
|||||||
account.googleRefreshToken = tokens.refresh_token;
|
account.googleRefreshToken = tokens.refresh_token;
|
||||||
}
|
}
|
||||||
account.googleAccessToken = tokens.access_token;
|
account.googleAccessToken = tokens.access_token;
|
||||||
const JWTToken = token.generateAccessToken(account);
|
const JWTToken = token(account);
|
||||||
|
|
||||||
//Save updated token to cookie
|
//Save updated token to cookie
|
||||||
//res.cookie('nc_session', JWTToken, { maxAge: 1000*60*60*24*365, path: '/', sameSite: 'lax' });
|
//res.cookie('nc_session', JWTToken, { maxAge: 1000*60*60*24*365, path: '/', sameSite: 'lax' });
|
||||||
|
|||||||
Reference in New Issue
Block a user