csskit 0.0.39 → 0.0.40-canary.3c8a4e565a

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/addon.js CHANGED
@@ -24,16 +24,18 @@ function platformPackage() {
24
24
  function loadAddon() {
25
25
  const pkg = platformPackage();
26
26
  const candidates = pkg ? [`${pkg}/csskit.node`, './csskit.node'] : ['./csskit.node'];
27
+ let cause;
27
28
  for (const spec of candidates) {
28
29
  try {
29
30
  return requireFrom(spec);
30
- } catch {
31
- // try the next candidate
31
+ } catch (error) {
32
+ cause ??= error;
32
33
  }
33
34
  }
34
35
  throw new Error(
35
36
  `csskit: no native addon for ${process.platform}-${process.arch}. ` +
36
37
  `Install the '${pkg || 'csskit-<platform>'}' package, or use the WebAssembly build at 'csskit/bundle'.`,
38
+ { cause },
37
39
  );
38
40
  }
39
41
 
package/bin/csskit CHANGED
@@ -2,7 +2,7 @@
2
2
  set -e
3
3
 
4
4
  SOURCE="${BASH_SOURCE[0]}"
5
- SCRIPT_DIR="$(cd "$(dirname "$SOURCE")" && pwd)"
5
+ SCRIPT_DIR="$(cd "$(dirname "$SOURCE")" && pwd -P)"
6
6
 
7
7
  # Resolve if bin is symlink; like `readlink -f`/`realpath` but cross-platform
8
8
  while [ -L "$SOURCE" ]; do
@@ -11,7 +11,7 @@ while [ -L "$SOURCE" ]; do
11
11
  /*) SOURCE="$TARGET" ;;
12
12
  *) SOURCE="$SCRIPT_DIR/$TARGET" ;;
13
13
  esac
14
- SCRIPT_DIR="$(cd "$(dirname "$SOURCE")" && pwd)"
14
+ SCRIPT_DIR="$(cd "$(dirname "$SOURCE")" && pwd -P)"
15
15
  done
16
16
 
17
17
  # Detect platform and architecture for sub-package path
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "csskit",
3
- "version": "0.0.39",
3
+ "version": "0.0.40-canary.3c8a4e565a",
4
4
  "description": "Refreshing CSS",
5
5
  "keywords": [],
6
6
  "repository": "https://github.com/csskit/csskit",
@@ -43,16 +43,17 @@
43
43
  "./bundle"
44
44
  ],
45
45
  "scripts": {
46
- "test": "npm run test:napi && npm run test:wasm",
46
+ "test": "npm run test:napi && npm run test:wasm && npm run test:bin",
47
47
  "test:napi": "node --test tests/om.test.js",
48
- "test:wasm": "node --test tests/bundle.test.js"
48
+ "test:wasm": "node --test tests/bundle.test.js",
49
+ "test:bin": "node --test tests/launcher.test.js"
49
50
  },
50
51
  "optionalDependencies": {
51
- "csskit-darwin-arm64": "0.0.39",
52
- "csskit-darwin-x64": "0.0.39",
53
- "csskit-linux-arm64": "0.0.39",
54
- "csskit-linux-x64": "0.0.39",
55
- "csskit-win32-arm64": "0.0.39",
56
- "csskit-win32-x64": "0.0.39"
52
+ "csskit-darwin-arm64": "0.0.40-canary.3c8a4e565a",
53
+ "csskit-darwin-x64": "0.0.40-canary.3c8a4e565a",
54
+ "csskit-linux-arm64": "0.0.40-canary.3c8a4e565a",
55
+ "csskit-linux-x64": "0.0.40-canary.3c8a4e565a",
56
+ "csskit-win32-arm64": "0.0.40-canary.3c8a4e565a",
57
+ "csskit-win32-x64": "0.0.40-canary.3c8a4e565a"
57
58
  }
58
59
  }