@homepages/concrete 6.0.0 → 6.0.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
@@ -1,5 +1,11 @@
1
1
  # @homepages/concrete
2
2
 
3
+ ## 6.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - c57a69e: On Windows, `concrete dev`, `concrete check` and `concrete publish` compile a template's stylesheets. Each stylesheet `template.ts` imports was read by its absolute path, and a drive path such as `C:\Users\…\globals.css` was mistaken for a remote URL with the scheme `c:`, so no stylesheet was compiled and every template failed `css/tailwind-import` with `no stylesheet reachable from template.ts imports "tailwindcss"`. Paths on macOS and Linux were never affected, and a protocol-relative `//host/…` import is still treated as remote on every platform.
8
+
3
9
  ## 6.0.0
4
10
 
5
11
  ### Major Changes
@@ -57,6 +57,10 @@
57
57
  "where `concrete upgrade` reports a `none` bar it folded into a brief, rewrite that brief's last paragraph (`Produce nothing when: \u2026`) as the brief's own sentence saying when producing nothing is right.",
58
58
  "where `concrete upgrade` reports a `reconcile` that holds rules, move each rule onto the slot it sets \u2014 `source: Section.slots.<slot>` where it copied a value, `compute({ reads }, \u2026)` where it derived one; where it reports a `compute((f) => \u2026)`, declare what the callback reads and take each value as a parameter."
59
59
  ]
60
+ },
61
+ "6.0.1": {
62
+ "codemods": [],
63
+ "manual": []
60
64
  }
61
65
  }
62
66
  }
@@ -1,5 +1,5 @@
1
- import { externalSpecifier } from "../platform/paths.js";
2
- import { basename, extname, isAbsolute, join } from "node:path";
1
+ import { externalSpecifier, isFileSpecifier } from "../platform/paths.js";
2
+ import { basename, extname, join } from "node:path";
3
3
  import { build } from "esbuild";
4
4
 
5
5
  //#region src/css/inline.ts
@@ -27,16 +27,13 @@ const ASSET_MIME = {
27
27
  ".pdf": "application/pdf",
28
28
  ".zip": "application/zip"
29
29
  };
30
- const REMOTE_RE = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
31
30
  function importRulePlugin() {
32
31
  return {
33
32
  name: "concrete-css-inline",
34
33
  setup(api) {
35
34
  api.onResolve({ filter: /.*/ }, (args) => {
36
35
  if (args.kind !== "import-rule") return void 0;
37
- if (REMOTE_RE.test(args.path)) return externalSpecifier(args.path);
38
- if (args.path.startsWith(".") || isAbsolute(args.path)) return void 0;
39
- return externalSpecifier(args.path);
36
+ return isFileSpecifier(args.path) ? void 0 : externalSpecifier(args.path);
40
37
  });
41
38
  }
42
39
  };
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "6.0.0";
2
+ var version = "6.0.1";
3
3
 
4
4
  //#endregion
5
5
  export { version };
@@ -29,6 +29,10 @@ function withoutRoot(text, root, paths = nodePath) {
29
29
  function normalizePosix(path) {
30
30
  return nodePath.posix.normalize(path);
31
31
  }
32
+ function isFileSpecifier(specifier, paths = nodePath) {
33
+ if (specifier.startsWith("//")) return false;
34
+ return specifier.startsWith(".") || paths.isAbsolute(specifier);
35
+ }
32
36
  function externalFile(file) {
33
37
  return {
34
38
  path: pathToFileURL(file).href,
@@ -59,4 +63,4 @@ function packageFile(source, built) {
59
63
  }
60
64
 
61
65
  //#endregion
62
- export { RUNNING_FROM_SOURCE, externalFile, externalSpecifier, isInsideRoot, isWorkspaceFile, normalizePosix, packageFile, packageRoot, replaceRoot, resolveRoot, toPosix, underNodeModules, withoutRoot, workspacePath };
66
+ export { RUNNING_FROM_SOURCE, externalFile, externalSpecifier, isFileSpecifier, isInsideRoot, isWorkspaceFile, normalizePosix, packageFile, packageRoot, replaceRoot, resolveRoot, toPosix, underNodeModules, withoutRoot, workspacePath };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homepages/concrete",
3
- "version": "6.0.0",
3
+ "version": "6.0.1",
4
4
  "description": "Concrete, the HomePages template framework: the authoring API, the contract primitives, the styles, the lint preset and the `concrete` command in one package that owns its whole toolchain.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",