Skip to content

Commit

Permalink
Removing unused type annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
jculvey committed Aug 23, 2023
1 parent 7fbc8c0 commit c77a2ab
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 20 deletions.
6 changes: 0 additions & 6 deletions packages/wrangler/src/api/pages/deploy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,6 @@ export async function deploy({
// Routing configuration displayed in the Functions tab of a deployment in Dash
let filepathRoutingConfig: string | undefined;

const d1Databases = Object.keys(
project.deployment_configs[isProduction ? "production" : "preview"]
.d1_databases ?? {}
);

if (!_workerJS && existsSync(functionsDirectory)) {
const outputConfigPath = join(
tmpdir(),
Expand All @@ -179,7 +174,6 @@ export async function deploy({
buildOutputDirectory: directory,
routesOutputPath,
local: false,
d1Databases,
nodejsCompat,
});

Expand Down
1 change: 0 additions & 1 deletion packages/wrangler/src/dev/dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ function DevSession(props: DevSessionProps) {
useCustomBuild(props.entry, props.build);

const directory = useTmpDir();
useErrorHandler();

const workerDefinitions = useDevRegistry(
props.name,
Expand Down
12 changes: 0 additions & 12 deletions packages/wrangler/src/pages/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,20 +186,9 @@ export const Handler = async (args: PagesBuildArgs) => {
buildOutputDirectory,
nodejsCompat,
legacyNodeCompat,
bindings,
workerScriptPath,
} = validatedArgs;

let d1Databases: string[] | undefined = undefined;
if (bindings) {
try {
const decodedBindings = JSON.parse(bindings);
d1Databases = Object.keys(decodedBindings?.d1_databases || {});
} catch {
throw new FatalError("Could not parse a valid set of 'bindings'.", 1);
}
}

/**
* prioritize building `_worker.js` over Pages Functions, if both exist
* and if we were able to resolve _worker.js
Expand Down Expand Up @@ -250,7 +239,6 @@ export const Handler = async (args: PagesBuildArgs) => {
nodejsCompat,
routesOutputPath,
local: false,
d1Databases,
});
} catch (e) {
if (e instanceof FunctionsNoRoutesError) {
Expand Down
1 change: 0 additions & 1 deletion packages/wrangler/src/pages/buildFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export async function buildFunctions({
onEnd?: () => void;
routesOutputPath?: PagesBuildArgs["outputRoutesPath"];
local: boolean;
d1Databases?: string[];
legacyNodeCompat?: boolean;
nodejsCompat?: boolean;
}) {
Expand Down

0 comments on commit c77a2ab

Please sign in to comment.