Skip to content

Commit bf70784

Browse files
committed
chore!: bump dependencies
- Updated `@inquirer/prompts` from `^7.10.1` to `^8.0.1` in package.json - Updated `@types/node` from `22` to `24` in package.json - Refactored versionInjector function in esbuild.mjs to eliminate unnecessary variable declaration - Updated TypeScript configuration in tsconfig.json for better module resolution and stricter type checking - Updated various `@inquirer/*` packages in yarn.lock to their latest versions - Removed deprecated dependencies and updated integrity checks in yarn.lock
1 parent 2f18853 commit bf70784

4 files changed

Lines changed: 157 additions & 269 deletions

File tree

esbuild.mjs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@ import { readFileSync } from "fs";
33
import Replace from "unplugin-replace/esbuild";
44

55
export function versionInjector() {
6-
/** @type {import("type-fest").PackageJson} */
7-
let pkg;
8-
96
return Replace({
107
include: [/\.(js|ts)$/],
118
values: [{
129
find: "__PACKAGE_VERSION__",
1310
replacement() {
14-
pkg ??= JSON.parse(readFileSync("./package.json", "utf8"));
11+
/** @type {import("type-fest").PackageJson} */
12+
const pkg = JSON.parse(readFileSync("./package.json", "utf8"));
1513
return pkg.version;
1614
},
1715
}],

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"dependencies": {
3131
"@discloudapp/api-types": "^1.0.4",
3232
"@discloudapp/util": "^1.2.6",
33-
"@inquirer/prompts": "^7.10.1",
33+
"@inquirer/prompts": "^8.0.1",
3434
"adm-zip": "^0.5.16",
3535
"easy-table": "^1.2.0",
3636
"ejs": "^3.1.10",
@@ -46,7 +46,7 @@
4646
"@eslint/js": "^9.39.1",
4747
"@types/adm-zip": "^0.5.7",
4848
"@types/ejs": "^3.1.5",
49-
"@types/node": "22",
49+
"@types/node": "24",
5050
"@types/update-notifier": "^6.0.8",
5151
"@types/yargs": "^17.0.35",
5252
"esbuild": "^0.27.0",

tsconfig.json

Lines changed: 18 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -4,112 +4,34 @@
44
"compilerOptions": {
55
/* Visit https://aka.ms/tsconfig to read more about this file */
66

7-
/* Projects */
8-
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
9-
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
10-
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
11-
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
12-
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
13-
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
14-
157
/* Language and Environment */
16-
"target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
17-
"lib": ["ESNext"], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
18-
// "jsx": "preserve", /* Specify what JSX code is generated. */
19-
// "libReplacement": true, /* Enable lib replacement. */
20-
// "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
21-
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
22-
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
23-
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
24-
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
25-
// "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
26-
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
27-
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
28-
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
8+
"target": "esnext",
9+
"lib": ["ESNext"],
2910

3011
/* Modules */
31-
"module": "CommonJS", /* Specify what module code is generated. */
32-
// "rootDir": "./", /* Specify the root folder within your source files. */
33-
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
34-
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
35-
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
36-
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
37-
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
38-
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
39-
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
40-
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
41-
// "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
42-
// "rewriteRelativeImportExtensions": true, /* Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files. */
43-
// "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
44-
// "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
45-
// "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
46-
// "noUncheckedSideEffectImports": true, /* Check side effect imports. */
47-
// "resolveJsonModule": true, /* Enable importing .json files. */
48-
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
49-
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
50-
51-
/* JavaScript Support */
52-
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
53-
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
54-
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
12+
"module": "nodenext",
13+
"rootDir": "src",
14+
// "types": [],
5515

5616
/* Emit */
57-
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
58-
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
59-
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
60-
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
61-
"inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
62-
// "noEmit": true, /* Disable emitting files from a compilation. */
63-
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
64-
"outDir": "build", /* Specify an output folder for all emitted files. */
65-
"removeComments": true, /* Disable emitting comments. */
66-
"importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
67-
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
68-
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
69-
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
70-
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
71-
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
72-
"newLine": "lf", /* Set the newline character for emitting files. */
73-
// "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
74-
"noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
75-
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
76-
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
77-
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
17+
"inlineSourceMap": true,
18+
"outDir": "build",
19+
"removeComments": true,
20+
"importHelpers": true,
21+
"newLine": "lf",
22+
"noEmitHelpers": true,
7823

7924
/* Interop Constraints */
80-
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
81-
// "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
82-
// "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */
83-
// "erasableSyntaxOnly": true, /* Do not allow runtime constructs that are not part of ECMAScript. */
84-
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
85-
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
86-
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
87-
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
25+
"isolatedModules": true,
26+
// "verbatimModuleSyntax": true,
27+
"esModuleInterop": true,
28+
"forceConsistentCasingInFileNames": true,
8829

8930
/* Type Checking */
90-
"strict": true, /* Enable all strict type-checking options. */
91-
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
92-
// "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
93-
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
94-
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
95-
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
96-
// "strictBuiltinIteratorReturn": true, /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */
97-
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
98-
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
99-
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
100-
// "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
101-
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
102-
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
103-
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
104-
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
105-
// "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
106-
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
107-
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
108-
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
109-
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
31+
"strict": true,
32+
// "noUncheckedIndexedAccess": true,
11033

11134
/* Completeness */
112-
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
113-
"skipLibCheck": true /* Skip type checking all .d.ts files. */
35+
"skipLibCheck": true,
11436
}
11537
}

0 commit comments

Comments
 (0)