Skip to content
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

deps: upgrade uuid to v9.0.0 for jest+esm issue #1027

Merged
merged 4 commits into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions apps/colt-steele/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"@types/lodash": "^4.14.194",
"@types/shortid": "^0.0.29",
"@types/speakingurl": "^13.0.3",
"@types/uuid": "8.3.4",
"@types/uuid": "^9.0.2",
"@vercel/og": "^0.5.4",
"aws-sdk": "2.1197.0",
"axios": "^1.4.0",
Expand All @@ -89,7 +89,6 @@
"next": "^13.4.3",
"next-auth": "^4.22.1",
"next-mdx-remote": "=4.2.0",
"remark-shiki-twoslash": "^3.1.3",
"next-sitemap": "^3.0.5",
"nodemailer": "^6.7.2",
"nodemailer-postmark-transport": "^5.2.1",
Expand All @@ -102,17 +101,18 @@
"react-refractor": "^2.1.7",
"react-use": "^17.3.2",
"react-wrap-balancer": "^0.2.4",
"remark-shiki-twoslash": "^3.1.3",
"sanity": "^3.9.0",
"sanity-plugin-cloudinary": "^1.1.1",
"sanity-plugin-taxonomy-manager": "^2.0.4",
"sanity-plugin-markdown": "^4.1.0",
"sanity-plugin-taxonomy-manager": "^2.0.4",
"shortid": "^2.2.16",
"speakingurl": "^14.0.1",
"styled-components": "^5.2",
"superjson": "=1.11.0",
"tailwind-merge": "^1.12.0",
"tailwindcss-radix": "^2.8.0",
"uuid": "8.3.2",
"uuid": "^9.0.0",
"yup": "^0.32.11",
"zod": "^3.21.4"
},
Expand Down
4 changes: 2 additions & 2 deletions apps/epic-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"@types/react-dom": "^18.2.4",
"@types/stream-chain": "^2.0.1",
"@types/stream-json": "^1.7.3",
"@types/uuid": "^8.3.4",
"@types/uuid": "^9.0.2",
"csv-parser": "^3.0.0",
"dotenv-flow": "^3.2.0",
"eslint": "^8.19.0",
Expand All @@ -137,7 +137,7 @@
"tailwindcss": "^3.3.0",
"ts-node": "^10.9.1",
"typescript": "5.1.1-rc",
"uuid": "^8.3.2",
"uuid": "^9.0.0",
"webpack": "^5.73.0",
"zod": "^3.21.4"
},
Expand Down
4 changes: 2 additions & 2 deletions apps/epic-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
"tailwind-fluid-typography": "^1.3.0",
"tailwind-merge": "^1.12.0",
"tailwindcss-radix": "^2.8.0",
"uuid": "^8.3.2",
"uuid": "^9.0.0",
"yup": "^0.32.11",
"zod": "^3.21.4"
},
Expand Down Expand Up @@ -161,7 +161,7 @@
"@types/remove-markdown": "^0.3.0",
"@types/shortid": "^0.0.29",
"@types/speakingurl": "^13.0.3",
"@types/uuid": "^8.3.4",
"@types/uuid": "^9.0.2",
"autoprefixer": "^10.4.12",
"dotenv-flow": "^3.2.0",
"eslint": "^8.19.0",
Expand Down
4 changes: 2 additions & 2 deletions apps/protailwind/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
"styled-components": "^5.2",
"superjson": "=1.11.0",
"tailwindcss-radix": "^2.8.0",
"uuid": "^8.3.2",
"uuid": "^9.0.0",
"whatwg-fetch": "^3.6.2",
"xstate": "=4.23.1",
"yup": "^0.32.11",
Expand All @@ -166,7 +166,7 @@
"@types/react": "^18.2.6",
"@types/react-dom": "^18.2.4",
"@types/shortid": "^0.0.29",
"@types/uuid": "^8.3.4",
"@types/uuid": "^9.0.2",
"autoprefixer": "^10.4.2",
"eslint": "^8.19.0",
"eslint-config-custom": "workspace:*",
Expand Down
6 changes: 3 additions & 3 deletions apps/scriptkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"@trpc/react-query": "=10.7.0",
"@trpc/server": "=10.7.0",
"@types/shortid": "^0.0.29",
"@types/uuid": "^8.3.4",
"@types/uuid": "^9.0.2",
"@vercel/og": "^0.5.4",
"aws-sdk": "^2.1197.0",
"axios": "^0.27.2",
Expand Down Expand Up @@ -160,8 +160,8 @@
"remark-slug": "^7.0.1",
"sanity": "^3.0.0",
"sanity-plugin-cloudinary": "^1.0.1",
"sanity-plugin-taxonomy-manager": "^2.0.4",
"sanity-plugin-markdown": "^4.1.0",
"sanity-plugin-taxonomy-manager": "^2.0.4",
"sharp": "^0.30.7",
"shortid": "^2.2.16",
"simplebar-react": "^2.4.1",
Expand All @@ -174,7 +174,7 @@
"tailwindcss-radix": "^2.8.0",
"tree-cli": "^0.6.7",
"twitter-lite": "^1.1.0",
"uuid": "^8.3.2",
"uuid": "^9.0.0",
"yup": "^0.32.11",
"zod": "^3.21.4"
},
Expand Down
4 changes: 2 additions & 2 deletions apps/testing-javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"styled-jsx": "5.1.1",
"superjson": "=1.11.0",
"tailwindcss-radix": "^2.8.0",
"uuid": "^8.3.2",
"uuid": "^9.0.0",
"zod": "^3.21.4"
},
"devDependencies": {
Expand All @@ -104,7 +104,7 @@
"@types/nprogress": "^0.2.0",
"@types/react": "^18.2.6",
"@types/react-dom": "^18.2.4",
"@types/uuid": "^8.3.4",
"@types/uuid": "^9.0.2",
"dotenv-flow": "^3.2.0",
"eslint": "^8.19.0",
"eslint-config-custom": "workspace:*",
Expand Down
6 changes: 3 additions & 3 deletions apps/total-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@
"markdown-truncate": "^1.1.0",
"micromark": "^3.1.0",
"mjml": "^4.12.0",
"next": "^13.4.3",
"mjml-react": "^2.0.8",
"next": "^13.4.3",
"next-auth": "^4.22.1",
"next-mdx-remote": "=4.2.0",
"next-sitemap": "^3.0.5",
Expand Down Expand Up @@ -163,7 +163,7 @@
"superjson": "=1.11.0",
"tailwind-merge": "^1.12.0",
"tailwindcss-radix": "^2.8.0",
"uuid": "^8.3.2",
"uuid": "^9.0.0",
"whatwg-fetch": "^3.6.2",
"ws": "^8.8.1",
"xstate": "=4.23.1",
Expand Down Expand Up @@ -193,7 +193,7 @@
"@types/react-scroll": "^1.8.3",
"@types/remove-markdown": "^0.3.0",
"@types/shortid": "^0.0.29",
"@types/uuid": "^8.3.4",
"@types/uuid": "^9.0.2",
"@types/ws": "^8.5.3",
"autoprefixer": "^10.4.2",
"eslint": "^8.19.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/commerce-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
"test": "jest"
},
"jest": {
"preset": "@skillrecordings/scripts/jest/node",
"testEnvironment": "node"
"preset": "@skillrecordings/scripts/jest/node"
},
Comment on lines 17 to 19
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Getting all of the uuid dependencies on v9 and then allowing commerce-server jest to use the default testEnvironment fixes the ESM/Jest/UUID issue.

