Skip to content

Commit

Permalink
feat: add support for JSON imports (#513)
Browse files Browse the repository at this point in the history
* chore: write acceptance test

* fix: update edge-bundler

* fix: update deno min version
  • Loading branch information
Skn0tt committed Oct 30, 2023
1 parent 906ff87 commit d391d20
Show file tree
Hide file tree
Showing 17 changed files with 495 additions and 187 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
uses: denoland/setup-deno@v1
with:
# Should match the `DENO_VERSION_RANGE` constant in `node/bridge.ts`.
deno-version: v1.30.0
deno-version: v1.37.0
- name: Install dependencies
run: npm ci
- name: Tests
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
os: [ubuntu-latest]
node-version: ['14.18.0', '*']
# Must include the minimum deno version from the `DENO_VERSION_RANGE` constant in `node/bridge.ts`.
deno-version: ['v1.32.5', 'v1.x']
deno-version: ['v1.37.0', 'v1.x']
include:
- os: macOS-latest
node-version: '*'
Expand All @@ -46,7 +46,7 @@ jobs:
with:
deno-version: ${{ matrix.deno-version }}
- name: Setup Deno dependencies
run: deno cache https://deno.land/x/eszip@v0.40.0/eszip.ts
run: deno cache https://deno.land/x/eszip@v0.55.2/eszip.ts
- name: Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions deno/lib/common.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { load } from "https://deno.land/x/eszip@v0.40.0/loader.ts";
import { LoadResponse } from "https://deno.land/x/eszip@v0.40.0/mod.ts";
import { load } from "https://deno.land/x/eszip@v0.55.2/loader.ts";
import { LoadResponse } from "https://deno.land/x/eszip@v0.55.2/mod.ts";
import * as path from "https://deno.land/std@0.177.0/path/mod.ts";
import { retryAsync } from "https://deno.land/x/retry@v2.0.0/mod.ts";
import { isTooManyTries } from "https://deno.land/x/retry@v2.0.0/retry/tooManyTries.ts";
Expand Down
2 changes: 1 addition & 1 deletion deno/lib/stage2.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { build, LoadResponse } from 'https://deno.land/x/eszip@v0.40.0/mod.ts'
import { build, LoadResponse } from 'https://deno.land/x/eszip@v0.55.2/mod.ts'

import * as path from 'https://deno.land/std@0.177.0/path/mod.ts'

Expand Down
34 changes: 34 additions & 0 deletions deno/vendor/deno.land/x/dir@1.5.1/data_local_dir/mod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/** Returns the path to the user's local data directory.
*
* The returned value depends on the operating system and is either a string,
* containing a value from the following table, or `null`.
*
* | Platform | Value | Example |
* | -------- | ---------------------------------------- | -------------------------------------------- |
* | Linux | `$XDG_DATA_HOME` or `$HOME`/.local/share | /home/justjavac/.local/share |
* | macOS | `$HOME`/Library/Application Support | /Users/justjavac/Library/Application Support |
* | Windows | `$LOCALAPPDATA` | C:\Users\justjavac\AppData\Local |
*/
export default function dataDir(): string | null {
switch (Deno.build.os) {
case "linux": {
const xdg = Deno.env.get("XDG_DATA_HOME");
if (xdg) return xdg;

const home = Deno.env.get("HOME");
if (home) return `${home}/.local/share`;
break;
}

case "darwin": {
const home = Deno.env.get("HOME");
if (home) return `${home}/Library/Application Support`;
break;
}

case "windows":
return Deno.env.get("LOCALAPPDATA") ?? null;
}

return null;
}
Binary file not shown.

0 comments on commit d391d20

Please sign in to comment.