-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: upgrade all the things #67
base: master
Are you sure you want to change the base?
Changes from all commits
94b454f
f351ebe
64bcd9a
e08c1f7
c862ce7
e497944
67b36ab
4b6aadf
45b1dc7
1ce660c
b9b8c8b
b559bec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
npx lint-staged |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
save-exact=true | ||
save-prefix= |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
22.9.0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
nodejs 15.4.0 | ||
nodejs 22.9.0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import globals from "globals"; | ||
import pluginJs from "@eslint/js"; | ||
|
||
export default [ | ||
{ | ||
languageOptions: { globals: globals.browser }, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I usually see this option at the last position (so it can override previous ones). I guess giving this configuration it should work ™️ , though. |
||
}, | ||
pluginJs.configs.recommended, | ||
{ | ||
ignores: ["**/third_party/", "**/lib/", "coverage/"], | ||
}, | ||
]; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,16 +14,25 @@ | |
* limitations under the License. | ||
*/ | ||
|
||
import { Font } from "./src/lib-font/lib-font-wrapper"; | ||
import Fondue from "./src/fondue/Fondue.js"; | ||
import { Font } from "./src/lib-font/lib-font-wrapper.mjs"; | ||
import Fondue from "./src/fondue/Fondue.mjs"; | ||
|
||
export async function fromPath(fontPath) { | ||
const { readFile } = await import("node:fs/promises"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Curious why this wasn't imported in line 16, but that shouldn't block the PR. |
||
|
||
export function fromPath(fontPath) { | ||
return new Promise((resolve, reject) => { | ||
const font = new Font(fontPath); | ||
font.onload = () => resolve(new Fondue(font)); | ||
font.onerror = (e) => reject(e.detail.message); | ||
|
||
font.src = fontPath; | ||
(async () => { | ||
try { | ||
const file = await readFile(fontPath); | ||
font.fromDataBuffer(file.buffer, fontPath).catch(reject); | ||
} catch (e) { | ||
reject(e); | ||
} | ||
})(); | ||
}); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works.
If you want to disable the postinstall scripts,
npm ci --ignore-scripts
would be the option to set.This might prevent malicious scripts from being executed.