diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9db3217..d0f95f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: node-version: '14.x' registry-url: 'https://registry.npmjs.org' - name: npm build - run: deno run --allow-read --allow-write=./npm --allow-net --allow-run --no-check ./scripts/build_npm.ts ${{steps.get_tag_version.outputs.TAG_VERSION}} + run: deno run -A --no-check ./scripts/build_npm.ts ${{steps.get_tag_version.outputs.TAG_VERSION}} - name: npm publish if: startsWith(github.ref, 'refs/tags/') env: diff --git a/mod_test.ts b/mod_test.ts index 6c48da3..87f324b 100644 --- a/mod_test.ts +++ b/mod_test.ts @@ -3,13 +3,13 @@ import { createFromBuffer, createStreaming, Formatter, GlobalConfiguration } fro Deno.test("it should create streaming", async () => { const formatter = await createStreaming( - fetch("https://plugins.dprint.dev/json-0.12.0.wasm"), + fetch("https://plugins.dprint.dev/json-0.13.0.wasm"), ); runGeneralJsonFormatterTests(formatter); }); Deno.test("it should create from buffer", async () => { - const buffer = await fetch("https://plugins.dprint.dev/json-0.12.0.wasm") + const buffer = await fetch("https://plugins.dprint.dev/json-0.13.0.wasm") .then((r) => r.arrayBuffer()); const formatter = createFromBuffer(buffer); runGeneralJsonFormatterTests(formatter); @@ -27,23 +27,21 @@ function runGeneralJsonFormatterTests(formatter: Formatter) { assertEquals(formatter.getLicenseText().includes("MIT"), true); assertEquals(formatter.getPluginInfo(), { name: "dprint-plugin-json", - version: "0.12.0", + version: "0.13.0", configKey: "json", fileExtensions: ["json", "jsonc"], fileNames: [], helpUrl: "https://dprint.dev/plugins/json", - configSchemaUrl: "", + configSchemaUrl: "https://plugins.dprint.dev/schemas/json-0.13.0.json", }); assertEquals(formatter.getResolvedConfig(), { - // todo(dsherret): this is incorrect in the plugin (should be "array.preferSingleLine") - arrayPreferSingleLine: true, + "array.preferSingleLine": true, "commentLine.forceSpaceAfterSlashes": true, ignoreNodeCommentText: "dprint-ignore", indentWidth: 4, lineWidth: 30, newLineKind: "lf", - // todo(dsherret): this is incorrect in the plugin - objectPreferSingleLine: true, + "object.preferSingleLine": true, useTabs: false, }); assertEquals( diff --git a/scripts/build_npm.ts b/scripts/build_npm.ts index 6757b16..983b19a 100644 --- a/scripts/build_npm.ts +++ b/scripts/build_npm.ts @@ -1,12 +1,13 @@ -import { build } from "https://deno.land/x/dnt@0.0.9/mod.ts"; +import { build } from "https://deno.land/x/dnt@0.0.11/mod.ts"; await build({ - entryPoint: "mod.ts", + entryPoints: ["mod.ts"], typeCheck: true, + test: false, outDir: "./npm", package: { name: "@dprint/formatter", - version: Deno.args[0] ?? "0.0.0", + version: Deno.args[0], description: "Wasm formatter for dprint plugins.", repository: { type: "git",