-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix integration tests on Windows (#14824)
This PR fixes Windows related path issues after merging #14820 --------- Co-authored-by: Jordan Pittman <[email protected]>
- Loading branch information
1 parent
e52bf2e
commit f378625
Showing
11 changed files
with
153 additions
and
35 deletions.
There are no files selected for viewing
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,3 @@ | ||
# `@tailwindcss/oxide-win32-arm64-msvc` | ||
|
||
This is the **arm64-pc-windows-msvc** binary for `@tailwindcss/oxide` |
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,27 @@ | ||
{ | ||
"name": "@tailwindcss/oxide-win32-arm64-msvc", | ||
"version": "4.0.0-alpha.30", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/tailwindlabs/tailwindcss.git", | ||
"directory": "crates/node/npm/win32-arm64-msvc" | ||
}, | ||
"os": [ | ||
"win32" | ||
], | ||
"cpu": [ | ||
"arm64" | ||
], | ||
"main": "tailwindcss-oxide.win32-arm64-msvc.node", | ||
"files": [ | ||
"tailwindcss-oxide.win32-arm64-msvc.node" | ||
], | ||
"publishConfig": { | ||
"provenance": true, | ||
"access": "public" | ||
}, | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">= 10" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
use std::fmt::Display; | ||
use std::io; | ||
use std::path; | ||
|
||
#[derive(Clone)] | ||
pub struct Path { | ||
inner: path::PathBuf, | ||
} | ||
|
||
impl From<path::PathBuf> for Path { | ||
fn from(value: path::PathBuf) -> Self { | ||
Self { inner: value } | ||
} | ||
} | ||
|
||
impl From<String> for Path { | ||
fn from(value: String) -> Self { | ||
Self { | ||
inner: value.into(), | ||
} | ||
} | ||
} | ||
|
||
impl From<&str> for Path { | ||
fn from(value: &str) -> Self { | ||
Self { | ||
inner: value.into(), | ||
} | ||
} | ||
} | ||
|
||
impl Display for Path { | ||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
write!( | ||
f, | ||
"{}", | ||
format!("{}", self.inner.display()).replace('\\', "/") | ||
) | ||
} | ||
} | ||
|
||
impl Path { | ||
pub fn trim_prefix(&self, prefix: String) -> Self { | ||
let prefix = prefix.replace('\\', "/"); | ||
let my_path = self.to_string(); | ||
|
||
if let Some(str) = my_path.strip_prefix(&prefix) { | ||
return str.into(); | ||
} | ||
|
||
my_path.into() | ||
} | ||
|
||
pub fn join(&self, component: &str) -> Self { | ||
if component.is_empty() { | ||
return self.clone(); | ||
} | ||
|
||
self.inner.join(component).into() | ||
} | ||
|
||
pub fn canonicalize(&self) -> io::Result<Self> { | ||
Ok(dunce::canonicalize(&self.inner)?.into()) | ||
} | ||
} |
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
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