juisy 2.0.0-beta.8 → 2.0.1

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 (31) hide show
  1. package/LICENSE +661 -0
  2. package/bin/cli/cmds/index.js +1 -3
  3. package/bin/cli/cmds/public/print-globals.js +1 -1
  4. package/bin/cli/index.js +1 -1
  5. package/dist/cli/CLIFactory.d.ts +2 -0
  6. package/dist/cli/Command.d.ts +46 -6
  7. package/dist/cli/GlobalSettings.schema.json +1 -1
  8. package/dist/cli/InterfaceUtils.d.ts +17 -13
  9. package/dist/cli/OutputUtils.d.ts +1 -12
  10. package/dist/cli/index.d.ts +1 -1
  11. package/dist/cli/index.js +514 -466
  12. package/dist/cli/plugins/register-bump-version-command/cmds/index.d.ts +14 -2
  13. package/dist/cli/plugins/register-lint-commands/augment.d.ts +2 -3
  14. package/dist/cli/plugins/register-lint-commands/settings.d.ts +1 -1
  15. package/dist/cli/plugins/register-release-command/augment.d.ts +2 -2
  16. package/dist/cli/types.d.ts +6 -2
  17. package/dist/cli/utils.d.ts +1 -10
  18. package/dist/eject.d.ts +2 -0
  19. package/dist/index.js +8 -3
  20. package/dist/project-globals.d.ts +7 -26
  21. package/dist/templater/index.js +11 -11
  22. package/dist/vite/plugins/inject-css-variables/index.d.ts +23 -0
  23. package/dist/vite/plugins/inject-css-variables/index.js +60 -0
  24. package/dist/vite/plugins/inject-project-globals/index.d.ts +19 -0
  25. package/dist/vite/plugins/inject-project-globals/index.js +58 -0
  26. package/package.json +198 -183
  27. package/bin/cli/cmds/private/docs/lint.js +0 -42
  28. package/bin/cli/cmds/public/squeeze.js +0 -269
  29. package/dist/cli/plugins/command-handler-injections/augment.d.ts +0 -29
  30. package/dist/cli/plugins/command-handler-injections/command-visitors/command-handler-injections.d.ts +0 -10
  31. package/dist/cli/plugins/command-handler-injections/index.d.ts +0 -3
