@netlify/edge-bundler 9.4.0 → 9.5.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.
Files changed (30) hide show
  1. package/deno/lib/common.ts +2 -2
  2. package/deno/lib/stage2.ts +1 -1
  3. package/deno/vendor/deno.land/x/dir@1.5.1/data_local_dir/mod.ts +34 -0
  4. package/deno/vendor/deno.land/x/{eszip@v0.40.0 → eszip@v0.55.2}/eszip_wasm.generated.js +136 -179
  5. package/deno/vendor/deno.land/x/eszip@v0.55.2/eszip_wasm_bg.wasm +0 -0
  6. package/deno/vendor/deno.land/x/wasmbuild@0.15.1/cache.ts +157 -0
  7. package/deno/vendor/deno.land/x/wasmbuild@0.15.1/loader.ts +126 -0
  8. package/dist/node/bridge.d.ts +1 -1
  9. package/dist/node/bridge.js +1 -1
  10. package/dist/node/bundler.js +1 -4
  11. package/dist/node/bundler.test.js +23 -48
  12. package/dist/node/feature_flags.d.ts +2 -8
  13. package/dist/node/feature_flags.js +1 -4
  14. package/dist/node/formats/eszip.d.ts +1 -1
  15. package/dist/node/formats/eszip.js +2 -2
  16. package/dist/node/formats/javascript.js +1 -2
  17. package/dist/node/manifest.d.ts +1 -1
  18. package/dist/node/manifest.js +7 -16
  19. package/dist/node/manifest.test.js +2 -19
  20. package/dist/node/npm_dependencies.d.ts +1 -0
  21. package/dist/node/npm_dependencies.js +3 -1
  22. package/dist/node/npm_import_error.d.ts +2 -2
  23. package/dist/node/npm_import_error.js +5 -9
  24. package/dist/node/server/server.js +29 -15
  25. package/dist/node/server/server.test.js +2 -5
  26. package/dist/test/util.js +1 -1
  27. package/package.json +1 -1
  28. package/deno/vendor/deno.land/x/eszip@v0.40.0/eszip_wasm_bg.wasm +0 -0
  29. /package/deno/vendor/deno.land/x/{eszip@v0.40.0 → eszip@v0.55.2}/loader.ts +0 -0
  30. /package/deno/vendor/deno.land/x/{eszip@v0.40.0 → eszip@v0.55.2}/mod.ts +0 -0
@@ -1,5 +1,5 @@
1
- import { load } from "https://deno.land/x/eszip@v0.40.0/loader.ts";
2
- import { LoadResponse } from "https://deno.land/x/eszip@v0.40.0/mod.ts";
1
+ import { load } from "https://deno.land/x/eszip@v0.55.2/loader.ts";
2
+ import { LoadResponse } from "https://deno.land/x/eszip@v0.55.2/mod.ts";
3
3
  import * as path from "https://deno.land/std@0.177.0/path/mod.ts";
4
4
  import { retryAsync } from "https://deno.land/x/retry@v2.0.0/mod.ts";
5
5
  import { isTooManyTries } from "https://deno.land/x/retry@v2.0.0/retry/tooManyTries.ts";
@@ -1,4 +1,4 @@
1
- import { build, LoadResponse } from 'https://deno.land/x/eszip@v0.40.0/mod.ts'
1
+ import { build, LoadResponse } from 'https://deno.land/x/eszip@v0.55.2/mod.ts'
2
2
 
3
3
  import * as path from 'https://deno.land/std@0.177.0/path/mod.ts'
4
4
 
@@ -0,0 +1,34 @@
1
+ /** Returns the path to the user's local data directory.
2
+ *
3
+ * The returned value depends on the operating system and is either a string,
4
+ * containing a value from the following table, or `null`.
5
+ *
6
+ * | Platform | Value | Example |
7
+ * | -------- | ---------------------------------------- | -------------------------------------------- |
8
+ * | Linux | `$XDG_DATA_HOME` or `$HOME`/.local/share | /home/justjavac/.local/share |
9
+ * | macOS | `$HOME`/Library/Application Support | /Users/justjavac/Library/Application Support |
10
+ * | Windows | `$LOCALAPPDATA` | C:\Users\justjavac\AppData\Local |
11
+ */
12
+ export default function dataDir(): string | null {
13
+ switch (Deno.build.os) {
14
+ case "linux": {
15
+ const xdg = Deno.env.get("XDG_DATA_HOME");
16
+ if (xdg) return xdg;
17
+
18
+ const home = Deno.env.get("HOME");
19
+ if (home) return `${home}/.local/share`;
20
+ break;
21
+ }
22
+
23
+ case "darwin": {
24
+ const home = Deno.env.get("HOME");
25
+ if (home) return `${home}/Library/Application Support`;
26
+ break;
27
+ }
28
+
29
+ case "windows":
30
+ return Deno.env.get("LOCALAPPDATA") ?? null;
31
+ }
32
+
33
+ return null;
34
+ }