Skip to content

Commit

Permalink
chore: remove submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen committed May 29, 2024
1 parent f3cf455 commit d51f4f0
Show file tree
Hide file tree
Showing 11 changed files with 1,369 additions and 1,386 deletions.
9 changes: 0 additions & 9 deletions .gitmodules

This file was deleted.

12 changes: 4 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@
"browserslist": "browserslist"
},
"devDependencies": {
"browserslist": "4.23.0"
},
"pnpm": {
"overrides": {
"caniuse-lite": "1.0.30001597",
"electron-to-chromium": "1.4.702",
"node-releases": "2.0.14"
}
"browserslist": "4.23.0",
"caniuse-db": "1.0.30001597",
"electron-to-chromium": "1.4.702",
"node-releases": "2.0.14"
}
}
542 changes: 271 additions & 271 deletions src/generated/caniuse_browsers.rs

Large diffs are not rendered by default.

1,086 changes: 543 additions & 543 deletions src/generated/caniuse_feature_matching.rs

Large diffs are not rendered by default.

570 changes: 283 additions & 287 deletions src/generated/caniuse_global_usage.rs

Large diffs are not rendered by default.

482 changes: 241 additions & 241 deletions src/generated/caniuse_region_matching.rs

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions src/generated/node_release_schedule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,30 @@ pub static RELEASE_SCHEDULE: Lazy<
> = Lazy::new(|| {
let date_format = "%Y-%m-%d";
let mut map = ahash::AHashMap::with_capacity(24usize);
map.insert("8", ("2017-05-30", "2019-12-31"));
map.insert("10", ("2018-04-24", "2021-04-30"));
map.insert("5", ("2015-10-29", "2016-06-30"));
map.insert("18", ("2022-04-19", "2025-04-30"));
map.insert("22", ("2024-04-23", "2027-04-30"));
map.insert("16", ("2021-04-20", "2023-09-11"));
map.insert("19", ("2022-10-18", "2023-06-01"));
map.insert("7", ("2016-10-25", "2017-06-30"));
map.insert("0.10", ("2013-03-11", "2016-10-31"));
map.insert("21", ("2023-10-17", "2024-06-01"));
map.insert("14", ("2020-04-21", "2023-04-30"));
map.insert("20", ("2023-04-18", "2026-04-30"));
map.insert("24", ("2025-04-22", "2028-04-30"));
map.insert("4", ("2015-09-08", "2018-04-30"));
map.insert("13", ("2019-10-22", "2020-06-01"));
map.insert("17", ("2021-10-19", "2022-06-01"));
map.insert("0.12", ("2015-02-06", "2016-12-31"));
map.insert("17", ("2021-10-19", "2022-06-01"));
map.insert("15", ("2020-10-20", "2021-06-01"));
map.insert("22", ("2024-04-23", "2027-04-30"));
map.insert("11", ("2018-10-23", "2019-06-01"));
map.insert("9", ("2017-10-01", "2018-06-30"));
map.insert("23", ("2024-10-15", "2025-06-01"));
map.insert("0.8", ("2012-06-25", "2014-07-31"));
map.insert("12", ("2019-04-23", "2022-04-30"));
map.insert("18", ("2022-04-19", "2025-04-30"));
map.insert("11", ("2018-10-23", "2019-06-01"));
map.insert("6", ("2016-04-26", "2019-04-30"));
map.insert("12", ("2019-04-23", "2022-04-30"));
map.insert("24", ("2025-04-22", "2028-04-30"));
map.insert("0.8", ("2012-06-25", "2014-07-31"));
map.insert("4", ("2015-09-08", "2018-04-30"));
map.insert("20", ("2023-04-18", "2026-04-30"));
map.insert("7", ("2016-10-25", "2017-06-30"));
map.insert("14", ("2020-04-21", "2023-04-30"));
map.insert("21", ("2023-10-17", "2024-06-01"));
map.insert("5", ("2015-10-29", "2016-06-30"));
map.insert("13", ("2019-10-22", "2020-06-01"));
map.insert("8", ("2017-05-30", "2019-12-31"));
map.insert("0.10", ("2013-03-11", "2016-10-31"));
map.insert("9", ("2017-10-01", "2018-06-30"));
map.into_iter()
.map(|(version, (start, end))| {
(
Expand Down
1 change: 0 additions & 1 deletion vendor/caniuse
Submodule caniuse deleted from d82287
1 change: 0 additions & 1 deletion vendor/electron-to-chromium
Submodule electron-to-chromium deleted from 72ece2
1 change: 0 additions & 1 deletion vendor/node-releases
Submodule node-releases deleted from c24bb1
17 changes: 10 additions & 7 deletions xtask/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub fn build_electron_to_chromium() -> Result<()> {
let path = format!("{}/electron_to_chromium.rs", out_dir().to_string_lossy());

let mut data = serde_json::from_slice::<BTreeMap<String, String>>(&fs::read(format!(
"{}/vendor/electron-to-chromium/versions.json",
"{}/node_modules/electron-to-chromium/versions.json",
root()
))?)?
.into_iter()
Expand Down Expand Up @@ -126,7 +126,7 @@ pub fn build_node_versions() -> Result<()> {
let path = format!("{}/node_versions.rs", out_dir().to_string_lossy());

let releases: Vec<NodeRelease> = serde_json::from_slice(&fs::read(format!(
"{}/vendor/node-releases/data/processed/envs.json",
"{}/node_modules/node-releases/data/processed/envs.json",
root()
))?)?;

Expand All @@ -151,7 +151,7 @@ pub fn build_node_release_schedule() -> Result<()> {
let path = format!("{}/node_release_schedule.rs", out_dir().to_string_lossy());

let schedule: HashMap<String, NodeRelease> = serde_json::from_slice(&fs::read(format!(
"{}/vendor/node-releases/data/release-schedule/release-schedule.json",
"{}/node_modules/node-releases/data/release-schedule/release-schedule.json",
root()
))?)?;
let cap = schedule.len();
Expand Down Expand Up @@ -353,7 +353,7 @@ pub fn build_caniuse_global() -> Result<()> {

fn parse_caniuse_global() -> Result<Caniuse> {
Ok(serde_json::from_slice(&fs::read(format!(
"{}/vendor/caniuse/fulldata-json/data-2.0.json",
"{}/node_modules/caniuse-db/fulldata-json/data-2.0.json",
root()
))?)?)
}
Expand All @@ -367,9 +367,12 @@ pub fn build_caniuse_region() -> Result<()> {
let out_path = out_dir();
let out_dir = out_path.to_string_lossy();

let files = fs::read_dir(format!("{}/vendor/caniuse/region-usage-json", root()))?
.map(|entry| entry.map_err(anyhow::Error::from))
.collect::<Result<Vec<_>>>()?;
let files = fs::read_dir(format!(
"{}/node_modules/caniuse-db/region-usage-json",
root()
))?
.map(|entry| entry.map_err(anyhow::Error::from))
.collect::<Result<Vec<_>>>()?;

let Caniuse { agents, .. } = parse_caniuse_global()?;

Expand Down

0 comments on commit d51f4f0

Please sign in to comment.