diff --git a/fix-next-safe-action.js b/fix-next-safe-action.js deleted file mode 100644 index 74b4e875..00000000 --- a/fix-next-safe-action.js +++ /dev/null @@ -1,28 +0,0 @@ -// This is a temporary workaround until the real fix is done upstream. -// I opened an issue in the repo to track the status of this https://github.com/TheEdoRan/next-safe-action/issues/42 - -const fs = require('fs'); - -const files = ['./node_modules/next-safe-action/dist/index.mjs', './node_modules/next-safe-action/dist/hook.mjs']; -const replacements = [ - { - original: '\"next/dist/client/components/not-found\"', - change: '\"next/dist/client/components/not-found.js\"' - }, - { - original: '\"next/dist/client/components/redirect\"', - change: '\"next/dist/client/components/redirect.js\"' - } -]; - -try { - files.forEach((file) => { - const data = fs.readFileSync(file, 'utf8'); - let changedData = data; - replacements.forEach((r) => changedData = changedData.replace(new RegExp(r.original, 'g'), r.change)); - fs.writeFileSync(file, changedData, 'utf8'); - }); -} catch (error) { - console.error(error); -} - diff --git a/package-lock.json b/package-lock.json index 84ee1d56..b50e688d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,6 @@ "": { "name": "olivo", "version": "0.1.0", - "hasInstallScript": true, "dependencies": { "@formkit/auto-animate": "^1.0.0-beta.6", "@next-auth/prisma-adapter": "^1.0.7", @@ -39,7 +38,7 @@ "inngest": "^3.7.3", "next": "14.0.4", "next-auth": "^4.24.5", - "next-safe-action": "^5.2.1", + "next-safe-action": "^5.2.3", "openai-edge": "^1.2.2", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -22640,9 +22639,9 @@ } }, "node_modules/next-safe-action": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/next-safe-action/-/next-safe-action-5.2.1.tgz", - "integrity": "sha512-ta2+e3ZOhQ4BocMsy7J1PuPOyfa3eCtIF0PzcaYMHwShHR+e3VQ3KwilYAJPK814BO/tg0dFAxk09VucGiIzHQ==", + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/next-safe-action/-/next-safe-action-5.2.3.tgz", + "integrity": "sha512-djTDE9CkTH/EVzhIJBovlU9kJ7twy7gVC1HFsuQzhMe2d5V90IXlZLmpvnt0c6D5rMjFBrBwd2VVQnyVQcWoHQ==", "engines": { "node": ">=16" }, diff --git a/package.json b/package.json index 4d8066e6..19da408b 100644 --- a/package.json +++ b/package.json @@ -31,8 +31,7 @@ "dependencies:check": "ncu", "dependencies:update": "ncu -u && npm install && npm test && npm run lint:fix", "analyze": "cross-env ANALYZE=true next build", - "prepare": "husky install", - "postinstall": "node fix-next-safe-action.js" + "prepare": "husky install" }, "dependencies": { "@formkit/auto-animate": "^1.0.0-beta.6", @@ -65,7 +64,7 @@ "inngest": "^3.7.3", "next": "14.0.4", "next-auth": "^4.24.5", - "next-safe-action": "^5.2.1", + "next-safe-action": "^5.2.3", "openai-edge": "^1.2.2", "react": "^18.2.0", "react-dom": "^18.2.0",