create-packer 1.45.3 → 1.45.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-packer",
3
- "version": "1.45.3",
3
+ "version": "1.45.5",
4
4
  "main": "index.js",
5
5
  "repository": "https://github.com/kevily/create-packer",
6
6
  "author": "1k <bug_zero@163.com>",
@@ -30,7 +30,7 @@
30
30
  "@commitlint/cz-commitlint": "17.4.2",
31
31
  "@types/fs-extra": "9.0.12",
32
32
  "@types/inquirer": "7.3.3",
33
- "@types/node": "16.4.7",
33
+ "@types/node": "18",
34
34
  "commitizen": "4.3.0",
35
35
  "eslint": "9.17.0",
36
36
  "globals": "15.12.0",
@@ -0,0 +1,35 @@
1
+ import eslint from '@eslint/js'
2
+ import globals from 'globals'
3
+ import tseslint from 'typescript-eslint'
4
+
5
+ export default tseslint.config({
6
+ extends: [eslint.configs.recommended, tseslint.configs.recommended],
7
+ files: ['**/*.{tsx,ts}'],
8
+ ignores: ['**/node_modules/', 'dist/', '.history/', '.vscode'],
9
+ languageOptions: {
10
+ ecmaVersion: 2018,
11
+ sourceType: 'module',
12
+ globals: {
13
+ ...globals.browser,
14
+ ...globals.node
15
+ }
16
+ },
17
+ rules: {
18
+ '@typescript-eslint/no-var-requires': 0,
19
+ '@typescript-eslint/explicit-function-return-type': 'off',
20
+ '@typescript-eslint/no-explicit-any': 1,
21
+ '@typescript-eslint/no-inferrable-types': [
22
+ 'warn',
23
+ {
24
+ ignoreParameters: true
25
+ }
26
+ ],
27
+ '@typescript-eslint/no-unused-vars': 'warn',
28
+ '@typescript-eslint/member-delimiter-style': 0,
29
+ '@typescript-eslint/class-name-casing': 0,
30
+ '@typescript-eslint/explicit-module-boundary-types': 'off',
31
+ '@typescript-eslint/ban-ts-comment': 'off',
32
+ semi: ['error', 'never'],
33
+ quotes: 'off'
34
+ }
35
+ })
@@ -27,22 +27,23 @@
27
27
  "@inquirer/prompts": "7.0.0",
28
28
  "chalk": "5.3.0",
29
29
  "commander": "8.1.0",
30
- "fs-extra": "10.0.0",
30
+ "fs-extra": "11.3.0",
31
+ "lodash": "4.17.21",
31
32
  "ora": "8.1.0"
32
33
  },
33
34
  "devDependencies": {
34
- "@commitlint/config-conventional": "^17.6.3",
35
+ "@commitlint/config-conventional": "^17.7.0",
35
36
  "@commitlint/cz-commitlint": "17.4.2",
36
37
  "@types/fs-extra": "9.0.12",
37
38
  "@types/inquirer": "7.3.3",
38
- "@types/node": "16.4.7",
39
- "@typescript-eslint/eslint-plugin": "4.29.2",
40
- "@typescript-eslint/parser": "4.29.2",
39
+ "@types/node": "18",
41
40
  "commitizen": "4.3.0",
42
- "eslint": "7.32.0",
43
- "prettier": "3.3.3",
41
+ "eslint": "9.17.0",
42
+ "globals": "15.12.0",
43
+ "prettier": "3.2.5",
44
44
  "rimraf": "3.0.2",
45
- "typescript": "4.3.5"
45
+ "typescript": "5.8.2",
46
+ "typescript-eslint": "8.15.0"
46
47
  },
