-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: initialize v8 on main thread to prevent random linux errors (#74)
- Loading branch information
Showing
10 changed files
with
88 additions
and
38 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env -S deno run -A | ||
|
||
// Script for quickly creating the plugin for testing purposes on Windows | ||
// To run: | ||
// 1. Run `./scripts/create_plugin_file.ts` | ||
// 2. Update dprint.json to point at ./target/release/plugin.json then update checksum | ||
// as shown when initially run. | ||
|
||
import $ from "dax"; | ||
|
||
await $`deno task build`; | ||
await $`cargo build --release`; | ||
if (Deno.build.os === "windows") { | ||
await $`powershell -Command ${"Compress-Archive -Force -Path target/release/dprint-plugin-prettier.exe -DestinationPath target/release/dprint-plugin-prettier-x86_64-pc-windows-msvc.zip"}`; | ||
} else if (Deno.build.os === "linux") { | ||
await $`zip -j target/release/dprint-plugin-prettier-x86_64-unknown-linux-gnu.zip target/release/dprint-plugin-prettier`; | ||
} else { | ||
throw "TODO"; | ||
} | ||
|
||
await $`cd target/release && deno run -A ../../scripts/create_plugin_file.ts --test`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import $ from "dax"; | ||
import { getChecksum } from "https://raw.githubusercontent.com/dprint/automation/0.8.1/hash.ts"; | ||
|
||
await $`./scripts/create_for_testing.ts`; | ||
const checksum = await getChecksum($.path("./target/release/plugin.json").readBytesSync()); | ||
const dprintConfig = $.path("dprint.json"); | ||
const data = dprintConfig.readJsonSync(); | ||
const index = data.plugins.findIndex(d => d.startsWith("./target") || d.includes("prettier")); | ||
data.plugins[index] = `./target/release/plugin.json@${checksum}`; | ||
dprintConfig.writeJsonPrettySync(data); | ||
await $`dprint fmt`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters