faucet-pipeline-css 0.2.1 → 0.4.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.
@@ -1,18 +1,18 @@
1
- name: tests
2
1
  on:
3
2
  - push
3
+
4
4
  jobs:
5
- build:
5
+ test:
6
6
  runs-on: ubuntu-latest
7
7
  strategy:
8
8
  matrix:
9
9
  node-version:
10
- - 14.x
11
- - 16.x
12
- - 17.x
10
+ - 20.x
11
+ - 24.x
12
+ - latest
13
13
  steps:
14
- - uses: actions/checkout@v2.4.0
15
- - uses: actions/setup-node@v2.5.1
14
+ - uses: actions/checkout@v5
15
+ - uses: actions/setup-node@v6
16
16
  with:
17
17
  node-version: ${{ matrix.node-version }}
18
18
  - run: npm install-test
package/CHANGELOG.md CHANGED
@@ -1,6 +1,27 @@
1
1
  faucet-pipeline-css version history
2
2
  ===================================
3
3
 
4
+ v0.4.0
5
+ ------
6
+
7
+ _2025-10-26_
8
+
9
+ notable changes for end users:
10
+
11
+ * dropped support for Node 19 and below
12
+ * update dependencies
13
+
14
+ no significant changes for developers
15
+
16
+
17
+ v0.3.0
18
+ ------
19
+
20
+ _2023-01-12_
21
+
22
+ Maintenance release to update dependencies; no significant changes
23
+
24
+
4
25
  v0.2.1
5
26
  ------
6
27
 
package/lib/index.js CHANGED
@@ -2,13 +2,20 @@ let { abort } = require("faucet-pipeline-core/lib/util");
2
2
  let path = require("path");
3
3
  let makePostCSS = require("./make-postcss");
4
4
 
5
- module.exports = (config, assetManager, { browsers, compact, sourcemaps } = {}) => {
6
- let bundlers = config.map(bundleConfig =>
7
- makeBundler(bundleConfig, assetManager, { browsers, compact, sourcemaps }));
8
-
9
- return filepaths => Promise.all(bundlers.map(bundle => bundle(filepaths)));
5
+ module.exports = {
6
+ key: "css",
7
+ bucket: "styles",
8
+ plugin: faucetCSS
10
9
  };
11
10
 
11
+ function faucetCSS(config, assetManager, { browsers, compact, sourcemaps } = {}) {
12
+ let bundlers = config.map(bundleConfig => makeBundler(bundleConfig,
13
+ assetManager, { browsers, compact, sourcemaps }));
14
+
15
+ return filepaths => Promise.all(bundlers.
16
+ map(bundler => bundler(filepaths)));
17
+ }
18
+
12
19
  function makeBundler(config, assetManager, { browsers, compact, sourcemaps } = {}) {
13
20
  let { browserslist, fingerprint } = config;
14
21
 
@@ -27,7 +34,14 @@ function makeBundler(config, assetManager, { browsers, compact, sourcemaps } = {
27
34
  browsers = browsers.defaults;
28
35
  }
29
36
 
30
- let postCSS = makePostCSS(source, target, assetManager, sourcemaps, browsers, compact);
37
+ let postCSS = makePostCSS(
38
+ source,
39
+ target,
40
+ assetManager,
41
+ sourcemaps,
42
+ browsers,
43
+ compact
44
+ );
31
45
 
32
46
  let previouslyIncludedFiles;
33
47
 
@@ -1,8 +1,7 @@
1
1
  let postcss = require("postcss");
2
2
  let atImport = require("postcss-import");
3
3
  let assetURL = require("./asset-url");
4
- let { promisify } = require("faucet-pipeline-core/lib/util");
5
- let readFile = promisify(require("fs").readFile);
4
+ let { readFile } = require("node:fs/promises");
6
5
 
7
6
  module.exports = function(input, target, assetManager, sourcemaps, browsers, compact) {
8
7
  let plugins = [
@@ -21,7 +20,7 @@ module.exports = function(input, target, assetManager, sourcemaps, browsers, com
21
20
 
22
21
  let options = {
23
22
  from: input,
24
- target: target
23
+ target
25
24
  };
26
25
 
27
26
  if(sourcemaps) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "faucet-pipeline-css",
3
- "version": "0.2.1",
3
+ "version": "0.4.0",
4
4
  "description": "CSS for faucet-pipeline",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -18,20 +18,22 @@
18
18
  "url": "https://github.com/faucet-pipeline/faucet-pipeline-css/issues"
19
19
  },
20
20
  "homepage": "https://www.faucet-pipeline.org",
21
+ "engines": {
22
+ "node": ">= 20"
23
+ },
21
24
  "dependencies": {
22
- "faucet-pipeline-core": "^1.6.1",
23
- "postcss": "~8.4.6",
24
- "postcss-discard-comments": "~5.0.3",
25
- "postcss-import": "~14.0.2",
25
+ "faucet-pipeline-core": "^2.1.0",
26
+ "postcss": "~8.5.6",
27
+ "postcss-discard-comments": "~7.0.4",
28
+ "postcss-import": "~16.1.1",
26
29
  "postcss-message-helpers": "~2.0.0",
27
- "postcss-normalize-whitespace": "~5.0.4"
30
+ "postcss-normalize-whitespace": "~7.0.1"
28
31
  },
29
32
  "devDependencies": {
30
- "eslint-config-fnd": "^1.6.0",
31
- "eslint-plugin-import": "^2.25.3",
32
- "faucet-pipeline-static": "^2.0.0",
33
- "json-diff": "^0.7.1",
33
+ "eslint-config-fnd": "^1.13.0",
34
+ "faucet-pipeline-static": "^2.1.0",
35
+ "json-diff": "^1.0.0",
34
36
  "npm-run-all": "^4.1.5",
35
- "release-util-fnd": "^2.0.1"
37
+ "release-util-fnd": "^3.0.0"
36
38
  }
37
39
  }
package/release CHANGED
@@ -4,8 +4,8 @@ set -eu
4
4
 
5
5
  . ./node_modules/release-util-fnd/lib.sh
6
6
 
7
- pre_release_checks main
7
+ pre_release_checks
8
8
  npm test
9
9
 
10
10
  create_package > /dev/null
11
- publish_package origin main
11
+ publish_package
@@ -6,10 +6,5 @@ module.exports = {
6
6
  source: "./src/index.css",
7
7
  target: "./dist/bundle.css"
8
8
  }],
9
- plugins: {
10
- css: {
11
- plugin: path.resolve("../.."),
12
- bucket: "styles"
13
- }
14
- }
9
+ plugins: [path.resolve("../..")]
15
10
  };
@@ -6,10 +6,5 @@ module.exports = {
6
6
  source: "./src/index.css",
7
7
  target: "./dist/bundle.css"
8
8
  }],
9
- plugins: {
10
- css: {
11
- plugin: path.resolve("../.."),
12
- bucket: "styles"
13
- }
14
- }
9
+ plugins: [path.resolve("../..")]
15
10
  };
