-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update esbuild dependencies for bundling (#94)
* Update es build bundler deps * Update deps.ts * update dependency * Update deps.ts * Update dependencies * Remove deps.ts * Allow read access to system when building * Update src/mod.ts Co-authored-by: Fil Maj <[email protected]> * Add allow-sys to start hook --------- Co-authored-by: Fil Maj <[email protected]>
- Loading branch information
1 parent
29c0527
commit 5b31223
Showing
13 changed files
with
44 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
import { | ||
ensureDir, | ||
getProtocolInterface, | ||
parseCLIArguments, | ||
path, | ||
} from "./deps.ts"; | ||
import type { Protocol } from "./deps.ts"; | ||
import * as path from "jsr:@std/path@^1.0.3"; | ||
import { parseArgs } from "jsr:@std/cli@^1.0.4"; | ||
import { ensureDir } from "jsr:@std/fs@^1.0.2"; | ||
import { getProtocolInterface } from "https://deno.land/x/[email protected]/mod.ts"; | ||
import type { Protocol } from "https://deno.land/x/[email protected]/types.ts"; | ||
|
||
import { cleanManifest, getManifest } from "./get_manifest.ts"; | ||
import { validateManifestFunctions } from "./utilities.ts"; | ||
import { DenoBundler, EsbuildBundler } from "./bundler/mods.ts"; | ||
|
@@ -127,7 +126,7 @@ if (import.meta.main) { | |
const protocol = getProtocolInterface(Deno.args); | ||
|
||
// Massage source and output directories | ||
let { source, output } = parseCLIArguments(Deno.args); | ||
let { source, output } = parseArgs(Deno.args); | ||
if (!output) output = "dist"; | ||
const outputDirectory = path.isAbsolute(output) | ||
? output | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import { denoPlugins, esbuild } from "../deps.ts"; | ||
import * as esbuild from "npm:[email protected]"; | ||
import { denoPlugins } from "jsr:@luca/[email protected]"; | ||
|
||
type EsbuildBundleOptions = { | ||
/** The path to the file being bundled */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import type { JsonValue } from "jsr:@std/jsonc@^1.0.1"; | ||
import { getProtocolInterface } from "https://deno.land/x/[email protected]/mod.ts"; | ||
|
||
import { | ||
DENO_SLACK_API, | ||
DENO_SLACK_HOOKS, | ||
DENO_SLACK_SDK, | ||
} from "./libraries.ts"; | ||
import { getProtocolInterface, JSONValue } from "./deps.ts"; | ||
import { getJSON, isNewSemverRelease } from "./utilities.ts"; | ||
|
||
const IMPORT_MAP_SDKS = [DENO_SLACK_SDK, DENO_SLACK_API]; | ||
|
@@ -197,7 +199,7 @@ export async function getDenoImportMapFiles( | |
* value pairs that make use of the dependencies. | ||
*/ | ||
export function extractDependencies( | ||
json: JSONValue, | ||
json: JsonValue, | ||
key: string, | ||
): [string, string][] { | ||
// Determine if the JSON passed is an object | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
import { getProtocolInterface, Protocol } from "./deps.ts"; | ||
import { getProtocolInterface } from "https://deno.land/x/[email protected]/mod.ts"; | ||
import type { Protocol } from "https://deno.land/x/[email protected]/types.ts"; | ||
|
||
import { isNewSemverRelease } from "./utilities.ts"; | ||
|
||
type RuntimeVersion = { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
import { deepMerge, getProtocolInterface, path } from "./deps.ts"; | ||
import { getProtocolInterface } from "https://deno.land/x/[email protected]/mod.ts"; | ||
import * as path from "jsr:@std/path@^1.0.3"; | ||
import { deepMerge } from "jsr:@std/collections@^1.0.5"; | ||
|
||
import { getDefaultExport, validateManifestFunctions } from "./utilities.ts"; | ||
|
||
// Responsible for taking a working directory, and an output directory | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
import { getProtocolInterface, parseCLIArguments, path } from "./deps.ts"; | ||
import { getProtocolInterface } from "https://deno.land/x/[email protected]/mod.ts"; | ||
import * as path from "jsr:@std/path@^1.0.3"; | ||
import { parseArgs } from "jsr:@std/cli@^1.0.4"; | ||
|
||
import { getDefaultExport } from "./utilities.ts"; | ||
|
||
export const getTrigger = async (args: string[]) => { | ||
const source = parseCLIArguments(args).source as string; | ||
const source = parseArgs(args).source as string; | ||
|
||
if (!source) throw new Error("A source path needs to be defined"); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import { getProtocolInterface } from "https://deno.land/x/[email protected]/mod.ts"; | ||
import type { JsonValue } from "jsr:@std/jsonc@^1.0.1"; | ||
|
||
import { | ||
checkForSDKUpdates, | ||
gatherDependencyFiles, | ||
Release, | ||
} from "./check_update.ts"; | ||
import { getJSON } from "./utilities.ts"; | ||
import { projectScripts } from "./mod.ts"; | ||
import { getProtocolInterface, JSONValue } from "./deps.ts"; | ||
|
||
export const SDK_NAME = "the Slack SDK"; | ||
|
||
|
@@ -114,6 +116,10 @@ export async function updateDependencyFile( | |
|
||
const dependencyKey = dependencyJSON.imports ? "imports" : "hooks"; | ||
|
||
if (dependencyJSON[dependencyKey] === undefined) { | ||
return []; | ||
} | ||
|
||
// Update only the dependency-related key in given file ("imports" or "hooks") | ||
const { updatedDependencies, updateSummary } = updateDependencyMap( | ||
dependencyJSON[dependencyKey], | ||
|
@@ -142,7 +148,7 @@ export async function updateDependencyFile( | |
* an updated map of all dependencies, as well as an update summary of each. | ||
*/ | ||
export function updateDependencyMap( | ||
dependencyMap: JSONValue, | ||
dependencyMap: JsonValue, | ||
releases: Release[], | ||
) { | ||
const mapIsObject = dependencyMap && typeof dependencyMap === "object" && | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters