histoire 0.7.1 → 0.7.4

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.
Files changed (118) hide show
  1. package/client.d.ts +1 -1
  2. package/dist/bundled/MobileOverlay.js +2 -2
  3. package/dist/bundled/StoryView.js +22 -19
  4. package/dist/bundled/dark.js +4 -0
  5. package/dist/bundled/index.js +0 -1
  6. package/dist/bundled/index2.js +6 -6
  7. package/dist/bundled/mapping.js +78 -0
  8. package/dist/bundled/sandbox.js +7 -6
  9. package/dist/bundled/state.js +13 -44
  10. package/dist/bundled/style.css +17 -17
  11. package/dist/client/app/App.vue +2 -2
  12. package/dist/client/app/components/base/BaseSplitPane.vue +6 -6
  13. package/dist/client/app/components/panel/ControlsComponentPropItem.vue +13 -6
  14. package/dist/client/app/components/panel/ControlsComponentProps.vue +2 -1
  15. package/dist/client/app/components/panel/StatePresets.vue +2 -1
  16. package/dist/client/app/components/panel/StoryControls.vue +1 -1
  17. package/dist/client/app/components/panel/StorySourceCode.vue +2 -2
  18. package/dist/client/app/components/story/StoryVariantGridItem.vue +1 -1
  19. package/dist/client/app/components/story/StoryVariantSinglePreviewNative.vue +1 -1
  20. package/dist/client/app/components/story/StoryVariantSinglePreviewRemote.vue +3 -2
  21. package/dist/client/app/components/story/StoryVariantSingleView.vue +1 -1
  22. package/dist/client/app/components/toolbar/StoryVariantNewTab.vue +1 -1
  23. package/dist/client/app/components/tree/StoryGroup.vue +1 -1
  24. package/dist/client/app/index.js +0 -2
  25. package/dist/client/app/sandbox.js +4 -5
  26. package/dist/client/app/style/main.pcss +3 -3
  27. package/dist/client/app/style/sandbox.css +1 -1
  28. package/dist/client/app/types.d.ts +1 -52
  29. package/dist/client/app/util/mapping.d.ts +1 -1
  30. package/dist/client/app/util/mapping.js +50 -36
  31. package/dist/client/app/{components/sandbox/lib.d.ts → util/sandbox.d.ts} +1 -1
  32. package/dist/client/app/{components/sandbox/lib.js → util/sandbox.js} +1 -1
  33. package/dist/client/app/util/state.d.ts +1 -5
  34. package/dist/client/app/util/state.js +12 -44
  35. package/dist/node/collect/index.d.ts +2 -2
  36. package/dist/node/collect/index.js +3 -0
  37. package/dist/node/collect/run.d.ts +2 -0
  38. package/dist/{client/server/index.js → node/collect/run.js} +1 -1
  39. package/dist/node/collect/worker.d.ts +3 -3
  40. package/dist/node/collect/worker.js +4 -1
  41. package/dist/node/config.d.ts +3 -3
  42. package/dist/node/context.d.ts +2 -2
  43. package/dist/node/plugin.d.ts +3 -3
  44. package/dist/node/stories.d.ts +4 -4
  45. package/dist/node/tree.d.ts +3 -22
  46. package/dist/style.css +80 -4
  47. package/package.json +4 -2
  48. package/src/client/app/App.vue +2 -2
  49. package/src/client/app/components/base/BaseSplitPane.vue +6 -6
  50. package/src/client/app/components/panel/ControlsComponentPropItem.vue +13 -6
  51. package/src/client/app/components/panel/ControlsComponentProps.vue +2 -1
  52. package/src/client/app/components/panel/StatePresets.vue +2 -1
  53. package/src/client/app/components/panel/StoryControls.vue +1 -1
  54. package/src/client/app/components/panel/StorySourceCode.vue +2 -2
  55. package/src/client/app/components/story/StoryVariantGridItem.vue +1 -1
  56. package/src/client/app/components/story/StoryVariantSinglePreviewNative.vue +1 -1
  57. package/src/client/app/components/story/StoryVariantSinglePreviewRemote.vue +3 -2
  58. package/src/client/app/components/story/StoryVariantSingleView.vue +1 -1
  59. package/src/client/app/components/toolbar/StoryVariantNewTab.vue +1 -1
  60. package/src/client/app/components/tree/StoryGroup.vue +1 -1
  61. package/src/client/app/index.ts +0 -2
  62. package/src/client/app/sandbox.ts +4 -5
  63. package/src/client/app/style/main.pcss +3 -3
  64. package/src/client/app/style/sandbox.css +1 -1
  65. package/src/client/app/types.ts +6 -57
  66. package/src/client/app/util/mapping.ts +47 -34
  67. package/src/client/app/{components/sandbox/lib.ts → util/sandbox.ts} +2 -2
  68. package/src/client/app/util/state.ts +15 -44
  69. package/src/node/collect/index.ts +5 -2
  70. package/src/node/collect/run.ts +13 -0
  71. package/src/node/collect/worker.ts +8 -6
  72. package/src/node/config.ts +3 -3
  73. package/src/node/context.ts +2 -2
  74. package/src/node/plugin.ts +2 -2
  75. package/src/node/server.ts +2 -2
  76. package/src/node/stories.ts +4 -4
  77. package/src/node/tree.ts +7 -31
  78. package/tailwind.config.cjs +1 -1
  79. package/vite.config.ts +12 -7
  80. package/dist/bundled/SandboxVue3.js +0 -706
  81. package/dist/bundled/global-components.js +0 -213
  82. package/dist/client/app/codegen/const.d.ts +0 -1
  83. package/dist/client/app/codegen/const.js +0 -3
  84. package/dist/client/app/codegen/serialize-js.d.ts +0 -1
  85. package/dist/client/app/codegen/serialize-js.js +0 -113
  86. package/dist/client/app/codegen/util.d.ts +0 -10
  87. package/dist/client/app/codegen/util.js +0 -70
  88. package/dist/client/app/codegen/vue3.d.ts +0 -4
  89. package/dist/client/app/codegen/vue3.js +0 -357
  90. package/dist/client/app/components/exposed/Story.vue +0 -106
  91. package/dist/client/app/components/exposed/Variant.vue +0 -78
  92. package/dist/client/app/components/sandbox/RouterLinkStub.d.ts +0 -21
  93. package/dist/client/app/components/sandbox/RouterLinkStub.js +0 -43
  94. package/dist/client/app/components/sandbox/SandboxVue3.vue +0 -185
  95. package/dist/client/app/global-components.d.ts +0 -2
  96. package/dist/client/app/global-components.js +0 -10
  97. package/dist/client/server/index.d.ts +0 -7
  98. package/dist/client/server/vue3/Story.vue +0 -120
  99. package/dist/client/server/vue3/Variant.vue +0 -52
  100. package/dist/client/server/vue3/run.d.ts +0 -2
  101. package/dist/client/server/vue3/run.js +0 -45
  102. package/dist/node/types.d.ts +0 -50
  103. package/dist/node/types.js +0 -1
  104. package/src/client/app/codegen/const.ts +0 -3
  105. package/src/client/app/codegen/serialize-js.ts +0 -119
  106. package/src/client/app/codegen/util.ts +0 -79
  107. package/src/client/app/codegen/vue3.ts +0 -361
  108. package/src/client/app/components/exposed/Story.vue +0 -106
  109. package/src/client/app/components/exposed/Variant.vue +0 -78
  110. package/src/client/app/components/sandbox/RouterLinkStub.ts +0 -49
  111. package/src/client/app/components/sandbox/SandboxVue3.vue +0 -185
  112. package/src/client/app/global-components.ts +0 -13
  113. package/src/client/server/index.ts +0 -19
  114. package/src/client/server/vue3/Story.vue +0 -120
  115. package/src/client/server/vue3/Variant.vue +0 -52
  116. package/src/client/server/vue3/run.ts +0 -55
  117. package/src/components.d.ts +0 -143
  118. package/src/node/types.ts +0 -53
