From a642183e015f0cf573055feaa57f1b9f6cf53804 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Tue, 23 Jan 2024 14:58:54 +0100 Subject: [PATCH] use preview-api instead of client-api --- package.json | 3 +-- pnpm-lock.yaml | 33 +++++++++++++++------------------ src/parser/collect-stories.ts | 2 +- 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index eaf23fc..ba81267 100644 --- a/package.json +++ b/package.json @@ -58,9 +58,8 @@ "@storybook/addon-actions": "^7.1.1", "@storybook/addon-essentials": "^7.1.1", "@storybook/addon-interactions": "^7.1.1", - "@storybook/client-api": "^7.1.1", + "@storybook/preview-api": "^7.1.1", "@storybook/client-logger": "^7.1.1", - "@storybook/core-client": "^7.1.1", "@storybook/core-server": "^7.1.1", "@storybook/csf": "^0.1.1", "@storybook/eslint-config-storybook": "^3.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3602d2e..de4d95e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -34,15 +34,9 @@ devDependencies: '@storybook/addon-interactions': specifier: ^7.1.1 version: 7.1.1(react-dom@18.2.0)(react@18.2.0) - '@storybook/client-api': - specifier: ^7.1.1 - version: 7.1.1 '@storybook/client-logger': specifier: ^7.1.1 version: 7.1.1 - '@storybook/core-client': - specifier: ^7.1.1 - version: 7.1.1 '@storybook/core-server': specifier: ^7.1.1 version: 7.1.1 @@ -55,6 +49,9 @@ devDependencies: '@storybook/jest': specifier: ^0.1.0 version: 0.1.0 + '@storybook/preview-api': + specifier: ^7.1.1 + version: 7.1.1 '@storybook/svelte': specifier: ^7.1.1 version: 7.1.1(svelte@4.0.0) @@ -3179,13 +3176,6 @@ packages: - utf-8-validate dev: true - /@storybook/client-api@7.1.1: - resolution: {integrity: sha512-e6dTrgZOfO29EcckvHiBcojPCWhW0UYWREId2aXBwL6W5hP6zejbirc3SEXECehOOrlKnyY816AWtF7xEGFNKw==} - dependencies: - '@storybook/client-logger': 7.1.1 - '@storybook/preview-api': 7.1.1 - dev: true - /@storybook/client-logger@7.0.0: resolution: {integrity: sha512-wRZZiPta37DFc8SVZ8Q3ZqyTrs5qgO6bcCuVDRLQAcO0Oz4xKEVPEVfVVxSPZU/+p2ypqdBBCP2pdL/Jy86AJg==} dependencies: @@ -3400,10 +3390,10 @@ packages: - typescript dev: true - /@storybook/expect@27.5.2-0: - resolution: {integrity: sha512-cP99mhWN/JeCp7VSIiymvj5tmuMY050iFohvp8Zq+kewKsBSZ6/qpTJAGCCZk6pneTcp4S0Fm5BSqyxzbyJ3gw==} + /@storybook/expect@28.1.3-5: + resolution: {integrity: sha512-lS1oJnY1qTAxnH87C765NdfvGhksA6hBcbUVI5CHiSbNsEtr456wtg/z+dT9XlPriq1D5t2SgfNL9dBAoIGyIA==} dependencies: - '@types/jest': 29.5.3 + '@types/jest': 28.1.3 dev: true /@storybook/global@5.0.0: @@ -3422,7 +3412,7 @@ packages: /@storybook/jest@0.1.0: resolution: {integrity: sha512-TmybnEXlv5Fu2/Hq4nRj7alS9mw4CasLR0RDwaAzS+Vpvu1TC4+j9rh+b1BHtmWebbJh0JMT6mgzPqOyJdgtQA==} dependencies: - '@storybook/expect': 27.5.2-0 + '@storybook/expect': 28.1.3-5 '@storybook/instrumenter': 7.1.1 '@testing-library/jest-dom': 5.17.0 jest-mock: 27.5.1 @@ -4080,6 +4070,13 @@ packages: '@types/istanbul-lib-report': 3.0.0 dev: true + /@types/jest@28.1.3: + resolution: {integrity: sha512-Tsbjk8Y2hkBaY/gJsataeb4q9Mubw9EOz7+4RjPkzD5KjTvHHs7cpws22InaoXxAVAhF5HfFbzJjo6oKWqSZLw==} + dependencies: + jest-matcher-utils: 28.1.3 + pretty-format: 28.1.3 + dev: true + /@types/jest@29.5.3: resolution: {integrity: sha512-1Nq7YrO/vJE/FYnqYyw0FS8LdrjExSgIiHyKg7xPpn+yi8Q4huZryKnkJatN1ZRH89Kw2v33/8ZMB7DuZeSLlA==} dependencies: @@ -8776,7 +8773,7 @@ packages: jest-pnp-resolver: 1.2.3(jest-resolve@29.6.2) jest-util: 29.6.2 jest-validate: 29.6.2 - resolve: 1.22.2 + resolve: 1.22.3 resolve.exports: 2.0.2 slash: 3.0.0 dev: true diff --git a/src/parser/collect-stories.ts b/src/parser/collect-stories.ts index 5a5e218..9461d8c 100644 --- a/src/parser/collect-stories.ts +++ b/src/parser/collect-stories.ts @@ -2,7 +2,7 @@ import RegisterContext from '../components/RegisterContext.svelte'; import RenderContext from '../components/RenderContext.svelte'; -import { combineParameters } from '@storybook/client-api'; +import { combineParameters } from '@storybook/preview-api'; import { extractId } from './extract-id.js'; import { logger } from '@storybook/client-logger';