creevey 0.9.0-beta.7 → 0.9.0-beta.8

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.
@@ -145,9 +145,11 @@ async function waitForStorybook(browser) {
145
145
  return callback(false);
146
146
  }, Events.SET_STORIES);
147
147
  } else {
148
- wait = await browser.executeAsyncScript(function (callback) {
149
- return callback(typeof window.__STORYBOOK_ADDONS_CHANNEL__ == 'undefined');
150
- });
148
+ wait = await browser.executeAsyncScript(function (SET_GLOBALS, callback) {
149
+ if (typeof window.__STORYBOOK_ADDONS_CHANNEL__ == 'undefined') return callback(true);
150
+ if (window.__STORYBOOK_ADDONS_CHANNEL__.last(SET_GLOBALS) == undefined) return callback(true);
151
+ return callback(false);
152
+ }, Events.SET_GLOBALS);
151
153
  }
152
154
 
153
155
  if (!wait) clearTimeout(initiateTimeout);
@@ -37,8 +37,8 @@ async function register(config) {
37
37
  },
38
38
  modules: 'commonjs'
39
39
  }]],
40
- plugins: [['@babel/plugin-transform-runtime'], ['babel-plugin-tsconfig-paths', {
40
+ plugins: [['@babel/plugin-transform-runtime'], ...(tsConfigPath ? [['babel-plugin-tsconfig-paths', {
41
41
  tsconfig: tsConfigPath
42
- }]]
42
+ }]] : [])]
43
43
  })); // (await import('ts-node')).register({ project: tsConfigPath, transpileOnly: true });
44
44
  }
@@ -117,9 +117,11 @@ async function waitForStorybook(browser) {
117
117
  return callback(false);
118
118
  }, Events.SET_STORIES);
119
119
  } else {
120
- wait = await browser.executeAsyncScript(function (callback) {
121
- return callback(typeof window.__STORYBOOK_ADDONS_CHANNEL__ == 'undefined');
122
- });
120
+ wait = await browser.executeAsyncScript(function (SET_GLOBALS, callback) {
121
+ if (typeof window.__STORYBOOK_ADDONS_CHANNEL__ == 'undefined') return callback(true);
122
+ if (window.__STORYBOOK_ADDONS_CHANNEL__.last(SET_GLOBALS) == undefined) return callback(true);
123
+ return callback(false);
124
+ }, Events.SET_GLOBALS);
123
125
  }
124
126
 
125
127
  if (!wait) clearTimeout(initiateTimeout);
@@ -24,8 +24,8 @@ export default async function register(config) {
24
24
  },
25
25
  modules: 'commonjs'
26
26
  }]],
27
- plugins: [['@babel/plugin-transform-runtime'], ['babel-plugin-tsconfig-paths', {
27
+ plugins: [['@babel/plugin-transform-runtime'], ...(tsConfigPath ? [['babel-plugin-tsconfig-paths', {
28
28
  tsconfig: tsConfigPath
29
- }]]
29
+ }]] : [])]
30
30
  })); // (await import('ts-node')).register({ project: tsConfigPath, transpileOnly: true });
31
31
  }
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "addon",
14
14
  "test"
15
15
  ],
16
- "version": "0.9.0-beta.7",
16
+ "version": "0.9.0-beta.8",
17
17
  "bin": {
18
18
  "creevey": "./lib/cjs/cli.js"
19
19
  },