@stillwind/integration 0.10.1 → 0.12.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/CHANGELOG.md +22 -0
- package/README.md +3 -3
- package/dist/astro/index.js +1 -1
- package/dist/fresh/index.js +1 -1
- package/dist/nuxt/index.js +1 -1
- package/dist/{plugin-EX3Ckcsu.js → plugin-DiebeZNj.js} +33 -7
- package/dist/plugin-DiebeZNj.js.map +1 -0
- package/dist/vite/index.js +1 -1
- package/package.json +6 -6
- package/dist/plugin-EX3Ckcsu.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @stillwind/integration
|
|
2
2
|
|
|
3
|
+
## 0.12.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Make CLI and build output easier to read. `stillwind --help` now highlights headings and options, lists `--format files` only for `stillwind fmt`, and suggests valid commands and `--help` for an unknown command or option. Text output colors file paths, codes, `note:`, `help:`, and `docs:` labels, shows `[project N]` only when results come from several projects, and gives `stillwind inspect` diagnostics the same colors and docs links. Compiler and lint messages no longer show internal byte offsets or debug values, name the conflicting framework and source format for `SW02001`, show the rejected prefix for `SW01001`, and use consistent punctuation and backticks. Unterminated blocks, nesting overflows, and syntax errors in CSS now point at the failing character instead of the whole stylesheet. When the failing CSS has no document URI, such as CSS that a plugin generates, the error message names that source and the byte offset. Vite reports compile errors in the error overlay with a clickable location and a code frame, and build warnings use the `stillwind: <rule>: <message> (<path>:<line>:<column>)` form.
|
|
8
|
+
|
|
9
|
+
- Updated dependencies:
|
|
10
|
+
- @stillwind/config@0.12.0
|
|
11
|
+
- @stillwind/host@0.12.0
|
|
12
|
+
- @stillwind/native@0.12.0
|
|
13
|
+
- stillwind@0.12.0
|
|
14
|
+
|
|
15
|
+
## 0.11.0
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies:
|
|
20
|
+
- @stillwind/config@0.11.0
|
|
21
|
+
- @stillwind/host@0.11.0
|
|
22
|
+
- @stillwind/native@0.11.0
|
|
23
|
+
- stillwind@0.11.0
|
|
24
|
+
|
|
3
25
|
## 0.10.1
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -9,8 +9,8 @@ styles during development and production builds, and delivers generated CSS thro
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
npm install stillwind
|
|
13
|
+
npm install -D @stillwind/integration
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
Create the stylesheet and project configuration described in the
|
|
@@ -23,7 +23,7 @@ Place Stillwind before your framework's JSX transform:
|
|
|
23
23
|
```ts
|
|
24
24
|
import { stillwind } from "@stillwind/integration/vite";
|
|
25
25
|
import react from "@vitejs/plugin-react";
|
|
26
|
-
import { defineConfig } from "vite
|
|
26
|
+
import { defineConfig } from "vite";
|
|
27
27
|
|
|
28
28
|
export default defineConfig({
|
|
29
29
|
plugins: [stillwind(), react()],
|
package/dist/astro/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as renderChunkStyles, r as createViteProject, t as createVitePlugins } from "../plugin-
|
|
1
|
+
import { i as renderChunkStyles, r as createViteProject, t as createVitePlugins } from "../plugin-DiebeZNj.js";
|
|
2
2
|
import { registerDevelopmentCss } from "./development.js";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
package/dist/fresh/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as createViteProject, t as createVitePlugins } from "../plugin-
|
|
1
|
+
import { r as createViteProject, t as createVitePlugins } from "../plugin-DiebeZNj.js";
|
|
2
2
|
// src/fresh/manifest.ts
|
|
3
3
|
/** Filters repeated static files for Fresh's move operation without changing the emitted manifest. */
|
|
4
4
|
function registrationManifest(source) {
|
package/dist/nuxt/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as createViteProject, t as createVitePlugins } from "../plugin-
|
|
1
|
+
import { r as createViteProject, t as createVitePlugins } from "../plugin-DiebeZNj.js";
|
|
2
2
|
import { addPluginTemplate, defineNuxtModule } from "nuxt/kit";
|
|
3
3
|
// src/nuxt/index.ts
|
|
4
4
|
/**
|
|
@@ -2,7 +2,7 @@ import { a as buildCompilerOptions, i as SharedTypeFacts, n as isSourceEntry, o
|
|
|
2
2
|
import { a as eachMapping, i as TraceMap, n as addSegment, r as toEncodedMap, t as GenMapping } from "./gen-mapping-D7jFzOEh.js";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
5
|
-
import { attachPlugins, cleanModuleId, compilerModuleId, composeFrameworkSourceMap, createStylesheetResolver, cssEntrypoint, cssWithSourceMap, decodeCssSourceMap, fileSourceKind, finalizeCss, finalizeModuleWithMap, isStylesheet, loadCssGraph, moduleSourceMap, nodePluginHost, resolveTypeFactsEnvironment, tracePhase, warnRejectedNames } from "@stillwind/host";
|
|
5
|
+
import { CompilationFailure, attachPlugins, cleanModuleId, compilerModuleId, composeFrameworkSourceMap, createStylesheetResolver, cssEntrypoint, cssWithSourceMap, decodeCssSourceMap, fileSourceKind, finalizeCss, finalizeModuleWithMap, formatReport, isStylesheet, loadCssGraph, moduleSourceMap, nodePluginHost, resolveTypeFactsEnvironment, tracePhase, warnRejectedNames } from "@stillwind/host";
|
|
6
6
|
import { basename, dirname, extname, isAbsolute, posix, relative, resolve, sep } from "node:path";
|
|
7
7
|
import { readFile, readdir, realpath, stat } from "node:fs/promises";
|
|
8
8
|
import { minifyCss } from "@stillwind/native";
|
|
@@ -638,7 +638,7 @@ function developmentHooks(project) {
|
|
|
638
638
|
await publish(name, host);
|
|
639
639
|
} catch (error) {
|
|
640
640
|
if (!stale.length) throw error;
|
|
641
|
-
this.warn(`
|
|
641
|
+
this.warn(`stillwind: update failed; retaining published styles: ${error instanceof Error ? error.message : String(error)}`);
|
|
642
642
|
return [.../* @__PURE__ */ new Set([...context.modules, ...stale])];
|
|
643
643
|
}
|
|
644
644
|
if (previous && source !== void 0) {
|
|
@@ -661,7 +661,7 @@ function developmentHooks(project) {
|
|
|
661
661
|
}
|
|
662
662
|
if (stale.length) return [.../* @__PURE__ */ new Set([...context.modules, ...stale])];
|
|
663
663
|
} catch (error) {
|
|
664
|
-
this.warn(`
|
|
664
|
+
this.warn(`stillwind: update failed; retaining published styles: ${error instanceof Error ? error.message : String(error)}`);
|
|
665
665
|
}
|
|
666
666
|
},
|
|
667
667
|
/**
|
|
@@ -1195,7 +1195,7 @@ var DesignSystem = class {
|
|
|
1195
1195
|
if (this.settings.cssWatching && change !== this.cssChange) continue;
|
|
1196
1196
|
this.cssAttempted = change;
|
|
1197
1197
|
this.cssError = error;
|
|
1198
|
-
this.settings.devServerRef?.config.logger.warn(`
|
|
1198
|
+
this.settings.devServerRef?.config.logger.warn(`stillwind: update failed; retaining published styles: ${error instanceof Error ? error.message : String(error)}`);
|
|
1199
1199
|
return;
|
|
1200
1200
|
}
|
|
1201
1201
|
}
|
|
@@ -2281,7 +2281,7 @@ function createViteProject(supplied = {}, applicationRoot = () => void 0) {
|
|
|
2281
2281
|
}
|
|
2282
2282
|
});
|
|
2283
2283
|
} catch (error) {
|
|
2284
|
-
server.config.logger.warn(`
|
|
2284
|
+
server.config.logger.warn(`stillwind: update failed; retaining published styles: ${error instanceof Error ? error.message : String(error)}`);
|
|
2285
2285
|
} finally {
|
|
2286
2286
|
done.resolve();
|
|
2287
2287
|
}
|
|
@@ -2525,7 +2525,33 @@ function transformHooks(project, virtualModules, options = {}) {
|
|
|
2525
2525
|
addWatchFile: this.addWatchFile.bind(this),
|
|
2526
2526
|
warn: this.warn.bind(this)
|
|
2527
2527
|
} : this;
|
|
2528
|
-
|
|
2528
|
+
let result;
|
|
2529
|
+
try {
|
|
2530
|
+
result = await compile(name, code, id, context);
|
|
2531
|
+
} catch (error) {
|
|
2532
|
+
if (error instanceof CompilationFailure) {
|
|
2533
|
+
const [first, ...rest] = error.batches.flatMap((batch) => batch.reports);
|
|
2534
|
+
const primary = first?.primary;
|
|
2535
|
+
if (first && primary?.scope === "range") {
|
|
2536
|
+
let file = id;
|
|
2537
|
+
if (primary.location.uri.startsWith("file:")) try {
|
|
2538
|
+
file = fileURLToPath(primary.location.uri);
|
|
2539
|
+
} catch {
|
|
2540
|
+
file = id;
|
|
2541
|
+
}
|
|
2542
|
+
this.error({
|
|
2543
|
+
message: [formatReport(first, { primaryLocation: false }), ...rest.map((report) => formatReport(report))].join("\n"),
|
|
2544
|
+
id: file,
|
|
2545
|
+
loc: {
|
|
2546
|
+
file,
|
|
2547
|
+
line: primary.location.startLine + 1,
|
|
2548
|
+
column: primary.location.startColumn
|
|
2549
|
+
}
|
|
2550
|
+
});
|
|
2551
|
+
}
|
|
2552
|
+
}
|
|
2553
|
+
throw error;
|
|
2554
|
+
}
|
|
2529
2555
|
publishSoon(name);
|
|
2530
2556
|
return result;
|
|
2531
2557
|
}
|
|
@@ -3012,4 +3038,4 @@ function compilerPlugin(project, transform, closed) {
|
|
|
3012
3038
|
}
|
|
3013
3039
|
export { renderChunkStyles as i, stillwind as n, createViteProject as r, createVitePlugins as t };
|
|
3014
3040
|
|
|
3015
|
-
//# sourceMappingURL=plugin-
|
|
3041
|
+
//# sourceMappingURL=plugin-DiebeZNj.js.map
|