@powerlines/plugin-unimport 0.1.128 → 0.1.130
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/dist/index.cjs +2 -3
- package/dist/index.mjs +2 -3
- package/dist/powerlines/src/types/config.d.mts +1 -1
- package/package.json +7 -12
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
3
|
-
let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
|
|
4
3
|
let __stryke_helpers_throttle = require("@stryke/helpers/throttle");
|
|
5
4
|
let __stryke_json_storm_json = require("@stryke/json/storm-json");
|
|
6
5
|
let __stryke_path_join = require("@stryke/path/join");
|
|
@@ -40,9 +39,9 @@ const plugin = (options) => {
|
|
|
40
39
|
const { injectImports, init, ...rest } = (0, unimport.createUnimport)(this.config.unimport);
|
|
41
40
|
this.unimport = { ...rest };
|
|
42
41
|
this.unimport.dumpImports = (0, __stryke_helpers_throttle.throttle)(async () => {
|
|
43
|
-
this.
|
|
42
|
+
this.trace("Dumping import file...");
|
|
44
43
|
const items = await this.unimport.getImports();
|
|
45
|
-
this.
|
|
44
|
+
this.trace(`Writing imports-dump JSON file: ${(0, __stryke_path_join.joinPaths)(this.dataPath, "imports-dump.json")}`);
|
|
46
45
|
const content = __stryke_json_storm_json.StormJSON.stringify(items);
|
|
47
46
|
if (content.trim() !== this.unimport.lastImportsDump?.trim()) {
|
|
48
47
|
this.unimport.lastImportsDump = content;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
2
1
|
import { throttle } from "@stryke/helpers/throttle";
|
|
3
2
|
import { StormJSON } from "@stryke/json/storm-json";
|
|
4
3
|
import { joinPaths } from "@stryke/path/join";
|
|
@@ -37,9 +36,9 @@ const plugin = (options) => {
|
|
|
37
36
|
const { injectImports, init, ...rest } = createUnimport(this.config.unimport);
|
|
38
37
|
this.unimport = { ...rest };
|
|
39
38
|
this.unimport.dumpImports = throttle(async () => {
|
|
40
|
-
this.
|
|
39
|
+
this.trace("Dumping import file...");
|
|
41
40
|
const items = await this.unimport.getImports();
|
|
42
|
-
this.
|
|
41
|
+
this.trace(`Writing imports-dump JSON file: ${joinPaths(this.dataPath, "imports-dump.json")}`);
|
|
43
42
|
const content = StormJSON.stringify(items);
|
|
44
43
|
if (content.trim() !== this.unimport.lastImportsDump?.trim()) {
|
|
45
44
|
this.unimport.lastImportsDump = content;
|
|
@@ -4,10 +4,10 @@ import { StoragePort, StoragePreset } from "./fs.mjs";
|
|
|
4
4
|
import { TSConfig } from "./tsconfig.mjs";
|
|
5
5
|
import { PluginContext } from "./context.mjs";
|
|
6
6
|
import { Plugin } from "./plugin.mjs";
|
|
7
|
-
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
8
7
|
import { MaybePromise } from "@stryke/types/base";
|
|
9
8
|
import { PreviewOptions } from "vite";
|
|
10
9
|
import { Format } from "@storm-software/build-tools/types";
|
|
10
|
+
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
11
11
|
import { StormWorkspaceConfig } from "@storm-software/config/types";
|
|
12
12
|
import { TypeDefinitionParameter } from "@stryke/types/configuration";
|
|
13
13
|
import { AssetGlob } from "@stryke/types/file";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-unimport",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.130",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Powerlines plugin to add imports to source code automatically via unimport.",
|
|
6
6
|
"repository": {
|
|
@@ -117,23 +117,18 @@
|
|
|
117
117
|
"files": ["dist/**/*"],
|
|
118
118
|
"keywords": ["unimport", "powerlines", "storm-software", "powerlines-plugin"],
|
|
119
119
|
"dependencies": {
|
|
120
|
-
"@stryke/path": "^0.24.1",
|
|
121
120
|
"@stryke/helpers": "^0.9.32",
|
|
122
|
-
"@stryke/fs": "^0.33.27",
|
|
123
121
|
"@stryke/json": "^0.9.33",
|
|
124
|
-
"@stryke/
|
|
125
|
-
"@stryke/types": "^0.10.29",
|
|
122
|
+
"@stryke/path": "^0.24.1",
|
|
126
123
|
"defu": "^6.1.4",
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
"magic-string": "^0.30.21"
|
|
124
|
+
"magic-string": "^0.30.21",
|
|
125
|
+
"powerlines": "^0.37.3",
|
|
126
|
+
"unimport": "^5.6.0"
|
|
131
127
|
},
|
|
132
128
|
"devDependencies": {
|
|
133
|
-
"@powerlines/
|
|
134
|
-
"@powerlines/plugin-plugin": "^0.12.79",
|
|
129
|
+
"@powerlines/plugin-plugin": "^0.12.81",
|
|
135
130
|
"@types/node": "^24.10.4"
|
|
136
131
|
},
|
|
137
132
|
"publishConfig": { "access": "public" },
|
|
138
|
-
"gitHead": "
|
|
133
|
+
"gitHead": "ae9a5afaa497538477b63988242f433b60974623"
|
|
139
134
|
}
|