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
2 changes: 2 additions & 0 deletions .changeset/short-things-shake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
17 changes: 10 additions & 7 deletions packages/tools-filesystem/src/const.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
export const DEFAULT_ENCODING = "utf-8";
export const WITH_UTF8_ENCODING = { encoding: DEFAULT_ENCODING } as const;
export const BIGINT_STATS_OPTIONS = { bigint: true } as const;
export const BIGINT_STATS_SYNC_OPTIONS = {
bigint: true,
throwIfNoEntry: false,
} as const;

export const DEFAULT_DIR_MODE = 0o755; // rwxr-xr-x (read/write/execute for owner, read/execute for group and others)
export const DEFAULT_ENCODING = "utf-8";
export const DEFAULT_FILE_MODE = 0o644; // rw-r--r-- (read/write for owner, read for group and others)

export const MKDIR_P_OPTIONS = {
recursive: true,
mode: DEFAULT_DIR_MODE,
} as const;
export const BIGINT_STATS_SYNC_OPTIONS = {
bigint: true,
throwIfNoEntry: false,
} as const;
export const BIGINT_STATS_OPTIONS = { bigint: true } as const;

export const WITH_UTF8_ENCODING = { encoding: DEFAULT_ENCODING } as const;
7 changes: 3 additions & 4 deletions scripts/src/commands/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ export class FormatCommand extends Command {
process.argv = [
process.argv0,
fileURLToPath(oxfmt),
"**/*.{js,json,jsx,md,mjs,mts,ts,tsx,yml}",
"!{CODE_OF_CONDUCT,SECURITY}.md",
"!**/{#archived,__fixtures__,lib}/**",
"!**/CHANGELOG.*",
"*.{js,json,jsx,md,mjs,mts,ts,tsx,yml}",
"!{#archived,__fixtures__,lib}",
"!{CHANGELOG,CODE_OF_CONDUCT,SECURITY}.md",
];
await import(oxfmt);
return 0;
Expand Down