Skip to content

Commit 36c2d1e

Browse files
committed
chore: various improvements
1. Return to @deno/emit (simpler for current needs than esbuild) 2. Drop importMap.json in favor of deno.json#/imports 3. Use JSR where applicable 4. Define @lib alias for easier common lib imports 5. Define deno.json/#tasks
1 parent 193cbe0 commit 36c2d1e

File tree

334 files changed

+546
-561
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

334 files changed

+546
-561
lines changed

2015/day/1/part/1/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("(())", expect(0));
66
Deno.test("()()", expect(0));

2015/day/1/part/2/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test(")", expect(1));
66
Deno.test("()())", expect(5));

2015/day/10/part/1/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { lookAndSay } from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("lookAndSay", async (t) => {
66
await t.step("1", expect("11"));

2015/day/10/part/2/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { lookAndSay } from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("lookAndSay", async (t) => {
66
await t.step("1", expect("11"));

2015/day/11/part/1/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve, { isValidPassword } from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("isValidPassword", async (t) => {
66
await t.step("hijklmmn", expect(false));

2015/day/11/part/2/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { isValidPassword } from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("isValidPassword", async (t) => {
66
await t.step("hijklmmn", expect(false));

2015/day/12/part/1/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("[1,2,3]", expect(6));
66
Deno.test('{"a":2,"b":4}', expect(6));

2015/day/12/part/2/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("[1,2,3]", expect(6));
66
Deno.test('[1,{"c":"red","b":2},3]', expect(4));

2015/day/13/part/1/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("example", () => {
66
const input = `\

2015/day/13/part/1/solve.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import permute from "../../../../../lib/permute.ts";
1+
import permute from "@lib/permute.ts";
22

33
export default function solve(input: string) {
44
const graph = parsePotentialHappinessGraph(input);

2015/day/13/part/2/solve.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import permute from "../../../../../lib/permute.ts";
1+
import permute from "@lib/permute.ts";
22

33
export default function solve(input: string) {
44
const graph = parsePotentialHappinessGraph(input);

2015/day/14/part/1/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("example", () => {
66
const input = `\

2015/day/14/part/2/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("example", () => {
66
const input = `\

2015/day/15/part/1/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("example", () => {
66
const input = `\

2015/day/15/part/2/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("example", () => {
66
const input = `\

2015/day/17/part/1/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("example", () => {
66
const input = `\

2015/day/17/part/2/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("example", () => {
66
const input = `\

2015/day/18/part/1/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("example", () => {
66
const input = `\

2015/day/18/part/2/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("example", () => {
66
const input = `\

2015/day/19/part/1/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("HOH", expect(4));
66
Deno.test("HOHOHO", expect(7));

2015/day/19/part/2/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("HOH", expect(3));
66
Deno.test("HOHOHO", expect(6));

2015/day/2/part/1/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("2x3x4", expect(58));
66
Deno.test("1x1x10", expect(43));

2015/day/2/part/2/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("2x3x4", expect(34));
66
Deno.test("1x1x10", expect(14));

2015/day/21/part/1/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { calculateHitsToWin } from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("calculateHitsToWin", () => {
66
assertEquals(

2015/day/22/part/1/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("Hit Points: 13", expect(173 + 53));
66
Deno.test("Hit Points: 14", expect(229 + 113 + 73 + 173 + 53));

2015/day/23/part/1/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { exec } from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("example", () => {
66
const input = `\

2015/day/24/part/1/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("example", () => {
66
const input = `\

2015/day/24/part/2/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("example", () => {
66
const input = `\

2015/day/3/part/1/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test(">", expect(2));
66
Deno.test("^>v<", expect(4));

2015/day/3/part/2/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("^v", expect(3));
66
Deno.test("^>v<", expect(3));

2015/day/4/part/1/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("abcdef", expect(609043));
66
Deno.test("pqrstuv", expect(1048970));

2015/day/4/part/1/solve.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import md5 from "../../../../../lib/md5.ts";
1+
import md5 from "@lib/md5.ts";
22

33
export default function solve(input: string, prefix = "0".repeat(5)) {
44
for (let number = 1;; number++) {

2015/day/4/part/2/solve.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import md5 from "../../../../../lib/md5.ts";
1+
import md5 from "@lib/md5.ts";
22

33
export default function solve(input: string, prefix = "0".repeat(6)) {
44
for (let number = 1;; number++) {

2015/day/5/part/1/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("ugknbfddgicrmopn", expect(1));
66
Deno.test("aaa", expect(1));

2015/day/5/part/2/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("qjhvhtzxzqqjkmpb", expect(1));
66
Deno.test("xxyxx", expect(1));

2015/day/6/part/1/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("turn on 0,0 through 999,999", expect(1000000));
66
Deno.test("toggle 0,0 through 999,0", expect(1000));

2015/day/6/part/2/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("turn on 0,0 through 0,0", expect(1));
66
Deno.test("toggle 0,0 through 999,999", expect(2000000));

2015/day/7/part/1/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createSignals, parseInstructions } from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("example", () => {
66
const input = `\

2015/day/7/part/2/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createSignals, parseInstructions } from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("example", () => {
66
const input = `\

2015/day/8/part/1/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test('""', expect(2 - 0));
66
Deno.test('"abc"', expect(5 - 3));

2015/day/8/part/2/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test('""', expect(6 - 2));
66
Deno.test('"abc"', expect(9 - 5));

2015/day/9/part/1/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("example", () => {
66
const input = `\

2015/day/9/part/1/solve.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import permute from "../../../../../lib/permute.ts";
1+
import permute from "@lib/permute.ts";
22

33
export default function solve(input: string) {
44
const distances = parseDistances(input);

2015/day/9/part/2/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("example", () => {
66
const input = `\

2015/day/9/part/2/solve.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import permute from "../../../../../lib/permute.ts";
1+
import permute from "@lib/permute.ts";
22

33
export default function solve(input: string) {
44
const distances = parseDistances(input);

2016/day/1/part/1/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("R2, L3", expect(5));
66
Deno.test("R2, R2, R2", expect(2));

2016/day/1/part/2/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("R8, R4, R4, R8", expect(4));
66

2016/day/2/part/1/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("example", () => {
66
const input = `\

2016/day/2/part/2/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("example", () => {
66
const input = `\

2016/day/3/part/1/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("example", () => {
66
const input = `\

2016/day/3/part/2/solve.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import solve from "./solve.ts";
22

3-
import { assertEquals } from "../../../../../lib/testing/asserts.ts";
3+
import { assertEquals } from "@std/assert";
44

55
Deno.test("example", () => {
66
const input = `\

0 commit comments

Comments
 (0)