@@ -1,5 +1,5 @@
1
1
  body:before {
2
- content: "\26a0 CSS Error: src/index.css:2:2: Unknown word";
2
+ content: "\26a0 CSS Error: src/index.css:2:2: Unknown word color";
3
3
  font-weight: bold;
4
4
  display: block;
5
5
  border: 5px solid red;
@@ -6,10 +6,5 @@ module.exports = {
6
6
  source: "./src/index.css",
7
7
  target: "./dist/bundle.css"
8
8
  }],
9
- plugins: {
10
- css: {
11
- plugin: path.resolve("../.."),
12
- bucket: "styles"
13
- }
14
- }
9
+ plugins: [path.resolve("../..")]
15
10
  };
@@ -14,10 +14,5 @@ module.exports = {
14
14
  target: "./dist/manifest.json",
15
15
  value: f => `/assets/${f}`
16
16
  },
17
- plugins: {
18
- css: {
19
- plugin: path.resolve("../.."),
20
- bucket: "styles"
21
- }
22
- }
17
+ plugins: [path.resolve("../..")]
23
18
  };
@@ -6,10 +6,5 @@ module.exports = {
6
6
  source: "./src/index.css",
7
7
  target: "./dist/bundle.css"
8
8
  }],
9
- plugins: {
10
- css: {
11
- plugin: path.resolve("../.."),
12
- bucket: "styles"
13
- }
14
- }
9
+ plugins: [path.resolve("../..")]
15
10
  };
@@ -14,10 +14,5 @@ module.exports = {
14
14
  target: "./dist/manifest.json",
15
15
  value: f => `/assets/${f}`
16
16
  },
17
- plugins: {
18
- css: {
19
- plugin: path.resolve("../.."),
20
- bucket: "styles"
21
- }
22
- }
17
+ plugins: [path.resolve("../..")]
23
18
  };