diff --git a/.changeset/fuzzy-buckets-drive.md b/.changeset/fuzzy-buckets-drive.md new file mode 100644 index 00000000..d6ea58bf --- /dev/null +++ b/.changeset/fuzzy-buckets-drive.md @@ -0,0 +1,12 @@ +--- +"@elasticpath/composable-integration-hub-deployer": patch +"@elasticpath/react-shopper-hooks": patch +"@elasticpath/composable-common": patch +"composable-cli": patch +"@elasticpath/d2c-schematics": patch +"@elasticpath/shopper-common": patch +--- + +### migrated from yarn to pnpm + +- Having issue managing the yarn workspace moved to pnpm diff --git a/.changeset/tough-bugs-run.md b/.changeset/tough-bugs-run.md new file mode 100644 index 00000000..3d94f993 --- /dev/null +++ b/.changeset/tough-bugs-run.md @@ -0,0 +1,6 @@ +--- +"@elasticpath/react-shopper-hooks": minor +"@elasticpath/shopper-common": minor +--- + +add navigation to shopper store context diff --git a/.github/workflows/generate-examples.yml b/.github/workflows/generate-examples.yml index 527056c2..fb8a076a 100644 --- a/.github/workflows/generate-examples.yml +++ b/.github/workflows/generate-examples.yml @@ -32,10 +32,15 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 + - uses: pnpm/action-setup@v2 + with: + version: 8 + - name: Setup Node.js 16.x uses: actions/setup-node@v3 with: node-version: 16.x + cache: pnpm - name: Make .env.examples file (used in examples configuration.ts) run: | @@ -48,13 +53,13 @@ jobs: cat ./packages/composable-cli/.env - name: Install Dependencies - run: yarn install + run: pnpm install - name: Build schematic schema types - run: yarn generate + run: pnpm generate - name: Build packages/* - run: yarn build:packages + run: pnpm build:packages - name: Report "Run packages unit and Integration tests" starting uses: dflydev/check-runs-action@v1 @@ -64,7 +69,7 @@ jobs: status: in_progress - name: Run packages unit and Integration tests - run: yarn test:packages + run: pnpm test:packages id: packages-unit-int-tests continue-on-error: true @@ -86,7 +91,7 @@ jobs: - name: Generate latest examples using script id: generate-examples - run: yarn scaffold:local + run: pnpm scaffold:local continue-on-error: true - name: Report "Generate latest examples using script" conclusion @@ -109,7 +114,7 @@ jobs: add: '*' - name: Install additional dependencies - run: yarn install + run: pnpm install - name: Report "Run examples unit/integration tests" starting uses: dflydev/check-runs-action@v1 @@ -120,7 +125,7 @@ jobs: - name: Run examples unit/integration tests id: examples-unit-int-tests - run: yarn test + run: pnpm test continue-on-error: true - name: Report "Run examples unit/integration tests" conclusion @@ -139,7 +144,7 @@ jobs: echo NEXT_PUBLIC_CI=true >> ./examples/basic/.env.test - name: Build everything - run: yarn build:e2e + run: pnpm build:e2e - name: Install playwright browsers run: npx playwright install --with-deps @@ -152,7 +157,7 @@ jobs: status: in_progress - name: Run e2e tests for latest examples - run: yarn test:e2e + run: pnpm test:e2e id: examples-e2e-tests continue-on-error: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c7f1fb0d..813ed36e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,12 +13,17 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 + + - uses: pnpm/action-setup@v2 + with: + version: 8 - name: Setup Node.js 16.x - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: 16.x + cache: 'pnpm' - name: Make .env file for composable-cli package run: | @@ -27,14 +32,14 @@ jobs: cat ./packages/composable-cli/.env - name: Install Dependencies - run: yarn + run: pnpm install - name: Create Release Pull Request or Publish to npm id: changesets uses: changesets/action@v1 with: # This expects you to have a script called release which does a build for your packages and calls changeset publish - publish: yarn release + publish: pnpm release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/README.md b/README.md index a56df947..73e26518 100644 --- a/README.md +++ b/README.md @@ -2,16 +2,16 @@ ## Setup -Run `yarn generate` to generate the types for schematic schemas during development +Run `pnpm generate` to generate the types for schematic schemas during development ## What's inside? -This turborepo uses [Yarn](https://classic.yarnpkg.com/lang/en/) as a package manager. +This turborepo uses [PNPM](https://pnpm.io/) as a package manager. ### Build To build all apps and packages, run the following command: ``` -yarn build +pnpm build ``` \ No newline at end of file diff --git a/examples/algolia/.composablerc b/examples/algolia/.composablerc index 81745113..7537a1b3 100644 --- a/examples/algolia/.composablerc +++ b/examples/algolia/.composablerc @@ -1,3 +1,6 @@ { - "version": 1 + "version": 1, + "cli": { + "packageManager": "pnpm" + } } \ No newline at end of file diff --git a/examples/algolia/package.json b/examples/algolia/package.json index acd9db51..1540144d 100644 --- a/examples/algolia/package.json +++ b/examples/algolia/package.json @@ -14,14 +14,14 @@ "test": "vitest run", "test:coverage": "vitest run --coverage", "test:watch": "vitest", - "test:ci:e2e": "NODE_ENV=test yarn build && (yarn start & (sleep 5 && npx playwright install --with-deps && yarn test:e2e && kill $(lsof -t -i tcp:3000)))", + "test:ci:e2e": "NODE_ENV=test pnpm build && (pnpm start & (sleep 5 && npx playwright install --with-deps && pnpm test:e2e && kill $(lsof -t -i tcp:3000)))", "test:e2e": "NODE_ENV=test playwright test", "build:e2e": "NODE_ENV=test next build", "start:e2e": "NODE_ENV=test next start" }, "dependencies": { "@algolia/react-instantsearch-widget-color-refinement-list": "^1.4.7", - "@elasticpath/react-shopper-hooks": "^0.4.0", + "@elasticpath/react-shopper-hooks": "0.4.0", "@headlessui/react": "^1.7.17", "@heroicons/react": "^2.0.18", "@moltin/sdk": "^25.0.2", @@ -46,30 +46,31 @@ "devDependencies": { "@babel/core": "^7.18.10", "@next/bundle-analyzer": "13.0.4", + "@playwright/test": "^1.28.1", "@svgr/webpack": "^6.3.1", + "@testing-library/jest-dom": "^6.1.3", + "@testing-library/react": "^14.0.0", "@types/node": "18.7.3", "@types/react": "^18.2.0", "@types/react-dom": "^18.2.0", + "@types/react-toastify": "^4.1.0", + "@vitest/coverage-istanbul": "^0.34.5", + "autoprefixer": "^10.4.14", "babel-loader": "^8.2.5", "eslint": "^8.49.0", "eslint-config-next": "^13.5.2", "eslint-config-prettier": "^9.0.0", "eslint-plugin-react": "^7.33.2", - "vite": "^4.2.1", - "vitest": "^0.34.5", - "@vitest/coverage-istanbul": "^0.34.5", - "@testing-library/jest-dom": "^6.1.3", - "@testing-library/react": "^14.0.0", - "@playwright/test": "^1.28.1", + "instantsearch.js": "4.56.8", "lint-staged": "^13.0.3", + "postcss": "^8.4.30", "prettier": "^3.0.3", "prettier-eslint": "^15.0.1", "prettier-eslint-cli": "^7.1.0", - "typescript": "^5.2.2", - "tailwindcss": "^3.3.3", - "autoprefixer": "^10.4.14", - "postcss": "^8.4.30", "prettier-plugin-tailwindcss": "^0.5.4", - "@types/react-toastify": "^4.1.0" + "tailwindcss": "^3.3.3", + "typescript": "^5.2.2", + "vite": "^4.2.1", + "vitest": "^0.34.5" } } \ No newline at end of file diff --git a/examples/algolia/src/components/search/MobileFilters.tsx b/examples/algolia/src/components/search/MobileFilters.tsx index 9cd980fa..6c563eaa 100644 --- a/examples/algolia/src/components/search/MobileFilters.tsx +++ b/examples/algolia/src/components/search/MobileFilters.tsx @@ -86,9 +86,6 @@ export default function MobileFilters({ diff --git a/examples/algolia/src/components/search/SearchModal.tsx b/examples/algolia/src/components/search/SearchModal.tsx index c4de7fae..e07c8237 100644 --- a/examples/algolia/src/components/search/SearchModal.tsx +++ b/examples/algolia/src/components/search/SearchModal.tsx @@ -153,9 +153,6 @@ export const SearchModal = (): JSX.Element => {