Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion noir/noir-repo/compiler/fm/src/file_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ impl PathString {
pub fn from_path(p: PathBuf) -> Self {
PathString(p)
}

pub fn into_path_buf(self) -> PathBuf {
self.0
}
}
impl From<PathBuf> for PathString {
fn from(pb: PathBuf) -> PathString {
Expand Down Expand Up @@ -82,7 +86,7 @@ impl FileMap {
}

pub fn get_name(&self, file_id: FileId) -> Result<PathString, Error> {
let name = self.files.get(file_id.as_usize())?.name().clone();
let name = self.get_absolute_name(file_id)?;

// See if we can make the file name a bit shorter/easier to read if it starts with the current directory
if let Some(current_dir) = &self.current_dir {
Expand All @@ -93,6 +97,11 @@ impl FileMap {

Ok(name)
}

pub fn get_absolute_name(&self, file_id: FileId) -> Result<PathString, Error> {
let name = self.files.get(file_id.as_usize())?.name().clone();
Ok(name)
}
}
impl Default for FileMap {
fn default() -> Self {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ export default {
// playwrightLauncher({ product: "webkit" }),
// playwrightLauncher({ product: "firefox" }),
],
middleware: [async function setGzHeader(ctx, next) {
if (ctx.url.endsWith('.gz')) {
ctx.set('Content-Encoding', 'gzip');
ctx.res.removeHeader('Content-Length');
}
await next();
}],
plugins: [
esbuildPlugin({
ts: true,
Expand Down
16 changes: 8 additions & 8 deletions noir/noir-repo/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17893,27 +17893,27 @@ __metadata:
languageName: node
linkType: hard

"playwright-core@npm:1.42.1":
version: 1.42.1
resolution: "playwright-core@npm:1.42.1"
"playwright-core@npm:1.50.0":
version: 1.50.0
resolution: "playwright-core@npm:1.50.0"
bin:
playwright-core: cli.js
checksum: e7081ff0f43b4b9053255109eb1d82164b7c6b55c7d022e25fca935d0f4fc547cb2e02a7b64f0c2a9462729be7bb45edb082f8b038306415944f1061d00d9c90
checksum: aca5222d7859039bc579b4b860db57c8adc1cc94c3de990ed08cec911bf888e2decb331560bd456991c98222a55c58526187a2a070e6f101fbef43a8e07e1dea
languageName: node
linkType: hard

"playwright@npm:^1.22.2":
version: 1.42.1
resolution: "playwright@npm:1.42.1"
version: 1.50.0
resolution: "playwright@npm:1.50.0"
dependencies:
fsevents: 2.3.2
playwright-core: 1.42.1
playwright-core: 1.50.0
dependenciesMeta:
fsevents:
optional: true
bin:
playwright: cli.js
checksum: 06c16bcd07d03993126ee6c168bde28c59d3cab7f7d4721eaf57bd5c51e9c929e10a286758de062b5fc02874413ceae2684d14cbb7865c0a51fc8df6d9001ad1
checksum: 44004e3082433f6024665fcf04bd37cda2b284bd5262682a40a60c66943ccf66f68fbc9ca859908dfd0d117235424580a55e9ccd07e2ad9c30df363b6445448b
languageName: node
linkType: hard

Expand Down
Loading