@suss/contract-storybook 0.3.2 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -35,6 +35,7 @@ __export(index_exports, {
35
35
  module.exports = __toCommonJS(index_exports);
36
36
  var import_node_path = __toESM(require("path"), 1);
37
37
  var import_ts_morph = require("ts-morph");
38
+ var import_adapter_typescript = require("@suss/adapter-typescript");
38
39
  var import_behavioral_ir = require("@suss/behavioral-ir");
39
40
  function generateSummariesFromStories(filePaths, options = {}) {
40
41
  const project = new import_ts_morph.Project({
@@ -136,7 +137,7 @@ function unwrapToObjectLiteral(node) {
136
137
  }
137
138
  function extractStories(sf) {
138
139
  const results = [];
139
- for (const [name, decls] of sf.getExportedDeclarations()) {
140
+ for (const [name, decls] of (0, import_adapter_typescript.exportedDeclarationsOf)(sf)) {
140
141
  if (name === "default") {
141
142
  continue;
142
143
  }
package/dist/index.d.cts CHANGED
@@ -2,7 +2,7 @@ import { BehavioralSummary } from '@suss/behavioral-ir';
2
2
 
3
3
  interface StorybookStubOptions {
4
4
  /**
5
- * Project root — used to compute portable relative paths in each
5
+ * Project root: used to compute portable relative paths in each
6
6
  * summary's `location.file`. Defaults to the cwd.
7
7
  */
8
8
  projectRoot?: string;
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import { BehavioralSummary } from '@suss/behavioral-ir';
2
2
 
3
3
  interface StorybookStubOptions {
4
4
  /**
5
- * Project root — used to compute portable relative paths in each
5
+ * Project root: used to compute portable relative paths in each
6
6
  * summary's `location.file`. Defaults to the cwd.
7
7
  */
8
8
  projectRoot?: string;
package/dist/index.js CHANGED
@@ -4,6 +4,7 @@ import {
4
4
  Project,
5
5
  SyntaxKind
6
6
  } from "ts-morph";
7
+ import { exportedDeclarationsOf } from "@suss/adapter-typescript";
7
8
  import { functionCallBinding } from "@suss/behavioral-ir";
8
9
  function generateSummariesFromStories(filePaths, options = {}) {
9
10
  const project = new Project({
@@ -105,7 +106,7 @@ function unwrapToObjectLiteral(node) {
105
106
  }
106
107
  function extractStories(sf) {
107
108
  const results = [];
108
- for (const [name, decls] of sf.getExportedDeclarations()) {
109
+ for (const [name, decls] of exportedDeclarationsOf(sf)) {
109
110
  if (name === "default") {
110
111
  continue;
111
112
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suss/contract-storybook",
3
- "version": "0.3.2",
3
+ "version": "0.5.0",
4
4
  "type": "module",
5
5
  "description": "Generate suss behavioral summaries from Storybook CSF story files.",
6
6
  "keywords": [
@@ -45,7 +45,8 @@
45
45
  "typecheck": "tsc --noEmit"
46
46
  },
47
47
  "dependencies": {
48
- "@suss/behavioral-ir": "0.3.2",
48
+ "@suss/adapter-typescript": "0.5.0",
49
+ "@suss/behavioral-ir": "0.5.0",
49
50
  "ts-morph": "*"
50
51
  },
51
52
  "devDependencies": {