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

Build addons-actions with ts-up #18775

Merged
merged 10 commits into from
Sep 27, 2022
2 changes: 1 addition & 1 deletion code/addons/actions/manager.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import './dist/esm/manager';
import './dist/manager';
38 changes: 34 additions & 4 deletions code/addons/actions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,32 @@
"url": "https://opencollective.com/storybook"
},
"license": "MIT",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"types": "dist/types/index.d.ts",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
},
"./manager": {
"require": "./dist/manager.js",
"import": "./dist/manager.mjs",
"types": "./dist/manager.d.ts"
},
"./preview": {
"require": "./dist/preview.js",
"import": "./dist/preview.mjs",
"types": "./dist/preview.d.ts"
},
"./register.js": {
"require": "./dist/manager.js",
"import": "./dist/manager.mjs",
"types": "./dist/manager.d.ts"
},
"./package.json": "./package.json"
},
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist/**/*",
"README.md",
Expand All @@ -32,7 +55,7 @@
],
"scripts": {
"check": "../../../scripts/node_modules/.bin/tsc --noEmit",
"prep": "node ../../../scripts/prepare.js"
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/addons": "7.0.0-alpha.34",
Expand Down Expand Up @@ -72,6 +95,13 @@
"publishConfig": {
"access": "public"
},
"bundler": {
"entries": [
"./src/index.ts",
"./src/manager.tsx",
"./src/preview.ts"
]
},
"gitHead": "fc90fc875462421c1faa35862ac4bc436de8e75f",
"storybook": {
"displayName": "Actions",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/actions/preview.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './dist/esm/preset/preview';
export * from './dist/preview';
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Args, AnyFramework, ArgsEnhancer } from '@storybook/csf';
import { action } from '../index';
import { action } from './runtime/action';

// interface ActionsParameter {
// disable?: boolean;
Expand Down
3 changes: 3 additions & 0 deletions code/addons/actions/src/addDecorator.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { withActions } from './runtime/withActions';

export const decorators = [withActions];
2 changes: 1 addition & 1 deletion code/addons/actions/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

export * from './constants';
export * from './models';
export * from './preview';
export * from './runtime';

if (module && module.hot && module.hot.decline) {
module.hot.decline();
Expand Down
3 changes: 0 additions & 3 deletions code/addons/actions/src/preset/addDecorator.ts

This file was deleted.

5 changes: 0 additions & 5 deletions code/lib/channel-postmessage/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,6 @@ export class PostmsgTransport {
...eventOptions,
};

// backwards compat: convert depth to maxDepth
if (options && Number.isInteger(options.depth)) {
stringifyOptions.maxDepth = options.depth;
}

const frames = this.getFrames(target);

const query = qs.parse(location.search, { ignoreQueryPrefix: true });
Expand Down