@liangmi/vp-config 0.5.1 → 0.6.0
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/README.md +3 -1
- package/dist/index.mjs +3 -3
- package/dist/oxlint-plugin/index.d.mts +8 -8
- package/dist/oxlint-plugin/index.mjs +1 -1
- package/package.json +6 -7
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ Here are some real-world examples using `@liangmi/vp-config`.
|
|
|
32
32
|
- `@liangmi/vp-config` uses itself to manage its own codebase.
|
|
33
33
|
|
|
34
34
|
> [!WARNING]
|
|
35
|
-
>
|
|
35
|
+
> This preset requires `vite-plus@1.0.0-rc.1`. Vite+ is still pre-stable, so keep the installed version aligned with the preset's peer dependency. If something does not work as expected, please [submit an issue](https://github.com/liangmiQwQ/vp-config/issues/new).
|
|
36
36
|
|
|
37
37
|
### Categories
|
|
38
38
|
|
|
@@ -126,6 +126,8 @@ In most cases, they should be treated more like cached versions of Vite+ command
|
|
|
126
126
|
| `ccheck` | `vp check` |
|
|
127
127
|
| `ctest` | `vp test` |
|
|
128
128
|
|
|
129
|
+
Task cache options belong under `run.tasks.<name>.cache`, including `input`, `output`, `env`, and `untrackedEnv`.
|
|
130
|
+
|
|
129
131
|
Run them with `vp run <task>`, such as `vp run cpack`, or shorthand `vpr cpack`. They can also be used in `package.json` scripts while retaining Vite+ task caching.
|
|
130
132
|
|
|
131
133
|
### Staged files
|
package/dist/index.mjs
CHANGED
|
@@ -394,13 +394,13 @@ const runBase = { tasks: {
|
|
|
394
394
|
cbuild: "vp build",
|
|
395
395
|
ccheck: {
|
|
396
396
|
command: "vp check",
|
|
397
|
-
input: lintInput
|
|
397
|
+
cache: { input: lintInput }
|
|
398
398
|
},
|
|
399
399
|
cfmt: "vp fmt",
|
|
400
400
|
cformat: "vp format",
|
|
401
401
|
clint: {
|
|
402
402
|
command: "vp lint",
|
|
403
|
-
input: lintInput
|
|
403
|
+
cache: { input: lintInput }
|
|
404
404
|
},
|
|
405
405
|
cpack: "vp pack",
|
|
406
406
|
ctest: "vp test"
|
|
@@ -510,7 +510,7 @@ const libConfig = {
|
|
|
510
510
|
pack: {
|
|
511
511
|
fixedExtension: true,
|
|
512
512
|
exports: true,
|
|
513
|
-
dts: {
|
|
513
|
+
dts: { generator: "tsgo" }
|
|
514
514
|
},
|
|
515
515
|
run: runBase,
|
|
516
516
|
staged: stagedBase
|
|
@@ -3,8 +3,8 @@ declare const configNames: readonly ["base", "cli", "lib", "website"];
|
|
|
3
3
|
type ConfigName = (typeof configNames)[number];
|
|
4
4
|
//#endregion
|
|
5
5
|
//#region src/oxlint-plugin/project.d.ts
|
|
6
|
-
declare function getAllowedConfigNames(filename: string): readonly ConfigName[];
|
|
7
|
-
declare function isVpConfigImportAllowed(filename: string, importedNames: readonly string[]): boolean;
|
|
6
|
+
export declare function getAllowedConfigNames(filename: string): readonly ConfigName[];
|
|
7
|
+
export declare function isVpConfigImportAllowed(filename: string, importedNames: readonly string[]): boolean;
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/oxlint-plugin/info.d.ts
|
|
10
10
|
interface VpConfigRuntimeInfo {
|
|
@@ -25,12 +25,12 @@ interface RuntimeConfigInput {
|
|
|
25
25
|
category?: ConfigName;
|
|
26
26
|
config: Record<string, unknown>;
|
|
27
27
|
}
|
|
28
|
-
declare function getInfoPath(configDirectory: string): string;
|
|
29
|
-
declare function readRuntimeInfo(configDirectory: string): VpConfigRuntimeInfo | undefined;
|
|
30
|
-
declare function writeRuntimeInfo(input: RuntimeConfigInput): void;
|
|
31
|
-
declare function cleanupRuntimeInfo(configDirectory: string): void;
|
|
28
|
+
export declare function getInfoPath(configDirectory: string): string;
|
|
29
|
+
export declare function readRuntimeInfo(configDirectory: string): VpConfigRuntimeInfo | undefined;
|
|
30
|
+
export declare function writeRuntimeInfo(input: RuntimeConfigInput): void;
|
|
31
|
+
export declare function cleanupRuntimeInfo(configDirectory: string): void;
|
|
32
32
|
//#endregion
|
|
33
33
|
//#region src/oxlint-plugin/index.d.ts
|
|
34
|
-
declare const _default: import("
|
|
34
|
+
declare const _default: import("vite-plus/lint/plugins").Plugin;
|
|
35
35
|
//#endregion
|
|
36
|
-
export {
|
|
36
|
+
export { _default as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as isProject, c as writeRuntimeInfo, d as projectConfigNames, f as rootConfigNames, i as isLibProject, l as packageName, n as ensureRuntimeInfo, o as isWebsiteProject, p as viteConfigNames, r as getInfoPath, s as readRuntimeInfo, t as cleanupRuntimeInfo, u as pluginName } from "../info-DJqaJFGi.mjs";
|
|
2
2
|
import { existsSync } from "node:fs";
|
|
3
3
|
import { basename, dirname, join } from "node:path";
|
|
4
|
-
import { definePlugin, defineRule } from "
|
|
4
|
+
import { definePlugin, defineRule } from "vite-plus/lint/plugins";
|
|
5
5
|
//#region src/oxlint-plugin/ast.ts
|
|
6
6
|
function isVpConfigSpecifier(specifier) {
|
|
7
7
|
return specifier === packageName;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liangmi/vp-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Liang's JavaScript development toolchain config with Vite+.",
|
|
5
5
|
"homepage": "https://github.com/liangmiQwQ/vp-config#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -25,16 +25,15 @@
|
|
|
25
25
|
"access": "public"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@types/node": "^26.
|
|
28
|
+
"@types/node": "^26.6.3",
|
|
29
29
|
"@typescript/native-preview": "7.0.0-dev.20260707.2",
|
|
30
|
-
"bumpp": "^12.
|
|
30
|
+
"bumpp": "^12.3.0",
|
|
31
31
|
"typescript": "^7.0.2",
|
|
32
|
-
"vite": "npm:@voidzero-dev/vite-plus-core@0.
|
|
33
|
-
"vite-plus": "0.
|
|
32
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@1.0.0-rc.1",
|
|
33
|
+
"vite-plus": "1.0.0-rc.1"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"
|
|
37
|
-
"vite-plus": "0.3.0"
|
|
36
|
+
"vite-plus": "1.0.0-rc.1"
|
|
38
37
|
},
|
|
39
38
|
"scripts": {
|
|
40
39
|
"build": "vp run cpack",
|