File tree Expand file tree Collapse file tree 5 files changed +10
-7
lines changed
miniflare/src/plugins/core Expand file tree Collapse file tree 5 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " miniflare " : patch
3+ " wrangler " : patch
4+ ---
5+
6+ Removes unnecessary calls to "node: os "
Original file line number Diff line number Diff line change 11import assert from "assert" ;
22import { readFileSync } from "fs" ;
33import fs from "fs/promises" ;
4- import { platform } from "node:os" ;
54import path from "path" ;
65import { Readable } from "stream" ;
76import tls from "tls" ;
@@ -1085,7 +1084,7 @@ function getContainerEngine(
10851084 if ( ! engineOrSocketPath ) {
10861085 // TODO: workerd does not support win named pipes
10871086 engineOrSocketPath =
1088- platform ( ) === "win32"
1087+ process . platform === "win32"
10891088 ? "//./pipe/docker_engine"
10901089 : "unix:///var/run/docker.sock" ;
10911090 }
Original file line number Diff line number Diff line change 11import { readFileSync } from "fs" ;
2- import os from "node:os" ;
32import { fileURLToPath , URL } from "node:url" ;
43import path from "path" ;
54import open from "open" ;
@@ -265,7 +264,7 @@ export const openInspector = async (
265264
266265 // see: https://github.com/sindresorhus/open/issues/177#issue-610016699
267266 let braveBrowser : string ;
268- switch ( os . platform ( ) ) {
267+ switch ( process . platform ) {
269268 case "darwin" :
270269 case "win32" :
271270 braveBrowser = "Brave" ;
Original file line number Diff line number Diff line change 11import assert from "node:assert" ;
2- import os from "node:os" ;
32import { resolve } from "node:path" ;
43import { setTimeout } from "node:timers/promises" ;
54import { checkMacOSVersion , setLogLevel } from "@cloudflare/cli" ;
@@ -1722,7 +1721,7 @@ export async function main(argv: string[]): Promise<void> {
17221721 // https://github.com/vadimdemedes/ink/blob/546fe16541fd05ad4e638d6842ca4cbe88b4092b/src/components/App.tsx#L138-L148
17231722 mayReport = false ;
17241723
1725- const currentPlatform = os . platform ( ) ;
1724+ const currentPlatform = process . platform ;
17261725
17271726 const thisTerminalIsUnsupported =
17281727 "This terminal doesn't support raw mode." ;
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ export function getWranglerVersion() {
66}
77// used by "new" metrics
88export function getPlatform ( ) {
9- const platform = os . platform ( ) ;
9+ const platform = process . platform ;
1010
1111 switch ( platform ) {
1212 case "win32" :
You can’t perform that action at this time.
0 commit comments