Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: PabloSzx/bob-esbuild
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: bob-tsm@0.4.6
Choose a base ref
...
head repository: PabloSzx/bob-esbuild
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: bob-tsm@0.4.7
Choose a head ref
  • 9 commits
  • 18 files changed
  • 3 contributors

Commits on Feb 3, 2022

  1. Copy the full SHA
    edbb808 View commit details
  2. update

    PabloSzx committed Feb 3, 2022
    Copy the full SHA
    5d2289b View commit details
  3. Version Packages (#261)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    github-actions[bot] and github-actions[bot] authored Feb 3, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    91d69dc View commit details

Commits on Feb 16, 2022

  1. Copy the full SHA
    eedd60d View commit details
  2. update

    PabloSzx committed Feb 16, 2022
    Copy the full SHA
    f51418b View commit details
  3. Version Packages (#267)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    github-actions[bot] and github-actions[bot] authored Feb 16, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    36bfc79 View commit details

Commits on Mar 15, 2022

  1. bump

    PabloSzx committed Mar 15, 2022
    Copy the full SHA
    4889dc1 View commit details
  2. Copy the full SHA
    47053d3 View commit details
  3. Version Packages (#275)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    github-actions[bot] and github-actions[bot] authored Mar 15, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    cbe5ddf View commit details
8 changes: 4 additions & 4 deletions examples/basic/package.json
Original file line number Diff line number Diff line change
@@ -35,10 +35,10 @@
"test": "bob-tsm --cjs --paths src/index.ts && bob-tsm --paths src/index.ts"
},
"dependencies": {
"bob-esbuild": "workspace:^3.2.3",
"bob-esbuild-cli": "workspace:^3.0.1",
"bob-ts": "workspace:^3.0.1",
"bob-tsm": "workspace:^0.4.6",
"bob-esbuild": "workspace:^3.2.5",
"bob-esbuild-cli": "workspace:^3.0.2",
"bob-ts": "workspace:^3.1.1",
"bob-tsm": "workspace:^0.4.7",
"shared": "workspace:^1.0.0"
},
"publishConfig": {
10 changes: 5 additions & 5 deletions examples/nextjs-custom-server/package.json
Original file line number Diff line number Diff line change
@@ -9,16 +9,16 @@
"start": "cross-env NODE_ENV=production bob-tsm src/server.ts"
},
"dependencies": {
"bob-tsm": "workspace:^0.4.6",
"next": "^12.0.8",
"bob-tsm": "workspace:^0.4.7",
"next": "^12.1.0",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@types/node": "^17.0.10",
"@types/react": "^17.0.38",
"@types/node": "^17.0.21",
"@types/react": "^17.0.40",
"cross-env": "^7.0.3",
"typescript": "^4.5.5"
"typescript": "^4.6.2"
},
"dependenciesMeta": {
"bob-tsm": {
4 changes: 2 additions & 2 deletions examples/shared/package.json
Original file line number Diff line number Diff line change
@@ -26,8 +26,8 @@
"prepare": "bob-esbuild build"
},
"dependencies": {
"bob-esbuild": "workspace:^3.2.3",
"bob-esbuild-cli": "workspace:^3.0.1"
"bob-esbuild": "workspace:^3.2.5",
"bob-esbuild-cli": "workspace:^3.0.2"
},
"dependenciesMeta": {
"bob-esbuild-cli": {
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -21,22 +21,22 @@
"types": "pnpm --filter bob-esbuild build:types"
},
"devDependencies": {
"@changesets/apply-release-plan": "^5.0.3",
"@changesets/assemble-release-plan": "^5.0.4",
"@changesets/cli": "^2.19.0",
"@changesets/config": "^1.6.3",
"@changesets/read": "^0.5.2",
"@changesets/apply-release-plan": "^5.0.5",
"@changesets/assemble-release-plan": "^5.1.1",
"@changesets/cli": "^2.21.1",
"@changesets/config": "^1.7.0",
"@changesets/read": "^0.5.4",
"@manypkg/get-packages": "^1.1.3",
"@types/node": "^17.0.10",
"changesets-github-release": "^0.0.4",
"esbuild": "^0.14.13",
"@types/node": "^17.0.21",
"changesets-github-release": "^0.1.0",
"esbuild": "^0.14.27",
"husky": "^7.0.4",
"prettier": "^2.5.1",
"pretty-quick": "^3.1.3",
"rimraf": "^3.0.2",
"semver": "^7.3.5",
"tsm": "^2.2.1",
"typescript": "^4.5.5"
"typescript": "^4.6.2"
},
"engines": {
"pnpm": ">=6.7.1"
8 changes: 8 additions & 0 deletions packages/bob-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# bob-esbuild-cli

## 3.0.2

### Patch Changes

- 4889dc1: Bump
- Updated dependencies [4889dc1]
- bob-esbuild@3.2.5

## 3.0.1

### Patch Changes
12 changes: 6 additions & 6 deletions packages/bob-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bob-esbuild-cli",
"version": "3.0.1",
"version": "3.0.2",
"homepage": "https://github.com/PabloSzx/bob-esbuild",
"bugs": "https://github.com/PabloSzx/bob-esbuild/issues",
"repository": {
@@ -36,17 +36,17 @@
"postpublish": "gh-release"
},
"dependencies": {
"commander": "^8.3.0"
"commander": "^9.0.0"
},
"devDependencies": {
"bob-esbuild": "workspace:^3.2.3",
"changesets-github-release": "^0.0.4",
"typescript": "^4.5.5"
"bob-esbuild": "workspace:^3.2.5",
"changesets-github-release": "^0.1.0",
"typescript": "^4.6.2"
},
"engines": {
"node": ">=12.0.0"
},
"peerDependencies": {
"bob-esbuild": "workspace:^3.1.1"
"bob-esbuild": "workspace:^3.2.5"
}
}
23 changes: 23 additions & 0 deletions packages/bob-ts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# bob-ts

## 3.1.1

### Patch Changes

- 4889dc1: Bump
- Updated dependencies [4889dc1]
- bob-esbuild-plugin@3.1.4

## 3.1.0

### Minor Changes

- eedd60d: New options for programmatic usage:

- "plugins": Allow specifying custom rollup plugins
- "inputOptions": Customize specific input options

## 3.0.2

### Patch Changes

- 5d2289b: Update bundled globby version to v13.1.1

## 3.0.1

### Patch Changes
22 changes: 11 additions & 11 deletions packages/bob-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bob-ts",
"version": "3.0.1",
"version": "3.1.1",
"homepage": "https://github.com/PabloSzx/bob-esbuild",
"bugs": "https://github.com/PabloSzx/bob-esbuild/issues",
"repository": {
@@ -36,23 +36,23 @@
"postpublish": "gh-release"
},
"dependencies": {
"bob-esbuild-plugin": "workspace:^3.1.3",
"rollup": "^2.66.0"
"bob-esbuild-plugin": "workspace:^3.1.4",
"rollup": "^2.70.1"
},
"devDependencies": {
"@rollup/plugin-json": "^4.1.0",
"@types/node": "^17.0.10",
"bob-esbuild-cli": "workspace:^3.0.1",
"changesets-github-release": "^0.0.4",
"commander": "^8.3.0",
"esbuild": "^0.14.13",
"execa": "^6.0.0",
"globby": "^12.2.0",
"@types/node": "^17.0.21",
"bob-esbuild-cli": "workspace:^3.0.2",
"changesets-github-release": "^0.1.0",
"commander": "^9.0.0",
"esbuild": "^0.14.27",
"execa": "^6.1.0",
"globby": "^13.1.1",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-node-externals": "^3.1.2",
"rollup-plugin-tsconfig-paths": "^1.1.6",
"tree-kill": "^1.2.2",
"typescript": "^4.5.5"
"typescript": "^4.6.2"
},
"peerDependencies": {
"@types/node": "*",
6 changes: 6 additions & 0 deletions packages/bob-ts/src/rollupConfig.ts
Original file line number Diff line number Diff line change
@@ -44,6 +44,8 @@ export interface RollupConfig {
* @default true
*/
keepDynamicImport?: boolean | string[] | ((moduleName: string) => boolean);
plugins?: InputOptions['plugins'];
inputOptions?: Omit<InputOptions, 'plugins' | 'external' | 'input'>;
}

export const getRollupConfig = async ({
@@ -58,6 +60,8 @@ export const getRollupConfig = async ({
paths,
external,
keepDynamicImport = true,
inputOptions: customInputOptions,
plugins: customPlugins,
}: RollupConfig) => {
const dir = resolve(outDir);

@@ -72,6 +76,7 @@ export const getRollupConfig = async ({
).filter(file => !!file.match(/\.(js|cjs|mjs|ts|tsx|cts|mts|ctsx|mtsx)$/));

const plugins: InputOptions['plugins'] = [
...(customPlugins || []),
externals({
packagePath: resolve(process.cwd(), 'package.json'),
deps: true,
@@ -143,6 +148,7 @@ export const getRollupConfig = async ({
}

const inputOptions: InputOptions = {
...customInputOptions,
input,
plugins,
external,
6 changes: 6 additions & 0 deletions packages/bob-tsm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# bob-tsm

## 0.4.7

### Patch Changes

- 4889dc1: Bump

## 0.4.6

### Patch Changes
12 changes: 6 additions & 6 deletions packages/bob-tsm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bob-tsm",
"version": "0.4.6",
"version": "0.4.7",
"homepage": "https://github.com/PabloSzx/bob-esbuild",
"bugs": "https://github.com/PabloSzx/bob-esbuild/issues",
"repository": {
@@ -41,14 +41,14 @@
},
"devDependencies": {
"@types/semver": "^7.3.9",
"bob-esbuild-plugin": "workspace:^3.1.3",
"bob-esbuild-plugin": "workspace:^3.1.4",
"c8": "^7.11.0",
"chokidar": "^3.5.3",
"commander": "^8.3.0",
"esbuild": "^0.14.13",
"execa": "^6.0.0",
"commander": "^9.0.0",
"esbuild": "^0.14.27",
"execa": "^6.1.0",
"tree-kill": "^1.2.2",
"typescript": "^4.5.5",
"typescript": "^4.6.2",
"typescript-paths": "^1.3.1"
},
"peerDependencies": {
8 changes: 4 additions & 4 deletions packages/bob-watch/package.json
Original file line number Diff line number Diff line change
@@ -39,12 +39,12 @@
"postpublish": "gh-release"
},
"devDependencies": {
"bob-esbuild": "workspace:^3.2.3",
"bob-esbuild": "workspace:^3.2.4",
"bob-esbuild-cli": "workspace:^3.0.1",
"bob-tsm": "workspace:^0.4.5",
"bob-tsm": "workspace:^0.4.6",
"chokidar": "^3.5.3",
"commander": "^8.3.0",
"execa": "^6.0.0",
"commander": "^9.0.0",
"execa": "^6.1.0",
"tree-kill": "^1.2.2"
},
"optionalDependencies": {
15 changes: 15 additions & 0 deletions packages/bob/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# bob-esbuild

## 3.2.5

### Patch Changes

- 4889dc1: Bump
- Updated dependencies [4889dc1]
- bob-esbuild-plugin@3.1.4

## 3.2.4

### Patch Changes

- edbb808: fix package.json rewrite & "type":"module" usage
- 5d2289b: Update bundled globby version to v13.1.1

## 3.2.3

### Patch Changes
30 changes: 15 additions & 15 deletions packages/bob/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bob-esbuild",
"version": "3.2.3",
"version": "3.2.5",
"repository": {
"type": "git",
"url": "https://github.com/PabloSzx/bob-esbuild",
@@ -31,35 +31,35 @@
"postpublish": "gh-release"
},
"dependencies": {
"@pnpm/types": "^7.9.0",
"bob-esbuild-plugin": "workspace:3.1.3",
"rollup": "^2.66.0"
"@pnpm/types": "^7.10.0",
"bob-esbuild-plugin": "workspace:3.1.4",
"rollup": "^2.70.1"
},
"devDependencies": {
"@pnpm/exportable-manifest": "^2.2.4",
"@pnpm/exportable-manifest": "^2.3.2",
"@rollup/plugin-json": "^4.1.0",
"@types/folder-hash": "^4.0.1",
"@types/fs-extra": "^9.0.13",
"@types/lodash.get": "^4.4.6",
"@types/node": "^17.0.10",
"@types/node": "^17.0.21",
"builtin-modules": "^3.2.0",
"chalk": "^5.0.0",
"changesets-github-release": "^0.0.4",
"chalk": "^5.0.1",
"changesets-github-release": "^0.1.0",
"cosmiconfig": "^7.0.1",
"date-fns": "^2.28.0",
"esbuild": "^0.14.13",
"execa": "^6.0.0",
"esbuild": "^0.14.27",
"execa": "^6.1.0",
"fast-glob": "^3.2.11",
"folder-hash": "^4.0.1",
"fs-extra": "^10.0.0",
"globby": "^12.2.0",
"folder-hash": "^4.0.2",
"fs-extra": "^10.0.1",
"globby": "^13.1.1",
"lodash.get": "^4.4.2",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-node-externals": "^3.1.2",
"rollup-plugin-tsconfig-paths": "^1.1.6",
"tree-kill": "^1.2.2",
"tsconfck": "^1.1.1",
"typescript": "^4.5.5"
"tsconfck": "^1.2.0",
"typescript": "^4.6.2"
},
"peerDependencies": {
"esbuild": ">=0.14.13",
13 changes: 12 additions & 1 deletion packages/bob/src/config/packageJson.ts
Original file line number Diff line number Diff line change
@@ -44,6 +44,7 @@ export function rewritePackageJson(pkg: PackageJSON, distDir: string, cwd: strin
'author',
'license',
'engines',
'type',
];

for (const field of fields) {
@@ -79,6 +80,12 @@ export function validatePackageJson(pkg: PackageJSON, distDir: string) {
function expect(key: string | string[], expected: string | undefined) {
const received = get(pkg, key);

if (expected === undefined) {
if (received === undefined) return;

throw Error(`"${key}" should NOT be specified in "${pkg.name}"`);
}

if (!received) throw Error(`"${key}" not specified in "${pkg.name}"`);

if (expected !== received) {
@@ -186,7 +193,11 @@ export const generatePackageJson = (options: GeneratePackageJsonOptions, config:

pending.push(
Promise.allSettled([
writePackageJson(manualRewrite ? { ...options, packageJson: await manualRewrite(options.packageJson) } : options),
writePackageJson(
manualRewrite
? { ...options, packageJson: await manualRewrite(options.packageJson), rewritePackage: manualRewrite }
: options
),
]).then(v => v[0])
);
},
Loading