@astrojs/compiler 1.4.1 → 1.4.2

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,12 @@
1
1
  # @astrojs/compiler
2
2
 
3
+ ## 1.4.2
4
+
5
+ ### Patch Changes
6
+
7
+ - e104c1c: Polyfill the entire crypto object if node >= v16.17.0
8
+ - 6f7b2f6: Fix crash when transforming files with Windows line endings
9
+
3
10
  ## 1.4.1
4
11
 
5
12
  ### Patch Changes
package/astro.wasm CHANGED
Binary file
package/node/sync.cjs CHANGED
@@ -55,7 +55,7 @@ if (!globalThis.process) {
55
55
  }
56
56
  if (!globalThis.crypto) {
57
57
  Object.defineProperty(globalThis, "crypto", {
58
- value: {
58
+ value: import_crypto.default.webcrypto ? import_crypto.default.webcrypto : {
59
59
  getRandomValues(b) {
60
60
  return import_crypto.default.randomFillSync(b);
61
61
  }
package/node/wasm_exec.js CHANGED
@@ -20,11 +20,13 @@ if (!globalThis.process) {
20
20
  }
21
21
  if (!globalThis.crypto) {
22
22
  Object.defineProperty(globalThis, 'crypto', {
23
- value: {
24
- getRandomValues(b) {
25
- return crypto.randomFillSync(b);
23
+ value: crypto.webcrypto
24
+ ? crypto.webcrypto
25
+ : {
26
+ getRandomValues(b) {
27
+ return crypto.randomFillSync(b);
28
+ },
26
29
  },
27
- },
28
30
  });
29
31
  }
30
32
  if (!globalThis.performance) {
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "module",
6
6
  "bugs": "https://github.com/withastro/compiler/issues",
7
7
  "homepage": "https://astro.build",
8
- "version": "1.4.1",
8
+ "version": "1.4.2",
9
9
  "main": "./node/index.js",
10
10
  "types": "./node",
11
11
  "repository": {