diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6cbf8b1b..24245a3c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: - uses: denoland/setup-deno@v2 # using ourself to install deno could compromise the tests with: deno-version: ^2.1.6 - - run: deno task cache --frozen + - run: deno install --frozen - run: deno task test --coverage=cov_profile --no-check - run: deno coverage cov_profile --lcov --exclude=tests/ --output=cov_profile.lcov - uses: coverallsapp/github-action@v2 diff --git a/deno.jsonc b/deno.jsonc index 67c63582..8fe70edb 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -15,8 +15,7 @@ //--------------------------------------- ci/cd/admin "coverage": "scripts/run-coverage.sh", "typecheck": "deno check ./entrypoint.ts", - "compile": "deno compile --lock=deno.lock --allow-all --output \"$INIT_CWD/pkgx\" ./entrypoint.ts", - "cache": "deno cache ./entrypoint.ts src/**/*.test.ts" + "compile": "deno compile --lock=deno.lock --allow-all --output \"$INIT_CWD/pkgx\" ./entrypoint.ts" }, "pkgx": "deno^2.1.6", "lint": { @@ -37,6 +36,9 @@ "is-what": "https://deno.land/x/is_what@v4.1.15/src/index.ts", "outdent": "jsr:@cspotcode/outdent@^0.8", "pkgx": "https://deno.land/x/libpkgx@v0.20.3/mod.ts", - "pkgx/": "https://deno.land/x/libpkgx@v0.20.3/src/" + "pkgx/": "https://deno.land/x/libpkgx@v0.20.3/src/", + // test dependencies + "faker": "npm:@faker-js/faker@^9.4.0", + "npm:@types/node@*": "npm:@types/node@*" // gets downloaded implictly when running tests } } diff --git a/deno.lock b/deno.lock index 512a27ec..8e220306 100644 --- a/deno.lock +++ b/deno.lock @@ -6,14 +6,19 @@ "jsr:@cspotcode/outdent@0.8": "0.8.0", "jsr:@std/assert@^1.0.10": "1.0.10", "jsr:@std/assert@^1.0.6": "1.0.10", + "jsr:@std/async@^1.0.9": "1.0.9", "jsr:@std/bytes@^1.0.2": "1.0.4", "jsr:@std/crypto@1": "1.0.3", + "jsr:@std/data-structures@^1.0.6": "1.0.6", "jsr:@std/encoding@1": "1.0.6", "jsr:@std/encoding@~1.0.5": "1.0.6", "jsr:@std/fmt@^1.0.2": "1.0.4", + "jsr:@std/fmt@~1.0.2": "1.0.4", "jsr:@std/fs@1": "1.0.9", + "jsr:@std/fs@^1.0.9": "1.0.9", "jsr:@std/internal@^1.0.5": "1.0.5", "jsr:@std/io@0.225": "0.225.0", + "jsr:@std/io@~0.224.9": "0.224.9", "jsr:@std/json@1": "1.0.1", "jsr:@std/jsonc@^1.0.1": "1.0.1", "jsr:@std/path@1": "1.0.8", @@ -22,7 +27,7 @@ "jsr:@std/testing@^1.0.3": "1.0.9", "jsr:@std/yaml@1": "1.0.5", "jsr:@std/yaml@^1.0.5": "1.0.5", - "npm:@faker-js/faker@*": "9.4.0", + "npm:@faker-js/faker@^9.4.0": "9.4.0", "npm:@types/node@*": "22.5.4" }, "jsr": { @@ -30,7 +35,9 @@ "integrity": "f71c921cce224c13d322e5cedba4f38e8f7354c7d855c9cb22729362a53f25aa", "dependencies": [ "jsr:@cliffy/internal", - "jsr:@std/encoding@~1.0.5" + "jsr:@std/encoding@~1.0.5", + "jsr:@std/fmt@~1.0.2", + "jsr:@std/io@~0.224.9" ] }, "@cliffy/internal@1.0.0-rc.7": { @@ -45,12 +52,18 @@ "jsr:@std/internal" ] }, + "@std/async@1.0.9": { + "integrity": "c6472fd0623b3f3daae023cdf7ca5535e1b721dfbf376562c0c12b3fb4867f91" + }, "@std/bytes@1.0.4": { "integrity": "11a0debe522707c95c7b7ef89b478c13fb1583a7cfb9a85674cd2cc2e3a28abc" }, "@std/crypto@1.0.3": { "integrity": "a2a32f51ddef632d299e3879cd027c630dcd4d1d9a5285d6e6788072f4e51e7f" }, + "@std/data-structures@1.0.6": { + "integrity": "76a7fd8080c66604c0496220a791860492ab21a04a63a969c0b9a0609bbbb760" + }, "@std/encoding@1.0.6": { "integrity": "ca87122c196e8831737d9547acf001766618e78cd8c33920776c7f5885546069" }, @@ -66,6 +79,9 @@ "@std/internal@1.0.5": { "integrity": "54a546004f769c1ac9e025abd15a76b6671ddc9687e2313b67376125650dc7ba" }, + "@std/io@0.224.9": { + "integrity": "4414664b6926f665102e73c969cfda06d2c4c59bd5d0c603fd4f1b1c840d6ee3" + }, "@std/io@0.225.0": { "integrity": "c1db7c5e5a231629b32d64b9a53139445b2ca640d828c26bf23e1c55f8c079b3", "dependencies": [ @@ -88,7 +104,11 @@ "integrity": "9bdd4ac07cb13e7594ac30e90f6ceef7254ac83a9aeaa089be0008f33aab5cd4", "dependencies": [ "jsr:@std/assert@^1.0.10", - "jsr:@std/internal" + "jsr:@std/async", + "jsr:@std/data-structures", + "jsr:@std/fs@^1.0.9", + "jsr:@std/internal", + "jsr:@std/path@^1.0.8" ] }, "@std/yaml@1.0.5": { @@ -160,7 +180,9 @@ "jsr:@std/jsonc@^1.0.1", "jsr:@std/path@^1.0.6", "jsr:@std/testing@^1.0.3", - "jsr:@std/yaml@^1.0.5" + "jsr:@std/yaml@^1.0.5", + "npm:@faker-js/faker@^9.4.0", + "npm:@types/node@*" ] } } diff --git a/src/utils/test-utils.ts b/src/utils/test-utils.ts index 7ab11065..44752cd9 100644 --- a/src/utils/test-utils.ts +++ b/src/utils/test-utils.ts @@ -1,5 +1,5 @@ import { Logger } from "../prefab/install.ts" -import { faker } from "npm:@faker-js/faker" +import { faker } from "faker" import { Path } from "pkgx" export default faker