package/package.json CHANGED
@@ -1,194 +1,209 @@
1
1
  {
2
- "name": "juisy",
3
- "version": "2.0.0-beta.8",
4
- "description": "Make your JavaScript (and/or TypeScript) project juicy!",
5
- "type": "module",
6
- "files": [
7
- "bin",
8
- "dist"
9
- ],
10
- "engines": {
11
- "node": "^18.0.0 || ^20.0.0 || >=22.0.0"
2
+ "name": "juisy",
3
+ "version": "2.0.1",
4
+ "description": "Make you JavaScript (and/or TypeScript) project juicy!",
5
+ "type": "module",
6
+ "files": [
7
+ "bin",
8
+ "dist",
9
+ "LICENSE",
10
+ "README.md"
11
+ ],
12
+ "engines": {
13
+ "node": "^18.0.0 || ^20.0.0 || >=22.0.0"
14
+ },
15
+ "imports": {
16
+ "#juisy": {
17
+ "types": "./dist/index.d.ts",
18
+ "import": "./dist/index.js"
12
19
  },
13
- "imports": {
14
- "#juisy": {
15
- "types": "./dist/index.d.ts",
16
- "import": "./dist/index.js"
17
- },
18
- "#juisy/cli": {
19
- "types": "./dist/cli/index.d.ts",
20
- "import": "./dist/cli/index.js"
21
- },
22
- "#juisy/templater": {
23
- "types": "./dist/templater/index.d.ts",
24
- "import": "./dist/templater/index.js"
25
- }
20
+ "#juisy/cli": {
21
+ "types": "./dist/cli/index.d.ts",
22
+ "import": "./dist/cli/index.js"
26
23
  },
27
- "exports": {
28
- ".": {
29
- "types": "./dist/index.d.ts",
30
- "import": "./dist/index.js"
31
- },
32
- "./cli": {
33
- "types": "./dist/cli/index.d.ts",
34
- "import": "./dist/cli/index.js"
35
- },
36
- "./templater": {
37
- "types": "./dist/templater/index.d.ts",
38
- "import": "./dist/templater/index.js"
39
- }
40
- },
41
- "publishConfig": {
42
- "access": "public"
43
- },
44
- "scripts": {
45
- "build": "vite build",
46
- "audit": "ncu && npm audit",
47
- "audit:fix": "ncu --interactive",
48
- "docs": "npm run docs:cli && npm run docs:api",
49
- "docs:api": "node ./bin/cli docs generate:api",
50
- "docs:cli": "npm run docs:cli:private && npm run docs:cli:public",
51
- "docs:cli:private": "node ./bin/cli docs generate:cli -c ./docs/cli/private/config.js",
52
- "docs:cli:public": "node ./bin/cli docs generate:cli -c ./docs/cli/public/config.js",
53
- "example:reset": "git checkout --no-overlay -- example && cd example && git clean -fdX",
54
- "example:test": "npm run example:reset && cd example && npm install -D juisy@file:../ && npx juisy squeeze && npm run docs:readme",
55
- "print:globals": "node --no-warnings ./bin/cli print:globals",
56
- "release": "release-it",
57
- "test": "node ./bin/cli test",
58
- "test:dev": "npm test -- --watch",
59
- "test:ui": "npm test -- --ui"
60
- },
61
- "repository": {
62
- "type": "git",
63
- "url": "git+https://gitlab.com/hperchec/juisy.git"
64
- },
65
- "keywords": [
66
- "js",
67
- "build",
68
- "release",
69
- "changelog",
70
- "bin",
71
- "cmd",
72
- "easy"
73
- ],
74
- "author": {
75
- "name": "Hervé Perchec",
76
- "email": "contact@herve-perchec.com",
77
- "url": "https://gitlab.com/herveperchec"
78
- },
79
- "license": "GPL-3.0-only",
80
- "bugs": {
81
- "url": "https://gitlab.com/hperchec/juisy/issues"
24
+ "#juisy/templater": {
25
+ "types": "./dist/templater/index.d.ts",
26
+ "import": "./dist/templater/index.js"
27
+ }
28
+ },
29
+ "exports": {
30
+ ".": {
31
+ "types": "./dist/index.d.ts",
32
+ "import": "./dist/index.js"
82
33
  },
83
- "homepage": "https://gitlab.com/hperchec/juisy#readme",
84
- "bin": {
85
- "juisy": "./bin/cli/index.js"
34
+ "./cli": {
35
+ "types": "./dist/cli/index.d.ts",
36
+ "import": "./dist/cli/index.js"
86
37
  },
87
- "peerDependencies": {
88
- "@commitlint/cli": "^19.6.1",
89
- "@commitlint/config-conventional": "^19.6.0",
90
- "@github/markdownlint-github": "^0.7.0",
91
- "@release-it/conventional-changelog": "^9.0.4",
92
- "@stylistic/eslint-plugin": "^2",
93
- "@typescript-eslint/eslint-plugin": "^8",
94
- "chalk": "^4.1.2",
95
- "conventional-changelog-cli": "^5.0.0",
96
- "eslint": "^9",
97
- "lint-staged": "^14.0.1",
98
- "markdownlint-cli2": "^0.12.0",
99
- "markdownlint-cli2-formatter-pretty": "^0.0.7",
100
- "prompts": "^2.4.2",
101
- "release-it": "^17.11.0",
102
- "simple-git-hooks": "^2.9.0",
103
- "yargs": "^17.7.2"
38
+ "./templater": {
39
+ "types": "./dist/templater/index.d.ts",
40
+ "import": "./dist/templater/index.js"
104
41
  },
105
- "peerDependenciesMeta": {
106
- "@github/markdownlint-github": {
107
- "optional": true
108
- },
109
- "markdownlint-cli2-formatter-pretty": {
110
- "optional": true
111
- }
42
+ "./vite-plugin-inject-css-variables": {
43
+ "types": "./dist/vite/plugins/inject-css-variables/index.d.ts",
44
+ "import": "./dist/vite/plugins/inject-css-variables/index.js"
112
45
  },
113
- "devDependencies": {
114
- "@babel/eslint-parser": "^7.25.9",
115
- "@conventional-changelog/git-client": "^1.0.1",
116
- "@rollup/plugin-typescript": "^12.1.2",
117
- "@stylistic/eslint-plugin": "^2.12.1",
118
- "@types/conventional-changelog": "^3.1.5",
119
- "@types/conventional-changelog-config-spec": "^2.1.5",
120
- "@types/ejs": "^3.1.5",
121
- "@types/fs-extra": "^11.0.4",
122
- "@types/lint-staged": "^13.3.0",
123
- "@types/lodash.get": "^4.4.9",
124
- "@types/lodash.kebabcase": "^4.1.9",
125
- "@types/lodash.merge": "^4.6.9",
126
- "@types/lodash.set": "^4.3.9",
127
- "@types/node": "^22.10.2",
128
- "@types/prompts": "^2.4.9",
129
- "@types/semver": "^7.5.8",
130
- "@types/yargs": "^17.0.33",
131
- "@types/yargs-parser": "^21.0.3",
132
- "@typescript-eslint/eslint-plugin": "^8.18.1",
133
- "@vitest/coverage-v8": "^2.1.8",
134
- "@vitest/ui": "^2.1.8",
135
- "cpy-cli": "^5.0.0",
136
- "eslint": "^9.17.0",
137
- "happy-dom": "^15.11.7",
138
- "json-schema-to-ts": "^3.1.1",
139
- "lint-staged": "^14.0.1",
140
- "markdown-table": "^3.0.4",
141
- "npm-check-updates": "^17.1.12",
142
- "quicktype": "^23.0.170",
143
- "typescript": "^5.7.2",
144
- "vite": "^5.4.11",
145
- "vite-plugin-dts": "^4.3.0",
146
- "vite-plugin-generate-file": "^0.2.0",
147
- "vitest": "^2.1.8"
46
+ "./vite-plugin-inject-project-globals": {
47
+ "types": "./dist/vite/plugins/inject-project-globals/index.d.ts",
48
+ "import": "./dist/vite/plugins/inject-project-globals/index.js"
49
+ }
50
+ },
51
+ "publishConfig": {
52
+ "access": "public"
53
+ },
54
+ "scripts": {
55
+ "build": "vite build",
56
+ "audit": "ncu && npm audit",
57
+ "audit:fix": "ncu --interactive",
58
+ "docs": "npm run docs:cli && npm run docs:api",
59
+ "docs:api": "node ./bin/cli docs generate:api",
60
+ "docs:cli": "npm run docs:cli:private && npm run docs:cli:public",
61
+ "docs:cli:private": "node ./bin/cli docs generate:cli -c ./docs/cli/private/config.js",
62
+ "docs:cli:public": "node ./bin/cli docs generate:cli -c ./docs/cli/public/config.js",
63
+ "example:reset": "git checkout --no-overlay -- example && cd example && git clean -fdX",
64
+ "example:test": "npm run example:reset && cd example && npm install -D juisy@file:../ && npx juisy squeeze && npm run docs:readme",
65
+ "print:globals": "node --no-warnings ./bin/cli print:globals",
66
+ "release": "release-it --no-increment",
67
+ "test": "node ./bin/cli test",
68
+ "test:dev": "npm test -- --watch",
69
+ "test:ui": "vitest --ui"
70
+ },
71
+ "repository": {
72
+ "type": "git",
73
+ "url": "git+https://gitlab.com/hperchec/juisy.git"
74
+ },
75
+ "keywords": [
76
+ "js",
77
+ "build",
78
+ "release",
79
+ "changelog",
80
+ "bin",
81
+ "cmd",
82
+ "easy"
83
+ ],
84
+ "author": {
85
+ "name": "Hervé Perchec",
86
+ "email": "contact@herve-perchec.com",
87
+ "url": "https://gitlab.com/herveperchec"
88
+ },
89
+ "license": "GPL-3.0-only",
90
+ "bugs": {
91
+ "url": "https://gitlab.com/hperchec/juisy/issues"
92
+ },
93
+ "homepage": "https://hperchec.gitlab.io/juisy",
94
+ "bin": {
95
+ "juisy": "./bin/cli/index.js"
96
+ },
97
+ "peerDependencies": {
98
+ "@commitlint/cli": "^19.6.1",
99
+ "@commitlint/config-conventional": "^19.6.0",
100
+ "@github/markdownlint-github": "^0.6.3",
101
+ "@release-it/bumper": "6.0.1",
102
+ "@release-it/conventional-changelog": "^9.0.4",
103
+ "@stylistic/eslint-plugin": "^2",
104
+ "@typescript-eslint/eslint-plugin": "^8",
105
+ "chalk": "^5.4.1",
106
+ "conventional-changelog-cli": "^5.0.0",
107
+ "eslint": "^9",
108
+ "globals": "^15",
109
+ "lint-staged": "^14.0.1",
110
+ "markdownlint-cli2": "^0.12.0",
111
+ "markdownlint-cli2-formatter-pretty": "^0.0.7",
112
+ "prompts": "^2.4.2",
113
+ "release-it": "^17.11.0",
114
+ "simple-git-hooks": "^2.9.0",
115
+ "yargs": "^17.7.2"
116
+ },
117
+ "peerDependenciesMeta": {
118
+ "@release-it/bumper": {
119
+ "optional": true
148
120
  },
149
- "dependencies": {
150
- "@dotenvx/dotenvx": "^1.31.0",
151
- "ascii-tree": "^0.3.0",
152
- "chalk": "^4.1.2",
153
- "conventional-recommended-bump": "^10.0.0",
154
- "deepmerge": "^4.3.1",
155
- "ejs": "^3.1.10",
156
- "execa": "^8",
157
- "find-up": "^7.0.0",
158
- "fs-extra": "^11.2.0",
159
- "github-slugger": "^2.0.0",
160
- "glob": "^11.0.0",
161
- "handlebars": "^4.7.8",
162
- "import-single-ts": "^1.2.0",
163
- "indent-string": "^5.0.0",
164
- "json-2-csv": "^5.5.7",
165
- "jstoxml": "^5.0.2",
166
- "lodash.get": "^4.4.2",
167
- "lodash.kebabcase": "^4.1.1",
168
- "lodash.merge": "^4.6.2",
169
- "lodash.set": "^4.3.2",
170
- "loglevel": "^1.9.2",
171
- "markdown-toc": "^1.2.0",
172
- "markdown-utils": "^1.0.0",
173
- "package-json-type": "^1.0.3",
174
- "pkg-dir": "^8.0.0",
175
- "prompts": "^2.4.2",
176
- "remark": "^15.0.1",
177
- "remark-frontmatter": "^5.0.0",
178
- "remark-toc": "^9.0.0",
179
- "semver": "^7.7.1",
180
- "simple-git-hooks": "^2.9.0",
181
- "strip-ansi": "^7.1.0",
182
- "ts-json-schema-generator": "^2.3.0",
183
- "typedoc": "^0.27.5",
184
- "typedoc-plugin-frontmatter": "^1.1.2",
185
- "typedoc-plugin-markdown": "^4.3.3",
186
- "typedoc-vitepress-theme": "^1.1.1",
187
- "yaml": "^2.6.1",
188
- "yargs": "^17.7.2",
189
- "yargs-parser": "^21.1.1"
121
+ "@release-it/conventional-changelog": {
122
+ "optional": true
190
123
  },
191
- "release-it": {
192
- "git": false
124
+ "simple-git-hooks": {
125
+ "optional": true
193
126
  }
127
+ },
128
+ "devDependencies": {
129
+ "@babel/eslint-parser": "^7.25.9",
130
+ "@conventional-changelog/git-client": "^1.0.1",
131
+ "@rollup/plugin-typescript": "^12.1.2",
132
+ "@stylistic/eslint-plugin": "^2.12.1",
133
+ "@types/conventional-changelog": "^3.1.5",
134
+ "@types/conventional-changelog-config-spec": "^2.1.5",
135
+ "@types/ejs": "^3.1.5",
136
+ "@types/fs-extra": "^11.0.4",
137
+ "@types/lint-staged": "^13.3.0",
138
+ "@types/lodash.get": "^4.4.9",
139
+ "@types/lodash.kebabcase": "^4.1.9",
140
+ "@types/lodash.merge": "^4.6.9",
141
+ "@types/lodash.set": "^4.3.9",
142
+ "@types/node": "^22.10.2",
143
+ "@types/prompts": "^2.4.9",
144
+ "@types/semver": "^7.5.8",
145
+ "@types/yargs": "^17.0.33",
146
+ "@types/yargs-parser": "^21.0.3",
147
+ "@typescript-eslint/eslint-plugin": "^8.18.1",
148
+ "@vitest/coverage-v8": "^2.1.8",
149
+ "@vitest/ui": "^2.1.8",
150
+ "cpy-cli": "^5.0.0",
151
+ "eslint": "^9.17.0",
152
+ "happy-dom": "^15.11.7",
153
+ "json-schema-to-ts": "^3.1.1",
154
+ "lint-staged": "^14.0.1",
155
+ "npm-check-updates": "^17.1.12",
156
+ "quicktype": "^23.0.170",
157
+ "typedoc": "^0.28.1",
158
+ "typedoc-plugin-frontmatter": "^1.3.0",
159
+ "typedoc-plugin-markdown": "^4.5.2",
160
+ "typedoc-vitepress-theme": "^1.1.2",
161
+ "typescript": "^5.7.2",
162
+ "vite": "^5.4.11",
163
+ "vite-plugin-dts": "^4.3.0",
164
+ "vite-plugin-generate-file": "^0.2.0",
165
+ "vitest": "^2.1.8"
166
+ },
167
+ "dependencies": {
168
+ "@commitlint/types": "^19.8.0",
169
+ "@dotenvx/dotenvx": "^1.31.0",
170
+ "ascii-tree": "^0.3.0",
171
+ "chalk": "^5.4.1",
172
+ "conventional-recommended-bump": "^10.0.0",
173
+ "deepmerge": "^4.3.1",
174
+ "ejs": "^3.1.10",
175
+ "execa": "^9.5.2",
176
+ "find-up": "^7.0.0",
177
+ "fs-extra": "^11.2.0",
178
+ "github-slugger": "^2.0.0",
179
+ "glob": "^11.0.0",
180
+ "handlebars": "^4.7.8",
181
+ "import-single-ts": "^1.2.0",
182
+ "indent-string": "^5.0.0",
183
+ "json-2-csv": "^5.5.7",
184
+ "jstoxml": "^5.0.2",
185
+ "lodash.get": "^4.4.2",
186
+ "lodash.kebabcase": "^4.1.1",
187
+ "lodash.merge": "^4.6.2",
188
+ "lodash.set": "^4.3.2",
189
+ "loglevel": "^1.9.2",
190
+ "markdown-table": "^3.0.4",
191
+ "markdown-toc": "^1.2.0",
192
+ "markdown-utils": "^1.0.0",
193
+ "package-json-type": "^1.0.3",
194
+ "pkg-dir": "^8.0.0",
195
+ "prompts": "^2.4.2",
196
+ "remark": "^15.0.1",
197
+ "remark-frontmatter": "^5.0.0",
198
+ "remark-toc": "^9.0.0",
199
+ "semver": "^7.7.1",
200
+ "strip-ansi": "^7.1.0",
201
+ "ts-json-schema-generator": "^2.3.0",
202
+ "yaml": "^2.6.1",
203
+ "yargs": "^17.7.2",
204
+ "yargs-parser": "^21.1.1"
205
+ },
206
+ "release-it": {
207
+ "git": false
208
+ }
194
209
  }
@@ -1,42 +0,0 @@
1
- /** @type {import('#juisy/cli').Command} */
2
- export default new CLI.Command({
3
- command: 'lint',
4
- describe: 'Lint markdown with markdownlint',
5
- builder: function (cli) {
6
- cli.option('c', {
7
- alias: 'config',
8
- type: 'string',
9
- describe: 'Path to custom markdownlint config file (relative to root folder)',
10
- requiresArg: true
11
- })
12
- cli.option('f', {
13
- alias: 'fix',
14
- type: 'boolean',
15
- describe: 'Auto fix by passing --fix option to markdownlint-cli2',
16
- default: false
17
- })
18
- return cli
19
- },
20
- async handler (argv) {
21
- const { abort, run } = CLI.InterfaceUtils
22
- const configPath = argv.config || './docs/.markdownlint-cli2.cjs' // default relative to root folder
23
-
24
- /**
25
- * Call markdownlint command
26
- */
27
- try {
28
- await run(
29
- 'npx',
30
- [
31
- 'markdownlint-cli2',
32
- '--config',
33
- configPath,
34
- ...(argv.fix ? [ '--fix' ] : [])
35
- ],
36
- { stdio: 'inherit' }
37
- )
38
- } catch (error) {
39
- abort(error.exitCode)
40
- }
41
- }
42
- })