Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for Deno 2 #79

Merged
merged 4 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/deno.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
deno-version: v2.x

- name: Verify formatting
run: deno fmt --check
Expand All @@ -46,7 +46,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'docs/_site'
path: "docs/_site"

- name: Deploy to GitHub Pages
if: ${{ github.event_name == 'push' }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/jsr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
push:
tags:
- 'v*.*.*'
- "v*.*.*"

permissions:
contents: read
Expand All @@ -21,7 +21,7 @@ jobs:
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
deno-version: v2.x

- name: Publish to JSR
run: |
Expand Down
6 changes: 3 additions & 3 deletions _scripts/build_npm.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { build } from "jsr:@deno/[email protected].2";
import { emptyDir } from "jsr:@std/fs@0.229.3/empty-dir";
import { build } from "jsr:@deno/[email protected].3";
import { emptyDir } from "jsr:@std/fs@1.0.4/empty-dir";

await emptyDir("./_npm");

Expand Down Expand Up @@ -35,7 +35,7 @@ await build({
},
},
mappings: {
"npm:@types/[email protected].5": "estree",
"npm:@types/[email protected].6": "estree",
},
postBuild() {
Deno.copyFileSync("LICENSE", "_npm/LICENSE");
Expand Down
4 changes: 2 additions & 2 deletions bench/bench.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import vento from "../mod.ts";
import nunjucks from "npm:[email protected]";
import { Liquid } from "npm:liquidjs@10.15.0";
import { Eta } from "https://deno.land/x/eta@v3.4.0/src/index.ts";
import { Liquid } from "npm:liquidjs@10.18.0";
import { Eta } from "https://deno.land/x/eta@v3.5.0/src/index.ts";

const env = vento({
useWith: true,
Expand Down
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"docs": "cd docs && deno task serve",
"build-npm": "deno run --allow-run=npm --allow-env --allow-sys --allow-read --allow-write --allow-net=jsr.io _scripts/build_npm.ts",
"build-jsr": "deno run -A https://deno.land/x/[email protected]/mod.ts --name=@vento/vento",
"update-deps": "rm -rf npm && deno run -A 'https://deno.land/x/[email protected].6/cli.ts' update deno.json **/*.ts"
"update-deps": "rm -rf npm && deno run -A 'https://deno.land/x/[email protected].8/cli.ts' update deno.json **/*.ts"
},
"lock": false,
"fmt": {
Expand Down
8 changes: 4 additions & 4 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export * as path from "jsr:@std/[email protected].0";
export * as html from "jsr:@std/[email protected].0";
export * as path from "jsr:@std/[email protected].6";
export * as html from "jsr:@std/[email protected].3";

export * as astring from "jsr:@davidbonnet/[email protected]";
export * as meriyah from "npm:meriyah@4.5.0";
export * as meriyah from "npm:meriyah@6.0.2";
export * as walker from "npm:[email protected]";
export type * as ESTree from "npm:@types/[email protected].5";
export type * as ESTree from "npm:@types/[email protected].6";
2 changes: 1 addition & 1 deletion src/tokenizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export default function tokenize(source: string): TokenizeResult {
}
}
} catch (error) {
return { tokens, position, error };
return { tokens, position, error: error as Error | undefined };
}

return { tokens, position, error: undefined };
Expand Down