47
48
  "config": {
48
49
  "commitizen": {
@@ -1,39 +1,39 @@
1
- import * as inquirer from '@inquirer/prompts'
2
- import pkg from '../package.json' assert { type: 'json' }
3
- import { execSync } from 'child_process'
4
- import chalk from 'chalk'
5
-
6
- function genPrompt(nextVersion) {
7
- const version = {
8
- major: 0,
9
- minor: 1,
10
- patch: 2
11
- }
12
- const nextVersionIndex = version[nextVersion]
13
- const newVersion = pkg.version.split('.').map(Number)
14
- newVersion[nextVersionIndex] += 1
15
- // 把后续的版本号归零
16
- // ------------------------------------------------------------------------
17
- for (let i = nextVersionIndex + 1; i < 3; i++) {
18
- newVersion[i] = 0
19
- }
20
- return `${nextVersion}(${newVersion.join('.')})`
21
- }
22
-
23
- const versions = {
24
- [genPrompt('patch')]: 'patch',
25
- [genPrompt('minor')]: 'minor',
26
- [genPrompt('major')]: 'major'
27
- }
28
-
29
- inquirer
30
- .select({
31
- message: 'version:',
32
- choices: Object.keys(versions)
33
- })
34
- .then(version => {
35
- execSync(
36
- `npm version ${versions[version]} && pnpm publish --registry https://registry.npmjs.org && git push`
37
- )
38
- console.log(chalk.blue('Published(*^3^)'))
39
- })
1
+ import * as inquirer from '@inquirer/prompts'
2
+ import pkg from '../package.json' with { type: 'json' }
3
+ import { execSync } from 'child_process'
4
+ import chalk from 'chalk'
5
+
6
+ function genPrompt(nextVersion) {
7
+ const version = {
8
+ major: 0,
9
+ minor: 1,
10
+ patch: 2
11
+ }
12
+ const nextVersionIndex = version[nextVersion]
13
+ const newVersion = pkg.version.split('.').map(Number)
14
+ newVersion[nextVersionIndex] += 1
15
+ // 把后续的版本号归零
16
+ // ------------------------------------------------------------------------
17
+ for (let i = nextVersionIndex + 1; i < 3; i++) {
18
+ newVersion[i] = 0
19
+ }
20
+ return `${nextVersion}(${newVersion.join('.')})`
21
+ }
22
+
23
+ const versions = {
24
+ [genPrompt('patch')]: 'patch',
25
+ [genPrompt('minor')]: 'minor',
26
+ [genPrompt('major')]: 'major'
27
+ }
28
+
29
+ inquirer
30
+ .select({
31
+ message: 'version:',
32
+ choices: Object.keys(versions)
33
+ })
34
+ .then(version => {
35
+ execSync(
36
+ `npm version ${versions[version]} && pnpm publish --registry https://registry.npmjs.org && git push`
37
+ )
38
+ console.log(chalk.blue('Published(*^3^)'))
39
+ })
@@ -1,6 +1,6 @@
1
1
  import chalk from 'chalk'
2
2
  import * as inquirer from '@inquirer/prompts'
3
- import * as fsExtra from 'fs-extra'
3
+ import fsExtra from 'fs-extra'
4
4
  import path from 'path'
5
5
  import { fileURLToPath } from 'url'
6
6
  import ora from 'ora'
@@ -1,23 +1,16 @@
1
- import svgr from '@svgr/rollup'
2
- import type { StorybookConfig } from '@storybook/react-vite'
3
-
4
- const config: StorybookConfig = {
5
- stories: [`../packages/**/*.mdx`, `../packages/**/*.stories.@(js|jsx|ts|tsx)`],
6
- addons: [
7
- '@storybook/addon-links',
8
- '@storybook/addon-essentials',
9
- '@storybook/addon-interactions'
10
- ],
11
- framework: {
12
- name: '@storybook/react-vite',
13
- options: {}
14
- },
15
- async viteFinal(config) {
16
- config.plugins!.unshift(svgr({ svgo: false, titleProp: true, ref: true }) as any)
17
- return config
18
- },
19
- docs: {
20
- autodocs: 'tag'
21
- }
22
- }
23
- export default config
1
+ import svgr from '@svgr/rollup'
2
+ import { type StorybookConfig } from '@storybook/react-vite'
3
+
4
+ const config: StorybookConfig = {
5
+ stories: [`../packages/**/*.mdx`, `../packages/**/*.stories.@(js|jsx|ts|tsx)`],
6
+ addons: ['@storybook/addon-docs'],
7
+ framework: {
8
+ name: '@storybook/react-vite',
9
+ options: {}
10
+ },
11
+ async viteFinal(config) {
12
+ config.plugins!.unshift(svgr({ svgo: false, titleProp: true, ref: true }) as any)
13
+ return config
14
+ }
15
+ }
16
+ export default config
@@ -1,17 +1,17 @@
1
- import * as React from 'react'
2
- import type { Preview } from '@storybook/react'
3
-
4
- const preview: Preview = {
5
- decorators: [Story => <Story />],
6
- parameters: {
7
- actions: { argTypesRegex: '^on[A-Z].*' },
8
- controls: {
9
- matchers: {
10
- color: /(background|color)$/i,
11
- date: /Date$/
12
- }
13
- }
14
- }
15
- }
16
-
17
- export default preview
1
+ import { type Preview } from '@storybook/react-vite'
2
+
3
+ const preview: Preview = {
4
+ decorators: [Story => <Story />],
5
+ parameters: {
6
+ actions: { argTypesRegex: '^on[A-Z].*' },
7
+ controls: {
8
+ matchers: {
9
+ color: /(background|color)$/i,
10
+ date: /Date$/
11
+ }
12
+ }
13
+ },
14
+ tags: ['autodocs']
15
+ }
16
+
17
+ export default preview
@@ -43,12 +43,9 @@
43
43
  "devDependencies": {
44
44
  "@changesets/cli": "2.26.2",
45
45
  "@eslint/js": "9.15.0",
46
- "@storybook/addon-essentials": "8.6.12",
47
- "@storybook/addon-interactions": "8.6.12",
48
- "@storybook/addon-links": "8.6.12",
49
- "@storybook/blocks": "8.6.12",
50
- "@storybook/react": "8.6.12",
51
- "@storybook/react-vite": "8.6.12",
46
+ "@storybook/addon-docs": "9.1.2",
47
+ "@storybook/addon-links": "9.1.2",
48
+ "@storybook/react-vite": "9.1.2",
52
49
  "@storybook/testing-library": "0.2.2",
53
50
  "@svgr/rollup": "8.1.0",
54
51
  "@types/node": "20.3.2",
@@ -60,7 +57,7 @@
60
57
  "eslint-plugin-import": "2.31.0",
61
58
  "eslint-plugin-react": "7.37.2",
62
59
  "eslint-plugin-react-hooks": "5.1.0",
63
- "eslint-plugin-storybook": "0.12.0",
60
+ "eslint-plugin-storybook": "9.1.2",
64
61
  "globals": "15.12.0",
65
62
  "inquirer": "^8.1.2",
66
63
  "postcss": "8.4.31",
@@ -72,7 +69,7 @@
72
69
  "prop-types": "15.8.1",
73
70
  "react": "18.2.0",
74
71
  "react-dom": "18.2.0",
75
- "storybook": "8.6.12",
72
+ "storybook": "9.1.2",
76
73
  "stylelint": "16.10.0",
77
74
  "stylelint-config-standard-scss": "13.0.0",
78
75
  "ts-node": "10.9.1",
@@ -1,3 +1,3 @@
1
- import { Meta } from '@storybook/blocks'
1
+ import { Meta } from '@storybook/addon-docs/blocks'
2
2
 
3
3
  <Meta title="react-components/Introduction" />
@@ -1,44 +1,44 @@
1
- import Button from './button'
2
- import type { Meta, StoryObj } from '@storybook/react'
3
-
4
- // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
5
- const meta: Meta<typeof Button> = {
6
- title: 'react-components/Button',
7
- component: Button,
8
- tags: ['autodocs'],
9
- argTypes: {
10
- backgroundColor: { control: 'color' }
11
- }
12
- }
13
-
14
- export default meta
15
-
16
- type Story = StoryObj<typeof Button>
17
-
18
- // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
19
- export const Primary: Story = {
20
- args: {
21
- primary: true,
22
- label: 'Button'
23
- }
24
- }
25
-
26
- export const Secondary: Story = {
27
- args: {
28
- label: 'Button'
29
- }
30
- }
31
-
32
- export const Large: Story = {
33
- args: {
34
- size: 'large',
35
- label: 'Button'
36
- }
37
- }
38
-
39
- export const Small: Story = {
40
- args: {
41
- size: 'small',
42
- label: 'Button'
43
- }
44
- }
1
+ import { type Meta, type StoryObj } from '@storybook/react-vite'
2
+ import Button from './button'
3
+
4
+ // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
5
+ const meta: Meta<typeof Button> = {
6
+ title: 'react-components/Button',
7
+ component: Button,
8
+ tags: ['autodocs'],
9
+ argTypes: {
10
+ backgroundColor: { control: 'color' }
11
+ }
12
+ }
13
+
14
+ export default meta
15
+
16
+ type Story = StoryObj<typeof Button>
17
+
18
+ // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
19
+ export const Primary: Story = {
20
+ args: {
21
+ primary: true,
22
+ label: 'Button'
23
+ }
24
+ }
25
+
26
+ export const Secondary: Story = {
27
+ args: {
28
+ label: 'Button'
29
+ }
30
+ }
31
+
32
+ export const Large: Story = {
33
+ args: {
34
+ size: 'large',
35
+ label: 'Button'
36
+ }
37
+ }
38
+
39
+ export const Small: Story = {
40
+ args: {
41
+ size: 'small',
42
+ label: 'Button'
43
+ }
44
+ }
@@ -1,35 +0,0 @@
1
- {
2
- "parser": "@typescript-eslint/parser",
3
- "plugins": ["@typescript-eslint"],
4
- "extends": ["eslint:recommended"],
5
- "env": {
6
- "browser": true,
7
- "node": true
8
- },
9
- "parserOptions": {
10
- "ecmaVersion": 2018,
11
- "sourceType": "module",
12
- "ecmaFeatures": {
13
- "jsx": true
14
- },
15
- "useJSXTextNode": true
16
- },
17
- "rules": {
18
- "@typescript-eslint/no-var-requires": 0,
19
- "@typescript-eslint/explicit-function-return-type": "off",
20
- "@typescript-eslint/no-explicit-any": 1,
21
- "@typescript-eslint/no-inferrable-types": [
22
- "warn",
23
- {
24
- "ignoreParameters": true
25
- }
26
- ],
27
- "@typescript-eslint/no-unused-vars": "warn",
28
- "@typescript-eslint/member-delimiter-style": 0,
29
- "@typescript-eslint/class-name-casing": 0,
30
- "@typescript-eslint/explicit-module-boundary-types": "off",
31
- "@typescript-eslint/ban-ts-comment": "off",
32
- "semi": ["error", "never"],
33
- "quotes": "off"
34
- }
35
- }