Skip to content

Commit

Permalink
Merge pull request #2 from sheinsight/migration-workspace
Browse files Browse the repository at this point in the history
migration to workspace
  • Loading branch information
ityuany authored Sep 14, 2024
2 parents 9b466bd + 5dcbe5c commit 8d34388
Show file tree
Hide file tree
Showing 233 changed files with 843 additions and 2,091 deletions.
755 changes: 81 additions & 674 deletions Cargo.lock

Large diffs are not rendered by default.

27 changes: 5 additions & 22 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
[package]
edition = "2021"
name = "shined_source-code-diagnosis"
version = "0.0.0"
[workspace]
members = ["crates/*"]
resolver = "2"

[lib]
crate-type = ["cdylib"]

[dependencies]
# Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix
wax = "0.6.0"
[workspace.dependencies]
napi-derive = "2.12.2"
napi = { version = "2.12.2", default-features = false, features = ["napi4"] }
serde ={ version = "1.0.121", features = ["derive"] }
Expand All @@ -20,21 +15,9 @@ oxc_syntax = {version = "0.22.1"}
oxc_semantic = {version = "0.22.1"}
oxc_sourcemap = {version = "0.22.1"}
oxc-browserslist = "1.0.3"
tower-lsp = "0.20.0"
ropey = "1.0.0"
threadpool = "1.8.1"
rayon = "1.10.0"
anyhow = "1.0.88"
serde_json = "1.0.121"
serde_json5 = "0.1.0"
regex = "1.5.4"
lazy_static = "1.5.0"
log = "0.4.22"
env_logger = "0.11.5"

[build-dependencies]
napi-build = "2.0.1"


[profile.release]
lto = true
strip = "symbols"
4 changes: 2 additions & 2 deletions __test__/danger_string/index.spec.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from "ava";
import { getDangerStringsUsage } from "../../index.js";
import { checkDangerStrings } from "../../index.js";
import { fileURLToPath } from "node:url";
import { dirname, posix } from "node:path";

Expand All @@ -8,7 +8,7 @@ const __filename = fileURLToPath(import.meta.url);

test("getUsageOfDangerStrings", (t) => {
const cwd = dirname(__filename);
const response = getDangerStringsUsage(["bootcss.com", "bootcdn.com", "polyfill.com", "polyfill.io"], {
const response = checkDangerStrings(["bootcss.com", "bootcdn.com", "polyfill.com", "polyfill.io"], {
cwd,
});
t.is(response.length, 7);
Expand Down
24 changes: 12 additions & 12 deletions __test__/demo/demo.mjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import ava_test from "ava";
import { checkBrowserSupported } from "../../index.js";
import a, {checkDangerStrings} from "../../index.js";
import { performance } from "node:perf_hooks";

// ava_test(`should to has demo`, (t) => {
// const start = performance.now();

// const res = checkBrowserSupported("", {
// cwd: __dirname,
// concurrency: 1,
// });
ava_test(`should to has demo`, (t) => {
const start = performance.now();
console.log(a);
// const res = checkDangerStrings("", {
// cwd: __dirname,
// concurrency: 1,
// });

// res.sort((a, b) => {
// return +a.compat.support.chrome > +b.compat.support.chrome ? -1 : 1;
Expand Down Expand Up @@ -43,9 +43,9 @@ import { performance } from "node:perf_hooks";
// console.log(iterator, mapper[iterator].length,mapper[iterator][0].compat.support.chrome);
// }

// const end = performance.now();
const end = performance.now();

// console.log(`cost: ${end - start}ms`);
console.log(`cost: ${end - start}ms`);

// t.truthy(true);
// });
t.truthy(true);
});
47 changes: 0 additions & 47 deletions browser_compat_data.json

This file was deleted.

3 changes: 0 additions & 3 deletions browser_compat_names.json

This file was deleted.

209 changes: 0 additions & 209 deletions browser_compat_names_1.json

This file was deleted.

Loading

0 comments on commit 8d34388

Please sign in to comment.