diff --git a/examples/algolia/package.json b/examples/algolia/package.json index e3b0d721..d9cc24ff 100644 --- a/examples/algolia/package.json +++ b/examples/algolia/package.json @@ -21,8 +21,8 @@ }, "dependencies": { "@algolia/react-instantsearch-widget-color-refinement-list": "^1.4.7", - "@elasticpath/react-shopper-hooks": "0.5.1", - "@elasticpath/shopper-common": "0.1.1", + "@elasticpath/react-shopper-hooks": "^0.5.1", + "@elasticpath/shopper-common": "^0.1.1", "@headlessui/react": "^1.7.17", "@heroicons/react": "^2.0.18", "@moltin/sdk": "^25.0.2", @@ -47,7 +47,8 @@ }, "devDependencies": { "@babel/core": "^7.18.10", - "@next/bundle-analyzer": "13.0.4", + "@next/bundle-analyzer": "^14.0.0", + "@next/env": "^14.0.0", "@svgr/webpack": "^6.3.1", "@types/node": "18.7.3", "@types/react": "^18.2.33", diff --git a/examples/basic/package.json b/examples/basic/package.json index 68203dc5..7d3ab2e6 100644 --- a/examples/basic/package.json +++ b/examples/basic/package.json @@ -20,8 +20,8 @@ "start:e2e": "NODE_ENV=test next start" }, "dependencies": { - "@elasticpath/react-shopper-hooks": "0.5.1", - "@elasticpath/shopper-common": "0.1.1", + "@elasticpath/react-shopper-hooks": "^0.5.1", + "@elasticpath/shopper-common": "^0.1.1", "@headlessui/react": "^1.7.17", "@heroicons/react": "^2.0.18", "@moltin/sdk": "^25.0.2", @@ -44,7 +44,8 @@ }, "devDependencies": { "@babel/core": "^7.18.10", - "@next/bundle-analyzer": "13.0.4", + "@next/bundle-analyzer": "^14.0.0", + "@next/env": "^14.0.0", "@svgr/webpack": "^6.3.1", "@types/node": "18.7.3", "@types/react": "^18.2.33", diff --git a/packages/d2c-schematics/utility/latest-versions.ts b/packages/d2c-schematics/utility/latest-versions.ts index be25ea79..b69168ed 100644 --- a/packages/d2c-schematics/utility/latest-versions.ts +++ b/packages/d2c-schematics/utility/latest-versions.ts @@ -3,11 +3,3 @@ export const latestVersions: Record = { // but ts_library doesn't support JSON inputs. ...require("./latest-versions/package.json")["dependencies"], } - -const reactShopperHooks = require("../../react-shopper-hooks/package.json") -const shopperCommon = require("../../shopper-common/package.json") - -export const localLatestVersions: Record = { - [reactShopperHooks.name]: reactShopperHooks.version.toString(), - [shopperCommon.name]: shopperCommon.version.toString(), -} diff --git a/packages/d2c-schematics/utility/latest-versions/package.json b/packages/d2c-schematics/utility/latest-versions/package.json index 1c8c63b2..7c558bea 100644 --- a/packages/d2c-schematics/utility/latest-versions/package.json +++ b/packages/d2c-schematics/utility/latest-versions/package.json @@ -4,8 +4,8 @@ "private": true, "dependencies": { "@moltin/sdk": "^25.0.2", - "@elasticpath/react-shopper-hooks": "0.5.1", - "@elasticpath/shopper-common": "0.1.1", + "@elasticpath/react-shopper-hooks": "^0.5.1", + "@elasticpath/shopper-common": "^0.1.1", "clsx": "^1.2.1", "cookies-next": "^4.0.0", "focus-visible": "^5.2.0", @@ -45,7 +45,8 @@ "react-instantsearch-nextjs": "^0.1.2", "server-only": "^0.0.1", "instantsearch.js": "4.58.0", - "@next/bundle-analyzer": "13.0.4", + "@next/bundle-analyzer": "^14.0.0", + "@next/env": "^14.0.0", "encoding": "^0.1.13", "@stripe/react-stripe-js": "^2.3.0", "@stripe/stripe-js": "^2.1.6", diff --git a/packages/d2c-schematics/workspace/files/package.json.template b/packages/d2c-schematics/workspace/files/package.json.template index 570ec416..108004f8 100644 --- a/packages/d2c-schematics/workspace/files/package.json.template +++ b/packages/d2c-schematics/workspace/files/package.json.template @@ -21,8 +21,8 @@ }, "dependencies": { "@moltin/sdk": "<%= latestVersions['@moltin/sdk'] %>", - "@elasticpath/react-shopper-hooks": "<%= localLatestVersions['@elasticpath/react-shopper-hooks'] %>", - "@elasticpath/shopper-common": "<%= localLatestVersions['@elasticpath/shopper-common'] %>", + "@elasticpath/react-shopper-hooks": "<%= latestVersions['@elasticpath/react-shopper-hooks'] %>", + "@elasticpath/shopper-common": "<%= latestVersions['@elasticpath/shopper-common'] %>", "clsx": "<%= latestVersions['clsx'] %>", "cookies-next": "<%= latestVersions['cookies-next'] %>", "focus-visible": "<%= latestVersions['focus-visible'] %>", @@ -43,6 +43,7 @@ "devDependencies": { "@babel/core": "<%= latestVersions['@babel/core'] %>", "@next/bundle-analyzer": "<%= latestVersions['@next/bundle-analyzer'] %>", + "@next/env": "<%= latestVersions['@next/env'] %>", "@svgr/webpack": "<%= latestVersions['@svgr/webpack'] %>", "@types/node": "<%= latestVersions['@types/node'] %>", "@types/react": "<%= latestVersions['@types/react'] %>", diff --git a/packages/d2c-schematics/workspace/index.ts b/packages/d2c-schematics/workspace/index.ts index 1b6f1dc9..bbe59f1b 100644 --- a/packages/d2c-schematics/workspace/index.ts +++ b/packages/d2c-schematics/workspace/index.ts @@ -9,7 +9,6 @@ import { filter, } from "@angular-devkit/schematics" import { latestVersions } from "../utility/latest-versions" -import { localLatestVersions } from "../utility/latest-versions" import { Schema as WorkspaceOptions } from "./schema" import { pathEndsWith } from "../utility/path-ends-with" @@ -31,7 +30,6 @@ export default function (options: WorkspaceOptions): Rule { ...options, dot: ".", latestVersions, - localLatestVersions, packageManager: options.packageManager ?? "npm", }), ]), diff --git a/packages/react-shopper-hooks/package.json b/packages/react-shopper-hooks/package.json index 1863d61b..346b53ec 100644 --- a/packages/react-shopper-hooks/package.json +++ b/packages/react-shopper-hooks/package.json @@ -21,8 +21,8 @@ } }, "devDependencies": { - "@types/react": "^18.2.0", - "@types/react-dom": "^18.2.0", + "@types/react": "^18.2.33", + "@types/react-dom": "^18.2.14", "@vitejs/plugin-react": "^2.2.0", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 88748f8a..a20c46c1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -97,10 +97,10 @@ importers: specifier: ^1.4.7 version: 1.4.7(classnames@2.3.2)(react-instantsearch-dom@6.40.4)(react@18.2.0) '@elasticpath/react-shopper-hooks': - specifier: 0.5.1 + specifier: ^0.5.1 version: link:../../packages/react-shopper-hooks '@elasticpath/shopper-common': - specifier: 0.1.1 + specifier: ^0.1.1 version: link:../../packages/shopper-common '@headlessui/react': specifier: ^1.7.17 @@ -170,8 +170,11 @@ importers: specifier: ^7.18.10 version: 7.23.2 '@next/bundle-analyzer': - specifier: 13.0.4 - version: 13.0.4 + specifier: ^14.0.0 + version: 14.0.0 + '@next/env': + specifier: ^14.0.0 + version: 14.0.0 '@playwright/test': specifier: ^1.28.1 version: 1.39.0 @@ -251,10 +254,10 @@ importers: examples/basic: dependencies: '@elasticpath/react-shopper-hooks': - specifier: 0.5.1 + specifier: ^0.5.1 version: link:../../packages/react-shopper-hooks '@elasticpath/shopper-common': - specifier: 0.1.1 + specifier: ^0.1.1 version: link:../../packages/shopper-common '@headlessui/react': specifier: ^1.7.17 @@ -318,8 +321,11 @@ importers: specifier: ^7.18.10 version: 7.23.2 '@next/bundle-analyzer': - specifier: 13.0.4 - version: 13.0.4 + specifier: ^14.0.0 + version: 14.0.0 + '@next/env': + specifier: ^14.0.0 + version: 14.0.0 '@playwright/test': specifier: ^1.28.1 version: 1.39.0 @@ -823,10 +829,10 @@ importers: version: 7.5.7 devDependencies: '@types/react': - specifier: ^18.2.0 - version: 18.2.31 + specifier: ^18.2.33 + version: 18.2.33 '@types/react-dom': - specifier: ^18.2.0 + specifier: ^18.2.14 version: 18.2.14 '@vitejs/plugin-react': specifier: ^2.2.0 @@ -5462,8 +5468,8 @@ packages: - supports-color dev: true - /@next/bundle-analyzer@13.0.4: - resolution: {integrity: sha512-GFbr0HX75Fv/S+R7NOXOUX7YBtg+snE3a/4ikEfouXVHzPakluIQL8ojYJTcR5Q6mBospGaldT19AdfuqRmPqQ==} + /@next/bundle-analyzer@14.0.0: + resolution: {integrity: sha512-a1Wbs0eXCMj30vxTfaGEO4DP3NjrqN+ge6rMhKZ43VtsXEjiVX95d7XFr7VkNps9lvlkofBF54RnIHhTJ2Ls0Q==} dependencies: webpack-bundle-analyzer: 4.7.0 transitivePeerDependencies: @@ -5473,7 +5479,6 @@ packages: /@next/env@14.0.0: resolution: {integrity: sha512-cIKhxkfVELB6hFjYsbtEeTus2mwrTC+JissfZYM0n+8Fv+g8ucUfOlm3VEDtwtwydZ0Nuauv3bl0qF82nnCAqA==} - dev: false /@next/eslint-plugin-next@12.3.4: resolution: {integrity: sha512-BFwj8ykJY+zc1/jWANsDprDIu2MgwPOIKxNVnrKvPs+f5TPegrVnem8uScND+1veT4B7F6VeqgaNLFW1Hzl9Og==} @@ -7261,6 +7266,7 @@ packages: '@types/prop-types': 15.7.9 '@types/scheduler': 0.16.5 csstype: 3.1.2 + dev: false /@types/react@18.2.33: resolution: {integrity: sha512-v+I7S+hu3PIBoVkKGpSYYpiBT1ijqEzWpzQD62/jm4K74hPpSP7FF9BnKG6+fg2+62weJYkkBWDJlZt5JO/9hg==}