-
-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: upgrade parcel-bundler to align with latest (#307)
* Upgrade parcel-bundler to the latest experimental * Bump canary * fix: add package command to index * Try out sync config * Remove template submod * Fix up tag issue * Update devs * bump canary
- Loading branch information
Showing
32 changed files
with
1,822 additions
and
710 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,10 +6,6 @@ | |
path = packages/puro | ||
url = [email protected]:PlasmoHQ/puro.git | ||
branch = main | ||
[submodule "templates/qtt"] | ||
path = templates/qtt | ||
url = [email protected]:PlasmoHQ/qtt.git | ||
branch = main | ||
[submodule "packages/gcp-refresh-token"] | ||
path = packages/gcp-refresh-token | ||
url = [email protected]:PlasmoHQ/gcp-refresh-token.git | ||
|
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
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
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
9 changes: 4 additions & 5 deletions
9
cli/plasmo/src/features/extension-devtools/get-bundle-config.ts
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
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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export function canMerge(a, b) { | ||
// Bundles can be merged if they have the same type and environment, | ||
// unless they are explicitly marked as isolated or inline. | ||
return ( | ||
a.type === b.type && | ||
a.env.context === b.env.context && | ||
a.bundleBehavior == null && | ||
b.bundleBehavior == null | ||
) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import type { Asset, BundleBehavior, Environment, Target } from "@parcel/types" | ||
import nullthrows from "nullthrows" | ||
|
||
import type { Bundle } from "./types" | ||
|
||
export function createBundle(opts: { | ||
uniqueKey?: string | ||
target: Target | ||
asset?: Asset | ||
env?: Environment | ||
type?: string | ||
needsStableName?: boolean | ||
bundleBehavior?: BundleBehavior | null | undefined | ||
}): Bundle { | ||
if (opts.asset == null) { | ||
return { | ||
uniqueKey: opts.uniqueKey, | ||
assets: new Set(), | ||
internalizedAssetIds: [], | ||
mainEntryAsset: null, | ||
size: 0, | ||
sourceBundles: new Set(), | ||
target: opts.target, | ||
type: nullthrows(opts.type), | ||
env: nullthrows(opts.env), | ||
needsStableName: Boolean(opts.needsStableName), | ||
bundleBehavior: opts.bundleBehavior | ||
} | ||
} | ||
|
||
let asset = nullthrows(opts.asset) | ||
return { | ||
uniqueKey: opts.uniqueKey, | ||
assets: new Set([asset]), | ||
internalizedAssetIds: [], | ||
mainEntryAsset: asset, | ||
size: asset.stats.size, | ||
sourceBundles: new Set(), | ||
target: opts.target, | ||
type: opts.type ?? asset.type, | ||
env: opts.env ?? asset.env, | ||
needsStableName: Boolean(opts.needsStableName), | ||
bundleBehavior: opts.bundleBehavior ?? asset.bundleBehavior | ||
} | ||
} |
Oops, something went wrong.