-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use the aggregate rcompat/fs export to avoid shadowing globalThis.File
- Loading branch information
Showing
50 changed files
with
119 additions
and
113 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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { File } from "rcompat/fs"; | ||
import FS from "rcompat/fs"; | ||
|
||
const up = 4; | ||
const { url } = import.meta; | ||
const name = "package.json"; | ||
|
||
export default { | ||
...(await new File(url).up(up).join(name).json()).peerDependencies, | ||
...(await new FS.File(url).up(up).join(name).json()).peerDependencies, | ||
}; |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { File } from "rcompat/fs"; | ||
import FS from "rcompat/fs"; | ||
import { Logger } from "primate"; | ||
|
||
const json = await new File(import.meta.url).up(1).join("errors.json").json(); | ||
const json = await new FS.File(import.meta.url).up(1).join("errors.json").json(); | ||
|
||
export default Logger.err(json.errors, json.module); |
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { File } from "rcompat/fs"; | ||
import FS from "rcompat/fs"; | ||
|
||
const js = ".js"; | ||
const wasm = ".wasm"; | ||
|
||
export default async file => { | ||
const path = `${file}`.slice(0, - js.length).concat(wasm); | ||
return new Uint8Array(await File.arrayBuffer(path)); | ||
return new Uint8Array(await FS.File.arrayBuffer(path)); | ||
}; |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { File } from "rcompat/fs"; | ||
import FS from "rcompat/fs"; | ||
|
||
const wrap = await new File(import.meta.url).directory.join("wrap.py").text(); | ||
const wrap = await new FS.File(import.meta.url).directory.join("wrap.py").text(); | ||
|
||
export default code => `${wrap}\n${code}`; |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { File } from "rcompat/fs"; | ||
import FS from "rcompat/fs"; | ||
import { Logger } from "primate"; | ||
|
||
const json = await new File(import.meta.url).up(1).join("errors.json").json(); | ||
const json = await new FS.File(import.meta.url).up(1).join("errors.json").json(); | ||
|
||
export default Logger.err(json.errors, json.module); |
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { File } from "rcompat/fs"; | ||
import FS from "rcompat/fs"; | ||
|
||
const up = 2; | ||
const { url } = import.meta; | ||
const name = "package.json"; | ||
|
||
export default { | ||
...(await new File(url).up(up).join(name).json()).devDependencies, | ||
...(await new FS.File(url).up(up).join(name).json()).devDependencies, | ||
}; |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { File } from "rcompat/fs"; | ||
import FS from "rcompat/fs"; | ||
import { Logger } from "primate"; | ||
|
||
const json = await new File(import.meta.url).up(1).join("errors.json").json(); | ||
const json = await new FS.File(import.meta.url).up(1).join("errors.json").json(); | ||
|
||
export default Logger.err(json.errors, json.module); |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { File } from "rcompat/fs"; | ||
import FS from "rcompat/fs"; | ||
import { Logger } from "primate"; | ||
|
||
const json = await new File(import.meta.url).up(1).join("errors.json").json(); | ||
const json = await new FS.File(import.meta.url).up(1).join("errors.json").json(); | ||
|
||
export default Logger.err(json.errors, json.module); |
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { File } from "rcompat/fs"; | ||
import FS from "rcompat/fs"; | ||
|
||
const up = 4; | ||
const { url } = import.meta; | ||
const name = "package.json"; | ||
|
||
export default { | ||
...(await new File(url).up(up).join(name).json()).peerDependencies, | ||
...(await new FS.File(url).up(up).join(name).json()).peerDependencies, | ||
}; |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { File } from "rcompat/fs"; | ||
import FS from "rcompat/fs"; | ||
import { Logger } from "primate"; | ||
|
||
const json = await new File(import.meta.url).up(1).join("errors.json").json(); | ||
const json = await new FS.File(import.meta.url).up(1).join("errors.json").json(); | ||
|
||
export default Logger.err(json.errors, json.module); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { File } from "rcompat/fs"; | ||
import FS from "rcompat/fs"; | ||
import { Logger } from "primate"; | ||
|
||
const json = await new File(import.meta.url).up(1).join("errors.json").json(); | ||
const json = await new FS.File(import.meta.url).up(1).join("errors.json").json(); | ||
|
||
export default Logger.err(json.errors, json.module); |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { File } from "rcompat/fs"; | ||
import FS from "rcompat/fs"; | ||
import { Logger } from "primate"; | ||
|
||
const json = await new File(import.meta.url).up(1).join("errors.json").json(); | ||
const json = await new FS.File(import.meta.url).up(1).join("errors.json").json(); | ||
|
||
export default Logger.err(json.errors, json.module); |
Oops, something went wrong.