From 8a4433b94331e0749fce33aec8cb6e415f448cc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Mon, 6 Jun 2022 13:02:24 +0200 Subject: [PATCH 1/3] Fixed PnP compatibility for bundled ui and router packages --- lib/router/package.json | 2 +- lib/ui/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/router/package.json b/lib/router/package.json index 89defca0d1d0..89cf5867d002 100644 --- a/lib/router/package.json +++ b/lib/router/package.json @@ -42,6 +42,7 @@ "dependencies": { "@storybook/client-logger": "6.5.0-rc.1", "core-js": "^3.8.2", + "qs": "^6.10.0", "regenerator-runtime": "^0.13.7" }, "devDependencies": { @@ -50,7 +51,6 @@ "history": "5.0.0", "lodash": "^4.17.21", "memoizerific": "^1.11.3", - "qs": "^6.10.0", "react-router": "6.0.2", "react-router-dom": "6.0.2", "ts-dedent": "^2.0.0", diff --git a/lib/ui/package.json b/lib/ui/package.json index b99d3582d1b7..9bf40dd1ff8c 100644 --- a/lib/ui/package.json +++ b/lib/ui/package.json @@ -50,6 +50,7 @@ "@storybook/semver": "^7.3.2", "@storybook/theming": "6.5.0-rc.1", "core-js": "^3.8.2", + "qs": "^6.10.0", "regenerator-runtime": "^0.13.7", "resolve-from": "^5.0.0" }, @@ -67,7 +68,6 @@ "markdown-to-jsx": "^7.1.3", "memoizerific": "^1.11.3", "polished": "^4.2.2", - "qs": "^6.10.0", "react-draggable": "^4.4.3", "react-helmet-async": "^1.0.7", "react-sizeme": "^3.0.1", From c09e922640857f37d630ddaf96514ef0c6a92625 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Mon, 6 Jun 2022 14:05:04 +0200 Subject: [PATCH 2/3] chore(CI): reenable cra pnp tests --- .circleci/config.yml | 45 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cd947ee9c6e0..6dcb72899d0d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -265,32 +265,31 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: '--depth 1 --verbose' - # TODO: we disabled this one because it keeps failing, we should fix it, and enable it again! - # - attach_workspace: - # at: . - # - run: - # name: Running local registry - # command: yarn local-registry --port 6000 --open - # background: true - # - run: - # name: Wait for registry - # command: yarn wait-on http://localhost:6000 - # - run: - # name: run e2e tests cra - # command: yarn test:e2e-framework --pnp cra + - attach_workspace: + at: . + - run: + name: Running local registry + command: yarn local-registry --port 6000 --open + background: true + - run: + name: Wait for registry + command: yarn wait-on http://localhost:6000 + - run: + name: run e2e tests cra + command: yarn test:e2e-framework --pnp cra # - run: # name: run e2e tests vue # command: yarn test:e2e-framework --pnp sfcVue - # - run: - # name: prep artifacts - # when: always - # command: zip -r /tmp/storybook-e2e-testing-out.zip /tmp/storybook-e2e-testing - # - store_artifacts: - # path: /tmp/cypress-record - # destination: cypress - # - store_artifacts: - # path: /tmp/storybook-e2e-testing-out.zip - # destination: e2e + - run: + name: prep artifacts + when: always + command: zip -r /tmp/storybook-e2e-testing-out.zip /tmp/storybook-e2e-testing + - store_artifacts: + path: /tmp/cypress-record + destination: cypress + - store_artifacts: + path: /tmp/storybook-e2e-testing-out.zip + destination: e2e e2e-tests-examples: executor: class: small From 90819e307b21fd430b175c0e5f0877ba164a188e Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Tue, 7 Jun 2022 11:25:23 +0200 Subject: [PATCH 3/3] fix: change the way presets are required --- lib/core-common/src/presets.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core-common/src/presets.ts b/lib/core-common/src/presets.ts index 24093df15337..886108625bd5 100644 --- a/lib/core-common/src/presets.ts +++ b/lib/core-common/src/presets.ts @@ -97,7 +97,7 @@ export const resolveAddonName = ( const managerFile = safeResolve(`${path}/manager`); const registerFile = safeResolve(`${path}/register`) || safeResolve(`${path}/register-panel`); const previewFile = safeResolve(`${path}/preview`); - const presetFile = safeResolve(`${path}/preset`); + const presetFile = r(`${path}/preset`); if (!(managerFile || previewFile) && presetFile) { return {