Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade Parcel #813

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion api/messaging/package.json
Original file line number Diff line number Diff line change
@@ -126,7 +126,6 @@
"@types/chrome": "0.0.304",
"@types/node": "22.13.4",
"@types/react": "19.0.10",
"canvas": "3.1.0",
"cross-env": "7.0.3",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
2 changes: 1 addition & 1 deletion api/persistent/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@plasmohq/persistent",
"version": "0.0.6",
"version": "0.1.0",
"description": "A couple of hacks to keep the BGSW alive in a library",
"type": "module",
"module": "./src/index.ts",
2 changes: 1 addition & 1 deletion api/selector/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@plasmohq/selector",
"version": "0.0.7",
"version": "0.1.0",
"description": "Powerful Selector API with Dedicated Monitoring Supports",
"type": "module",
"module": "./dist/index.js",
10 changes: 6 additions & 4 deletions cli/plasmo/package.json
Original file line number Diff line number Diff line change
@@ -39,10 +39,11 @@
],
"dependencies": {
"@expo/spawn-async": "1.7.2",
"@parcel/core": "2.9.3",
"@parcel/fs": "2.9.3",
"@parcel/package-manager": "2.9.3",
"@parcel/watcher": "2.2.0",
"@parcel/core": "catalog:",
"@parcel/fs": "catalog:",
"@parcel/package-manager": "catalog:",
"@parcel/rust": "catalog:",
"@parcel/watcher": "catalog:",
"@plasmohq/init": "workspace:*",
"@plasmohq/parcel-config": "workspace:*",
"@plasmohq/parcel-core": "workspace:*",
@@ -70,6 +71,7 @@
"typescript": "5.7.3"
},
"devDependencies": {
"@parcel/types": "catalog:",
"@plasmo/config": "workspace:*",
"@plasmo/constants": "workspace:*",
"@plasmo/framework-shared": "workspace:*",
16 changes: 9 additions & 7 deletions cli/plasmo/src/features/helpers/create-parcel-bundler.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
import { dirname, join, resolve } from "path"
import { Parcel } from "@parcel/core"
import ParcelFS from "@parcel/fs"
import ParcelPM from "@parcel/package-manager"
import type { InitialParcelOptions } from "@parcel/types"
import { emptyDir, ensureDir, exists, readJson, writeJson } from "fs-extra"

import { getFlag, hasFlag } from "@plasmo/utils/flags"
import { wLog } from "@plasmo/utils/logging"

import { Parcel, type ParcelOptions } from "@plasmohq/parcel-core"

import { setInternalEnv } from "~features/env/env-config"
import type { PlasmoManifest } from "~features/manifest-factory/base"

import { getPackageManager } from "./package-manager"
import { setInternalEnv } from "~features/env/env-config"





const PackageInstallerMap = {
npm: ParcelPM.Npm,
@@ -21,7 +25,7 @@ const PackageInstallerMap = {

export const createParcelBuilder = async (
{ commonPath, bundleConfig, publicEnv }: PlasmoManifest,
{ defaultTargetOptions = {}, ...options }: ParcelOptions
{ defaultTargetOptions = {}, ...options }: InitialParcelOptions
) => {
const isProd = options.mode === "production"

@@ -107,7 +111,7 @@ export const createParcelBuilder = async (

setInternalEnv(bundleConfig)

const bundler = new Parcel({
return new Parcel({
inputFS,
packageManager,
entries: commonPath.entryManifestPath,
@@ -127,6 +131,4 @@ export const createParcelBuilder = async (

...options
})

return bundler
}
16 changes: 8 additions & 8 deletions core/parcel-bundler/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@plasmohq/parcel-bundler",
"version": "0.5.6",
"version": "0.7.0",
"license": "MIT",
"repository": {
"type": "git",
@@ -18,16 +18,16 @@
"parcel": ">= 2.7.0"
},
"dependencies": {
"@parcel/core": "2.9.3",
"@parcel/diagnostic": "2.9.3",
"@parcel/graph": "2.9.3",
"@parcel/hash": "2.9.3",
"@parcel/plugin": "2.9.3",
"@parcel/utils": "2.9.3",
"@parcel/bundler-default": "catalog:",
"@parcel/core": "catalog:",
"@parcel/diagnostic": "catalog:",
"@parcel/graph": "catalog:",
"@parcel/plugin": "catalog:",
"@parcel/utils": "catalog:",
"nullthrows": "1.1.1"
},
"devDependencies": {
"@parcel/types": "2.9.3",
"@parcel/types": "catalog:",
"@plasmo/config": "workspace:*",
"@plasmo/utils": "workspace:*",
"tsup": "8.3.6"
110 changes: 0 additions & 110 deletions core/parcel-bundler/src/bit-set.ts

This file was deleted.

10 changes: 0 additions & 10 deletions core/parcel-bundler/src/can-merge.ts

This file was deleted.

45 changes: 0 additions & 45 deletions core/parcel-bundler/src/create-bundle.ts

This file was deleted.

Loading