@sapphire/cli 1.6.1-next.e42871c.0 → 1.6.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.
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
# [1.6.1](https://github.com/sapphiredev/cli/compare/v1.6.0...v1.6.1) - (2023-05-02)
|
|
6
|
+
|
|
7
|
+
## 🏃 Performance
|
|
8
|
+
|
|
9
|
+
- Optimize the logic of "parseCommonHints" (#221) ([13260f0](https://github.com/sapphiredev/cli/commit/13260f02456f13e87c9257b97dcd03199e6bf57d))
|
|
10
|
+
|
|
11
|
+
## 🐛 Bug Fixes
|
|
12
|
+
|
|
13
|
+
- Output proper esm code ([353a861](https://github.com/sapphiredev/cli/commit/353a861455caed0a5762f6a6d9661bc5419000dc))
|
|
14
|
+
- Use proper imports ([7c7b54b](https://github.com/sapphiredev/cli/commit/7c7b54b700faf3f21a8cab16d2ce493ab2a8ff31))
|
|
15
|
+
- Ensure yarn v3 is configured properly ([f53d59a](https://github.com/sapphiredev/cli/commit/f53d59a77a59c8c2f2639bd5c0ad92759ff42d10))
|
|
16
|
+
- **deps:** Update all non-major dependencies ([60e7410](https://github.com/sapphiredev/cli/commit/60e7410eba394745477f8707c705c9444f02dff4))
|
|
17
|
+
|
|
5
18
|
# [1.6.0](https://github.com/sapphiredev/cli/compare/v1.5.0...v1.6.0) - (2023-04-12)
|
|
6
19
|
|
|
7
20
|
## 🏠 Refactor
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { componentsFolder } from '#constants';
|
|
2
2
|
import { CreateFileFromTemplate } from '#functions/CreateFileFromTemplate';
|
|
3
3
|
import { fileExists } from '#functions/FileExists';
|
|
4
|
+
import { commandNames, componentCommandNames, componentInteractionHandlerNames, interactionHandlerNames } from '#lib/aliases';
|
|
4
5
|
import { Spinner } from '@favware/colorette-spinner';
|
|
5
6
|
import { Result } from '@sapphire/result';
|
|
6
7
|
import { blueBright, red } from 'colorette';
|
|
@@ -9,7 +10,6 @@ import { load } from 'js-yaml';
|
|
|
9
10
|
import { readFile } from 'node:fs/promises';
|
|
10
11
|
import { basename, join } from 'node:path';
|
|
11
12
|
import { setTimeout as sleep } from 'node:timers/promises';
|
|
12
|
-
import { commandNames, componentCommandNames, componentInteractionHandlerNames, interactionHandlerNames } from 'src/lib/aliases';
|
|
13
13
|
async function createComponent(component, name, config, configLoc) {
|
|
14
14
|
const { projectLanguage } = config;
|
|
15
15
|
if (!projectLanguage) {
|
package/dist/commands/new.js
CHANGED
|
@@ -56,11 +56,6 @@ async function installYarnV3(location, verbose) {
|
|
|
56
56
|
if (valueSetVersion.exitCode !== 0 || valueInstallPlugins.exitCode !== 0) {
|
|
57
57
|
throw new Error('An unknown error occurred while installing Yarn v3. Try running Sapphire CLI with "--verbose" flag.');
|
|
58
58
|
}
|
|
59
|
-
await Promise.all([
|
|
60
|
-
//
|
|
61
|
-
configureYarnRc(location, 'enableGlobalCache', 'true'),
|
|
62
|
-
configureYarnRc(location, 'nodeLinker', 'node-modules')
|
|
63
|
-
]);
|
|
64
59
|
return true;
|
|
65
60
|
}
|
|
66
61
|
async function installYarnTypescriptPlugin(location) {
|
|
@@ -124,6 +119,8 @@ export default async (name, flags) => {
|
|
|
124
119
|
jobs.push([() => installYarnV3(response.projectName, flags.verbose), 'Installing Yarn v3']);
|
|
125
120
|
if (response.projectLang === 'ts')
|
|
126
121
|
jobs.push([() => installYarnTypescriptPlugin(response.projectName), 'Installing Yarn Typescript Plugin']);
|
|
122
|
+
jobs.push([() => configureYarnRc(response.projectName, 'enableGlobalCache', 'true'), 'Enabling Yarn v3 global cache']);
|
|
123
|
+
jobs.push([() => configureYarnRc(response.projectName, 'nodeLinker', 'node-modules'), 'Configuring Yarn v3 to use node-modules']);
|
|
127
124
|
}
|
|
128
125
|
jobs.push([
|
|
129
126
|
() => installDeps(response.projectName, response.packageManager, flags.verbose),
|
|
@@ -10,7 +10,7 @@ export async function CreateFileFromTemplate(template, target, config, params, c
|
|
|
10
10
|
output.config = config;
|
|
11
11
|
output.templateContent = templateContent;
|
|
12
12
|
}
|
|
13
|
-
output.templateContent
|
|
13
|
+
output.templateContent ?? (output.templateContent = await readFile(location, 'utf8'));
|
|
14
14
|
if (!output.templateContent) {
|
|
15
15
|
throw new Error("Couldn't read the template file. Are you sure it exists, the name is correct, and the content is valid?");
|
|
16
16
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sapphire/cli",
|
|
3
|
-
"version": "1.6.1
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "CLI for Sapphire Framework",
|
|
5
5
|
"author": "@sapphire",
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"imports": {
|
|
13
13
|
"#prompts/*": "./dist/prompts/*.js",
|
|
14
|
+
"#lib/*": "./dist/lib/*.js",
|
|
14
15
|
"#functions/*": "./dist/functions/*.js",
|
|
15
16
|
"#commands/*": "./dist/commands/*.js",
|
|
16
17
|
"#constants": "./dist/constants.js"
|
|
@@ -34,9 +35,9 @@
|
|
|
34
35
|
},
|
|
35
36
|
"dependencies": {
|
|
36
37
|
"@favware/colorette-spinner": "^1.0.1",
|
|
37
|
-
"@sapphire/result": "^2.6.
|
|
38
|
-
"colorette": "^2.0.
|
|
39
|
-
"commander": "^10.0.
|
|
38
|
+
"@sapphire/result": "^2.6.3",
|
|
39
|
+
"colorette": "^2.0.20",
|
|
40
|
+
"commander": "^10.0.1",
|
|
40
41
|
"execa": "^7.1.1",
|
|
41
42
|
"find-up": "^5.0.0",
|
|
42
43
|
"js-yaml": "^4.1.0",
|
|
@@ -44,31 +45,31 @@
|
|
|
44
45
|
"tslib": "^2.5.0"
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|
|
47
|
-
"@commitlint/cli": "^17.
|
|
48
|
-
"@commitlint/config-conventional": "^17.
|
|
48
|
+
"@commitlint/cli": "^17.6.1",
|
|
49
|
+
"@commitlint/config-conventional": "^17.6.1",
|
|
49
50
|
"@favware/cliff-jumper": "^2.0.0",
|
|
50
51
|
"@favware/npm-deprecate": "^1.0.7",
|
|
51
52
|
"@sapphire/decorators": "*",
|
|
52
|
-
"@sapphire/eslint-config": "^4.4.
|
|
53
|
+
"@sapphire/eslint-config": "^4.4.2",
|
|
53
54
|
"@sapphire/framework": "*",
|
|
54
55
|
"@sapphire/plugin-api": "*",
|
|
55
56
|
"@sapphire/prettier-config": "^1.4.5",
|
|
56
57
|
"@sapphire/ts-config": "^4.0.0",
|
|
57
58
|
"@types/js-yaml": "^4.0.5",
|
|
58
|
-
"@types/node": "^18.
|
|
59
|
+
"@types/node": "^18.16.3",
|
|
59
60
|
"@types/prompts": "^2.4.4",
|
|
60
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
61
|
-
"@typescript-eslint/parser": "^5.
|
|
61
|
+
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
|
62
|
+
"@typescript-eslint/parser": "^5.59.2",
|
|
62
63
|
"cz-conventional-changelog": "^3.3.0",
|
|
63
64
|
"discord.js": "*",
|
|
64
|
-
"eslint": "^8.
|
|
65
|
+
"eslint": "^8.39.0",
|
|
65
66
|
"eslint-config-prettier": "^8.8.0",
|
|
66
67
|
"eslint-plugin-prettier": "^4.2.1",
|
|
67
68
|
"globby": "^13.1.4",
|
|
68
69
|
"husky": "^8.0.3",
|
|
69
|
-
"lint-staged": "^13.2.
|
|
70
|
+
"lint-staged": "^13.2.2",
|
|
70
71
|
"pinst": "^3.0.0",
|
|
71
|
-
"prettier": "^2.8.
|
|
72
|
+
"prettier": "^2.8.8",
|
|
72
73
|
"pretty-quick": "^3.1.3",
|
|
73
74
|
"ts-node": "^10.9.1",
|
|
74
75
|
"typescript": "^5.0.4"
|