diff --git a/babel.config.json b/babel.config.json new file mode 100644 index 000000000..5e768ec31 --- /dev/null +++ b/babel.config.json @@ -0,0 +1,10 @@ +{ + "presets": [ + "@babel/preset-env", + "@babel/preset-react" + ], + "plugins": [ + "@babel/plugin-transform-runtime", + "babel-plugin-transform-import-meta" + ] +} diff --git a/package-lock.json b/package-lock.json index 544cba788..6b30e4a73 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,7 +40,7 @@ "markedLegacy": "npm:marked@^0.3.19", "moment": "^2.30.1", "mongoose": "^8.8.2", - "nanoid": "3.3.4", + "nanoid": "5.0.8", "nconf": "^0.12.1", "react": "^18.3.1", "react-dom": "^18.3.1", @@ -11047,15 +11047,20 @@ "optional": true }, "node_modules/nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", - "license": "MIT", + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.0.8.tgz", + "integrity": "sha512-TcJPw+9RV9dibz1hHUzlLVy8N4X9TnwirAjrU08Juo6BNKggzVfP2ZJ/3ZUSq15Xl5i85i+Z89XBO90pB2PghQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "bin": { - "nanoid": "bin/nanoid.cjs" + "nanoid": "bin/nanoid.js" }, "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + "node": "^18 || >=20" } }, "node_modules/nanomatch": { diff --git a/package.json b/package.json index a18302f09..0050b8e26 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,9 @@ "shared", "server" ], + "transformIgnorePatterns": [ + "node_modules/(?!nanoid/).*" + ], "coveragePathIgnorePatterns": [ "build/*" ], @@ -78,16 +81,6 @@ "jest-expect-message" ] }, - "babel": { - "presets": [ - "@babel/preset-env", - "@babel/preset-react" - ], - "plugins": [ - "@babel/plugin-transform-runtime", - "babel-plugin-transform-import-meta" - ] - }, "dependencies": { "@babel/core": "^7.26.0", "@babel/plugin-transform-runtime": "^7.25.9", @@ -119,7 +112,7 @@ "markedLegacy": "npm:marked@^0.3.19", "moment": "^2.30.1", "mongoose": "^8.8.2", - "nanoid": "3.3.4", + "nanoid": "5.0.8", "nconf": "^0.12.1", "react": "^18.3.1", "react-dom": "^18.3.1", diff --git a/server/googleActions.js b/server/googleActions.js index 758cb7e3d..ec541e5f5 100644 --- a/server/googleActions.js +++ b/server/googleActions.js @@ -60,7 +60,7 @@ const GoogleActions = { account.googleRefreshToken = tokens.refresh_token; } account.googleAccessToken = tokens.access_token; - const JWTToken = token.generateAccessToken(account); + const JWTToken = token(account); //Save updated token to cookie //res.cookie('nc_session', JWTToken, { maxAge: 1000*60*60*24*365, path: '/', sameSite: 'lax' });