@spark-ui/cli-utils 2.11.11 → 2.11.13

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/CHANGELOG.md CHANGED
@@ -3,6 +3,16 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.11.13](https://github.com/adevinta/spark/compare/@spark-ui/cli-utils@2.11.12...@spark-ui/cli-utils@2.11.13) (2023-07-28)
7
+
8
+ ### Bug Fixes
9
+
10
+ - fix errors after eslint update ([3dae947](https://github.com/adevinta/spark/commit/3dae947dc169d9db3c7252f54a6224ded335980e))
11
+
12
+ ## [2.11.12](https://github.com/adevinta/spark/compare/@spark-ui/cli-utils@2.11.11...@spark-ui/cli-utils@2.11.12) (2023-07-17)
13
+
14
+ **Note:** Version bump only for package @spark-ui/cli-utils
15
+
6
16
  ## [2.11.11](https://github.com/adevinta/spark/compare/@spark-ui/cli-utils@2.11.10...@spark-ui/cli-utils@2.11.11) (2023-06-20)
7
17
 
8
18
  **Note:** Version bump only for package @spark-ui/cli-utils
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spark-ui/cli-utils",
3
- "version": "2.11.11",
3
+ "version": "2.11.13",
4
4
  "description": "Spark CLI utils",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -25,7 +25,7 @@
25
25
  "camel-case": "4.1.2",
26
26
  "chalk": "5.2.0",
27
27
  "commander": "10.0.1",
28
- "esbuild": "0.18.4",
28
+ "esbuild": "0.18.11",
29
29
  "fs-extra": "11.1.1",
30
30
  "glob": "8.1.0",
31
31
  "pascal-case": "3.1.2"
@@ -33,5 +33,5 @@
33
33
  "devDependencies": {
34
34
  "@types/fs-extra": "11.0.1"
35
35
  },
36
- "gitHead": "f608013a3e6df07dcfcedee3e2c4c2eaed49919b"
36
+ "gitHead": "dfff441503a7505a9ad35cb676b0a8051056babd"
37
37
  }
@@ -1,11 +1,9 @@
1
- import { join } from 'node:path'
2
1
  import { fileURLToPath } from 'node:url'
3
2
 
4
3
  import { camelCase } from 'camel-case'
5
4
  import glob from 'glob'
6
5
  import { pascalCase } from 'pascal-case'
7
6
 
8
- import { System } from '../../core/index.mjs'
9
7
  import { Generator } from './Generator.mjs'
10
8
 
11
9
  export class TemplateGenerator extends Generator {
@@ -1,21 +1,21 @@
1
1
  import { pascalCase } from 'pascal-case'
2
2
 
3
- export default ({ name, description }) => {
3
+ export default ({ name }) => {
4
4
  const componentName = pascalCase(name)
5
5
 
6
- return `import { Meta, StoryFn } from '@storybook/react'
6
+ return `
7
+ import { Meta, StoryFn } from '@storybook/react'
8
+ import { ${componentName} } from '.'
7
9
 
8
- import { ${componentName} } from '.'
10
+ const meta: Meta<typeof ${componentName}> = {
11
+ title: 'Components/${componentName}',
12
+ component: ${componentName},
13
+ }
9
14
 
10
- const meta: Meta<typeof ${componentName}> = {
11
- title: 'Components/${componentName}',
12
- component: ${componentName},
13
- }
14
-
15
- export default meta
15
+ export default meta
16
16
 
17
- export const Default: StoryFn = _args => (
18
- <${componentName}>Hello World!</${componentName}>
19
- )
20
- `
17
+ export const Default: StoryFn = _args => (
18
+ <${componentName}>Hello World!</${componentName}>
19
+ )
20
+ `
21
21
  }
@@ -0,0 +1 @@
1
+ export default () => ''
@@ -1,4 +1,3 @@
1
- import { System } from '../../core/index.mjs'
2
1
  import { Validator } from './Validator.mjs'
3
2
 
4
3
  export class NameValidator extends Validator {
@@ -30,7 +30,7 @@ describe('CLI `spark generate` (component package)', () => {
30
30
  '/.npmignore',
31
31
  '/package.json',
32
32
  '/src/index.ts',
33
- '/src/Bar.styles.tsx',
33
+ '/src/Bar.styles.ts',
34
34
  '/src/Bar.tsx',
35
35
  '/vite.config.ts',
36
36
  '/src/Bar.doc.mdx',
@@ -38,6 +38,7 @@ describe('CLI `spark generate` (component package)', () => {
38
38
  '/src/Bar.stories.tsx',
39
39
  '/tsconfig.json',
40
40
  ]
41
+
41
42
  const assertExpectedFiles = (filePath: string) => {
42
43
  expect(response).toContain(`Created ${packagePath}${filePath}`)
43
44
  expect(fse.pathExistsSync(`${packagePath}${filePath}`)).toBe(true)
@@ -1,8 +0,0 @@
1
- import { pascalCase } from 'pascal-case'
2
-
3
- export default ({ name }) => {
4
- const componentName = pascalCase(name)
5
-
6
- return `
7
- `
8
- }