@@ -1,61 +1,32 @@
1
1
  import { unref, isRef } from 'vue'
2
- import type { Variant } from '../types'
3
2
 
4
3
  const isObject = (val) => val !== null && typeof val === 'object'
5
4
 
6
- export function toRawDeep (val) {
5
+ export function toRawDeep (val, seen = new Set()) {
7
6
  const unwrappedValue = isRef(val) ? unref(val) : val
8
7
 
8
+ if (typeof unwrappedValue === 'symbol') {
9
+ return unwrappedValue.toString()
10
+ }
11
+
12
+ if (seen.has(unwrappedValue)) {
13
+ return Array.isArray(unwrappedValue) ? [] : {}
14
+ }
15
+
16
+ seen.add(unwrappedValue)
17
+
9
18
  if (!isObject(unwrappedValue)) {
10
19
  return unwrappedValue
11
20
  }
12
21
 
13
22
  if (Array.isArray(unwrappedValue)) {
14
- return unwrappedValue.map(toRawDeep)
23
+ return unwrappedValue.map(value => toRawDeep(value, seen))
15
24
  }
16
25
 
17
- return toRawObject(unwrappedValue)
26
+ return toRawObject(unwrappedValue, seen)
18
27
  }
19
28
 
20
- const toRawObject = (obj: Record<any, any>) => Object.keys(obj).reduce((raw, key) => {
21
- raw[key] = toRawDeep(obj[key])
29
+ const toRawObject = (obj: Record<any, any>, seen = new Set()) => Object.keys(obj).reduce((raw, key) => {
30
+ raw[key] = toRawDeep(obj[key], seen)
22
31
  return raw
23
32
  }, {})
24
-
25
- export function clone (data) {
26
- try {
27
- return structuredClone(data)
28
- } catch (e) {
29
- console.warn(e, `Fallback to JSON cloning`)
30
- try {
31
- return JSON.parse(JSON.stringify(data))
32
- } catch (e) {
33
- console.error(e)
34
- }
35
- return data
36
- }
37
- }
38
-
39
- export function omit (data, keys: string[]) {
40
- const copy = {}
41
- for (const key in data) {
42
- if (!keys.includes(key)) {
43
- copy[key] = data[key]
44
- }
45
- }
46
- return copy
47
- }
48
-
49
- export function applyStateToVariant (variant: Variant, state: any) {
50
- if (variant.state) {
51
- for (const key in state) {
52
- if (variant.state[key] && !key.startsWith('_h') && typeof variant.state[key] === 'object' && !Array.isArray(variant.state[key])) {
53
- Object.assign(variant.state[key], state[key])
54
- } else {
55
- variant.state[key] = state[key]
56
- }
57
- }
58
- } else {
59
- variant.state = state
60
- }
61
- }
@@ -7,7 +7,7 @@ import pc from 'picocolors'
7
7
  import Tinypool from 'tinypool'
8
8
  import { createBirpc } from 'birpc'
9
9
  import { cpus } from 'os'
10
- import type { StoryFile } from '../types.js'
10
+ import type { ServerStoryFile } from '@histoire/shared'
11
11
  import { createPath } from '../tree.js'
12
12
  import type { Context } from '../context.js'
13
13
  import type { Payload, ReturnData } from './worker.js'
@@ -24,7 +24,10 @@ export function useCollectStories (options: UseCollectStoriesOptions, ctx: Conte
24
24
  deps: {
25
25
  inline: [
26
26
  /histoire\/dist/,
27
+ /@histoire\/[\w\d-]+\/dist/,
28
+ /histoire-[\w\d-]+\/dist/,
27
29
  /@vue\/devtools-api/,
30
+ /vuetify/,
28
31
  ...ctx.config.viteNodeInlineDeps ?? [],
29
32
  ],
30
33
  },
@@ -70,7 +73,7 @@ export function useCollectStories (options: UseCollectStoriesOptions, ctx: Conte
70
73
  }
71
74
  }
72
75
 
73
- async function executeStoryFile (storyFile: StoryFile) {
76
+ async function executeStoryFile (storyFile: ServerStoryFile) {
74
77
  try {
75
78
  const { workerPort } = createChannel()
76
79
  const { storyData } = await threadPool.run({
@@ -0,0 +1,13 @@
1
+ import type { ServerRunPayload } from '@histoire/shared'
2
+
3
+ export async function run (payload: ServerRunPayload) {
4
+ let result: any
5
+
6
+ // @TODO if (vue3)
7
+ {
8
+ const { run } = await import('@histoire/plugin-vue/collect')
9
+ result = await run(payload)
10
+ }
11
+
12
+ return result
13
+ }
@@ -4,9 +4,8 @@ import { ViteNodeRunner } from 'vite-node/client'
4
4
  import { createBirpc } from 'birpc'
5
5
  import type { FetchFunction, ResolveIdFunction } from 'vite-node'
6
6
  import { dirname, resolve } from 'pathe'
7
+ import type { ServerStoryFile, ServerStory, ServerRunPayload } from '@histoire/shared'
7
8
  import { createDomEnv } from '../dom/env.js'
8
- import type { StoryFile, Story } from '../types.js'
9
- import type { ServerRunPayload } from '../../client/server/index.js'
10
9
 
11
10
  const __dirname = dirname(fileURLToPath(import.meta.url))
12
11
 
@@ -14,11 +13,11 @@ export interface Payload {
14
13
  root: string
15
14
  base: string
16
15
  port: MessagePort
17
- storyFile: StoryFile
16
+ storyFile: ServerStoryFile
18
17
  }
19
18
 
20
19
  export interface ReturnData {
21
- storyData: Story[]
20
+ storyData: ServerStory[]
22
21
  }
23
22
 
24
23
  export default async (payload: Payload): Promise<ReturnData> => {
@@ -42,12 +41,15 @@ export default async (payload: Payload): Promise<ReturnData> => {
42
41
  })
43
42
 
44
43
  const { destroy: destroyDomEnv } = createDomEnv()
44
+ if (!global.CSS.supports) {
45
+ global.CSS.supports = () => false
46
+ }
45
47
 
46
48
  const el = window.document.createElement('div')
47
49
 
48
50
  // Mount app to collect stories/variants
49
- const { run } = (await runner.executeFile(resolve(__dirname, '../../client/server/index.js'))) as { run: (payload: ServerRunPayload) => Promise<any> }
50
- const storyData: Story[] = []
51
+ const { run } = (await runner.executeFile(resolve(__dirname, './run.js'))) as { run: (payload: ServerRunPayload) => Promise<any> }
52
+ const storyData: ServerStory[] = []
51
53
  await run({
52
54
  file: payload.storyFile,
53
55
  storyData,
@@ -11,7 +11,7 @@ import { ViteNodeServer } from 'vite-node/server'
11
11
  import { ViteNodeRunner } from 'vite-node/client'
12
12
  import pc from 'picocolors'
13
13
  import type MarkdownIt from 'markdown-it'
14
- import { TreeFile } from './tree.js'
14
+ import type { ServerTreeFile } from '@histoire/shared'
15
15
  import { defaultColors } from './colors.js'
16
16
  import { Plugin } from './plugin.js'
17
17
  import { findUp } from './util/find-up.js'
@@ -35,7 +35,7 @@ export interface BackgroundPreset {
35
35
  export interface TreeGroupConfig {
36
36
  title: string
37
37
  id?: string
38
- include?: (file: TreeFile) => boolean
38
+ include?: (file: ServerTreeFile) => boolean
39
39
  }
40
40
 
41
41
  export interface HistoireConfig {
@@ -61,7 +61,7 @@ export interface HistoireConfig {
61
61
  *
62
62
  * Use `'path'` use the real folder structure on your computer.
63
63
  */
64
- file?: 'title' | 'path' | ((file: TreeFile) => string[])
64
+ file?: 'title' | 'path' | ((file: ServerTreeFile) => string[])
65
65
  order?: 'asc' | ((a: string, b: string) => number)
66
66
  groups?: TreeGroupConfig[]
67
67
  }
@@ -1,12 +1,12 @@
1
1
  import { resolveConfig as resolveViteConfig } from 'vite'
2
+ import type { ServerStoryFile } from '@histoire/shared'
2
3
  import { resolveConfig, HistoireConfig, ConfigMode } from './config.js'
3
- import type { StoryFile } from './types.js'
4
4
 
5
5
  export interface Context {
6
6
  root: string
7
7
  config: HistoireConfig
8
8
  mode: ConfigMode
9
- storyFiles: StoryFile[]
9
+ storyFiles: ServerStoryFile[]
10
10
  }
11
11
 
12
12
  export interface CreateContextOptions {
@@ -2,12 +2,12 @@ import chokidar from 'chokidar'
2
2
  import path from 'pathe'
3
3
  import fs from 'fs-extra'
4
4
  import pc from 'picocolors'
5
+ import type { ServerStory, ServerVariant } from '@histoire/shared'
5
6
  import { TEMP_PATH } from './alias.js'
6
7
  import type { ConfigMode, HistoireConfig } from './config.js'
7
8
  import type { Context } from './context.js'
8
9
  import type { ModuleLoader } from './load.js'
9
10
  import { addStory, removeStory } from './stories.js'
10
- import type { Story, Variant } from './types.js'
11
11
 
12
12
  export interface Plugin {
13
13
  /**
@@ -77,7 +77,7 @@ export class DevPluginApi extends BasePluginApi {
77
77
  }
78
78
 
79
79
  export type BuildEndCallback = () => Promise<void> | void
80
- export type PreviewStoryCallback = (payload: { file: string, story: Story, variant: Variant, url: string }) => Promise<void> | void
80
+ export type PreviewStoryCallback = (payload: { file: string, story: ServerStory, variant: ServerVariant, url: string }) => Promise<void> | void
81
81
 
82
82
  export class BuildPluginApi extends BasePluginApi {
83
83
  buildEndCallbacks: BuildEndCallback[] = []
@@ -1,9 +1,9 @@
1
1
  import { createServer as createViteServer } from 'vite'
2
+ import type { ServerStoryFile } from '@histoire/shared'
2
3
  import { Context } from './context.js'
3
4
  import { getViteConfigWithPlugins, RESOLVED_SEARCH_TITLE_DATA_ID, RESOLVED_STORIES_ID } from './vite.js'
4
5
  import { onStoryChange, watchStories } from './stories.js'
5
6
  import { useCollectStories } from './collect/index.js'
6
- import type { StoryFile } from './types.js'
7
7
  import { DevPluginApi } from './plugin.js'
8
8
  import { useModuleLoader } from './load.js'
9
9
 
@@ -46,7 +46,7 @@ export async function createServer (ctx: Context, port: number) {
46
46
  let queue: Promise<void>
47
47
  let queueResolve: () => void
48
48
  let queued = false
49
- let queuedFiles: StoryFile[] = []
49
+ let queuedFiles: ServerStoryFile[] = []
50
50
  let queuedAll = false
51
51
  let didAllStoriesYet = false
52
52
 
@@ -2,10 +2,10 @@ import chokidar from 'chokidar'
2
2
  import { globby } from 'globby'
3
3
  import Case from 'case'
4
4
  import { resolve, basename } from 'pathe'
5
+ import type { ServerStoryFile } from '@histoire/shared'
5
6
  import { Context } from './context.js'
6
- import type { StoryFile } from './types.js'
7
7
 
8
- type StoryChangeHandler = (file?: StoryFile) => unknown
8
+ type StoryChangeHandler = (file?: ServerStoryFile) => unknown
9
9
  const handlers: StoryChangeHandler[] = []
10
10
 
11
11
  let context: Context
@@ -34,7 +34,7 @@ export async function watchStories (newContext: Context) {
34
34
  return watcher
35
35
  }
36
36
 
37
- export function notifyStoryChange (file?: StoryFile) {
37
+ export function notifyStoryChange (file?: ServerStoryFile) {
38
38
  for (const handler of handlers) {
39
39
  handler(file)
40
40
  }
@@ -52,7 +52,7 @@ export function addStory (relativeFilePath: string) {
52
52
  fileName = fileName.substring(0, fileName.indexOf('.'))
53
53
  }
54
54
 
55
- const file: StoryFile = {
55
+ const file: ServerStoryFile = {
56
56
  id: fileId, // The file id will be changed by the story id after it is collected
57
57
  path: absoluteFilePath,
58
58
  fileName,
package/src/node/tree.ts CHANGED
@@ -1,32 +1,8 @@
1
1
  import pc from 'picocolors'
2
+ import type { ServerStoryFile, ServerTree, ServerTreeFile } from '@histoire/shared'
2
3
  import type { HistoireConfig, TreeGroupConfig } from './config.js'
3
- import type { StoryFile } from './types.js'
4
4
 
5
- export interface TreeFile {
6
- title: string
7
- path: string
8
- }
9
-
10
- export interface TreeLeaf {
11
- title: string
12
- index: number
13
- }
14
-
15
- export interface TreeFolder {
16
- title: string
17
- children: (TreeFolder | TreeLeaf)[]
18
- }
19
-
20
- export interface TreeGroup {
21
- group: true
22
- id: string
23
- title: string
24
- children: (TreeFolder | TreeLeaf)[]
25
- }
26
-
27
- export type Tree = (TreeGroup | TreeFolder | TreeLeaf)[]
28
-
29
- export function createPath (config: HistoireConfig, file: TreeFile) {
5
+ export function createPath (config: HistoireConfig, file: ServerTreeFile) {
30
6
  if (config.tree.file === 'title') {
31
7
  return file.title.split('/')
32
8
  }
@@ -41,7 +17,7 @@ export function createPath (config: HistoireConfig, file: TreeFile) {
41
17
  return config.tree.file(file)
42
18
  }
43
19
 
44
- export function makeTree (config: HistoireConfig, files: StoryFile[]) {
20
+ export function makeTree (config: HistoireConfig, files: ServerStoryFile[]) {
45
21
  interface ITreeObject {
46
22
  [index: string]: number | ITreeObject
47
23
  }
@@ -71,7 +47,7 @@ export function makeTree (config: HistoireConfig, files: StoryFile[]) {
71
47
  sortingFunction = config.tree.order
72
48
  }
73
49
 
74
- const result: Tree = []
50
+ const result: ServerTree = []
75
51
 
76
52
  for (const group of groups) {
77
53
  if (group === defaultGroup) {
@@ -88,7 +64,7 @@ export function makeTree (config: HistoireConfig, files: StoryFile[]) {
88
64
 
89
65
  return result
90
66
 
91
- function getGroup (file: StoryFile): ITreeGroup {
67
+ function getGroup (file: ServerStoryFile): ITreeGroup {
92
68
  if (file.story?.group) {
93
69
  const group = groups.find(g => g.groupConfig?.id === file.story.group)
94
70
  if (group) {
@@ -142,8 +118,8 @@ export function makeTree (config: HistoireConfig, files: StoryFile[]) {
142
118
  }
143
119
  }
144
120
 
145
- function buildTree (treeObject: ITreeObject): Tree {
146
- const tree: Tree = []
121
+ function buildTree (treeObject: ITreeObject): ServerTree {
122
+ const tree: ServerTree = []
147
123
 
148
124
  for (const [key, element] of Object.entries(treeObject)) {
149
125
  if (Number.isInteger(element)) {
@@ -100,7 +100,7 @@ module.exports.theme.extend.typography = (theme) => ({
100
100
  marginLeft: 0,
101
101
  marginRight: 0,
102
102
  backgroundColor: theme('colors.gray-100'),
103
- padding: '4px 6px',
103
+ padding: '.25rem .375rem',
104
104
 
105
105
  '& p:first-child': {
106
106
  marginTop: 0,
package/vite.config.ts CHANGED
@@ -17,15 +17,19 @@ export default defineConfig({
17
17
  }
18
18
  },
19
19
  closeBundle () {
20
- const files = fs.readdirSync('./dist/bundled')
21
- for (const file of files) {
22
- if (file.endsWith('.js')) {
23
- const filePath = path.join('./dist/bundled', file)
24
- const content = fs.readFileSync(filePath, 'utf-8')
25
- if (content.includes('import__meta')) {
26
- fs.writeFileSync(filePath, content.replace(/import__meta/g, 'import.meta'), 'utf-8')
20
+ try {
21
+ const files = fs.readdirSync('./dist/bundled')
22
+ for (const file of files) {
23
+ if (file.endsWith('.js')) {
24
+ const filePath = path.join('./dist/bundled', file)
25
+ const content = fs.readFileSync(filePath, 'utf-8')
26
+ if (content.includes('import__meta')) {
27
+ fs.writeFileSync(filePath, content.replace(/import__meta/g, 'import.meta'), 'utf-8')
28
+ }
27
29
  }
28
30
  }
31
+ } catch (e) {
32
+ console.error(e)
29
33
  }
30
34
  },
31
35
  },
@@ -41,6 +45,7 @@ export default defineConfig({
41
45
  rollupOptions: {
42
46
  external: [
43
47
  /\$histoire/,
48
+ /@histoire/,
44
49
  /@vue\/*/,
45
50
  // eslint-disable-next-line @typescript-eslint/no-var-requires
46
51
  ...Object.keys(require('./package.json').dependencies),