media-proxy-pass refactor#568
Conversation
|
mikeybinns
left a comment
There was a problem hiding this comment.
Only a couple minor points I missed previously, everything else looks good.
| import { getSmashConfig, getStagingUrl } from "@atomicsmash/smash-config"; | ||
|
|
||
| const PROXY_MARKER = "location @uploadsproxy"; | ||
| const isWindows = type() === "Darwin"; |
There was a problem hiding this comment.
isWindows here is actually isMacOS because Darwin is MacOS. I know this isn't something you wrote but we may as well fix it while we're here.
| }); | ||
|
|
||
| export async function getSmashConfig(): Promise<Required<SmashConfig> | null> { | ||
| export default async function getSmashConfig(): Promise<Required<SmashConfig> | null> { |
There was a problem hiding this comment.
Prefer named import/exports for better interoperability with tooling. Usually (e.g. within projects) it wouldn't matter, but because this is a npm library it does.
| @@ -0,0 +1,8 @@ | |||
| import type { SmashConfig } from "../index.js"; | |||
|
|
|||
| export default function getStagingUrl(config: SmashConfig): string { | |||
There was a problem hiding this comment.
Prefer named import/exports, see above
| export { default as getStagingUrl } from "./utils/getStagingUrl.js"; | ||
| export { default as getSmashConfig } from "./utils/getSmashConfig.js"; |
There was a problem hiding this comment.
Prefer named import/exports, see above
#531 Refactor
--skip-columns=guidas not needed with proxy passDiff with less annoying whitespace changes