"dependencies": {
"@casl/ability": "^6.0.0",
Expand All @@ -37,6 +36,7 @@
"@types/node": "^18.16.13",
"eslint": "^8.12.0",
"eslint-config-custom": "workspace:*",
"jest": "^29.5.0",
"rimraf": "^3.0.2",
"tsup": "^5.11.13",
"tsx": "^3.7.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/database/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
},
"dependencies": {
"@prisma/client": "^4.5.0",
"uuid": "^8.3.2"
"uuid": "^9.0.0"
},
"devDependencies": {
"@skillrecordings/tsconfig": "workspace:*",
"@types/node": "^18.16.13",
"@types/uuid": "^8.3.4",
"@types/uuid": "^9.0.2",
"eslint": "^8.12.0",
"eslint-config-custom": "workspace:*",
"i": "^0.3.7",
Expand Down
10 changes: 5 additions & 5 deletions packages/database/src/prisma-api.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Context, defaultContext} from './context'
import {v4} from 'uuid'
import {v4 as uuidv4} from 'uuid'
import {Prisma, Purchase, PurchaseUserTransferState, User} from '@prisma/client'

type SDKOptions = {ctx?: Context}
Expand Down Expand Up @@ -416,8 +416,8 @@ export function getSdk(
// we are using uuids so we can generate this!
// this is needed because the following actions
// are dependant
const merchantChargeId = v4()
const purchaseId = v4()
const merchantChargeId = uuidv4()
const purchaseId = uuidv4()

const merchantCharge = ctx.prisma.merchantCharge.create({
data: {
Expand Down Expand Up @@ -473,7 +473,7 @@ export function getSdk(

if (isBulkPurchase) {
bulkCouponId =
existingBulkCoupon !== null ? existingBulkCoupon.id : v4()
existingBulkCoupon !== null ? existingBulkCoupon.id : uuidv4()

// Create or Update Bulk Coupon Record
if (existingBulkCoupon) {
Expand Down Expand Up @@ -503,7 +503,7 @@ export function getSdk(
}
}

const merchantSessionId = v4()
const merchantSessionId = uuidv4()

const merchantSession = ctx.prisma.merchantSession.create({
data: {
Expand Down
4 changes: 2 additions & 2 deletions packages/skill-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"preact-render-to-string": "^5.2.0",
"sanitize-html": "^2.7.0",
"styled-jsx": "5.1.1",
"uuid": "^8.3.2"
"uuid": "^9.0.0"
},
"devDependencies": {
"@babel/cli": "^7.16.0",
Expand All @@ -80,7 +80,7 @@
"@types/react": "^18.2.6",
"@types/react-dom": "^18.2.4",
"@types/sanitize-html": "^2.6.2",
"@types/uuid": "^8.3.4",
"@types/uuid": "^9.0.2",
"autoprefixer": "^10.4.2",
"babel-plugin-jsx-pragmatic": "^1.0.2",
"babel-preset-preact": "^2.0.0",
Expand Down