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.7
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.8
Choose a head ref
  • 5 commits
  • 22 files changed
  • 5 contributors

Commits on Apr 4, 2022

  1. update

    PabloSzx committed Apr 4, 2022
    Copy the full SHA
    ee099eb View commit details
  2. Update actions/cache action to v3 (#282)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Apr 4, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    76d5c5b View commit details
  3. Version Packages (#287)

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

    Verified

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

Commits on Apr 5, 2022

  1. Copy the full SHA
    cbe654d View commit details
  2. Version Packages (#288)

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

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ccb925f View commit details
2 changes: 1 addition & 1 deletion .github/workflows/canary.yaml
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Cache pnpm modules
uses: actions/cache@v2
uses: actions/cache@v3
env:
cache-name: cache-pnpm-modules
with:
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ jobs:
node-version: 14.x

- name: Cache pnpm modules
uses: actions/cache@v2
uses: actions/cache@v3
env:
cache-name: cache-pnpm-modules
with:
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ jobs:
node-version: ${{ matrix.node_version }}

- name: Cache pnpm modules
uses: actions/cache@v2
uses: actions/cache@v3
env:
cache-name: cache-pnpm-modules
with:
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
workspace-concurrency=Infinity
stream=true
prefer-workspace-packages=true
strict-peer-dependencies=false
11 changes: 8 additions & 3 deletions examples/basic/package.json
Original file line number Diff line number Diff line change
@@ -35,12 +35,17 @@
"test": "bob-tsm --cjs --paths src/index.ts && bob-tsm --paths src/index.ts"
},
"dependencies": {
"bob-esbuild": "workspace:^3.2.5",
"bob-esbuild": "workspace:^3.2.6",
"bob-esbuild-cli": "workspace:^3.0.2",
"bob-ts": "workspace:^3.1.1",
"bob-tsm": "workspace:^0.4.7",
"bob-ts": "workspace:^3.1.2",
"bob-tsm": "workspace:^0.4.8",
"shared": "workspace:^1.0.0"
},
"devDependencies": {
"@types/node": "^17.0.23",
"esbuild": "^0.14.31",
"typescript": "^4.6.3"
},
"publishConfig": {
"directory": "lib"
},
1 change: 0 additions & 1 deletion examples/nextjs-custom-server/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
15 changes: 8 additions & 7 deletions examples/nextjs-custom-server/package.json
Original file line number Diff line number Diff line change
@@ -9,16 +9,17 @@
"start": "cross-env NODE_ENV=production bob-tsm src/server.ts"
},
"dependencies": {
"bob-tsm": "workspace:^0.4.7",
"next": "^12.1.0",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"bob-tsm": "workspace:^0.4.8",
"next": "^12.1.4",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"devDependencies": {
"@types/node": "^17.0.21",
"@types/react": "^17.0.40",
"@types/node": "^17.0.23",
"@types/react": "^17.0.43",
"cross-env": "^7.0.3",
"typescript": "^4.6.2"
"esbuild": "^0.14.31",
"typescript": "^4.6.3"
},
"dependenciesMeta": {
"bob-tsm": {
6 changes: 5 additions & 1 deletion examples/shared/package.json
Original file line number Diff line number Diff line change
@@ -26,9 +26,13 @@
"prepare": "bob-esbuild build"
},
"dependencies": {
"bob-esbuild": "workspace:^3.2.5",
"bob-esbuild": "workspace:^3.2.6",
"bob-esbuild-cli": "workspace:^3.0.2"
},
"devDependencies": {
"esbuild": "^0.14.31",
"typescript": "^4.6.3"
},
"dependenciesMeta": {
"bob-esbuild-cli": {
"injected": true
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.5",
"@changesets/assemble-release-plan": "^5.1.1",
"@changesets/cli": "^2.21.1",
"@changesets/config": "^1.7.0",
"@changesets/read": "^0.5.4",
"@changesets/apply-release-plan": "^6.0.0",
"@changesets/assemble-release-plan": "^5.1.2",
"@changesets/cli": "^2.22.0",
"@changesets/config": "^2.0.0",
"@changesets/read": "^0.5.5",
"@manypkg/get-packages": "^1.1.3",
"@types/node": "^17.0.21",
"@types/node": "^17.0.23",
"changesets-github-release": "^0.1.0",
"esbuild": "^0.14.27",
"esbuild": "^0.14.31",
"husky": "^7.0.4",
"prettier": "^2.5.1",
"prettier": "^2.6.2",
"pretty-quick": "^3.1.3",
"rimraf": "^3.0.2",
"semver": "^7.3.5",
"tsm": "^2.2.1",
"typescript": "^4.6.2"
"typescript": "^4.6.3"
},
"engines": {
"pnpm": ">=6.7.1"
4 changes: 2 additions & 2 deletions packages/bob-cli/package.json
Original file line number Diff line number Diff line change
@@ -36,12 +36,12 @@
"postpublish": "gh-release"
},
"dependencies": {
"commander": "^9.0.0"
"commander": "^9.1.0"
},
"devDependencies": {
"bob-esbuild": "workspace:^3.2.5",
"changesets-github-release": "^0.1.0",
"typescript": "^4.6.2"
"typescript": "^4.6.3"
},
"engines": {
"node": ">=12.0.0"
8 changes: 8 additions & 0 deletions packages/bob-ts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# bob-ts

## 3.1.2

### Patch Changes

- ee099eb: Set "typescript" and "@types/node" as optional peer dependency
- Updated dependencies [ee099eb]
- bob-esbuild-plugin@3.1.5

## 3.1.1

### Patch Changes
20 changes: 14 additions & 6 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.1.1",
"version": "3.1.2",
"homepage": "https://github.com/PabloSzx/bob-esbuild",
"bugs": "https://github.com/PabloSzx/bob-esbuild/issues",
"repository": {
@@ -36,29 +36,37 @@
"postpublish": "gh-release"
},
"dependencies": {
"bob-esbuild-plugin": "workspace:^3.1.4",
"bob-esbuild-plugin": "workspace:^3.1.5",
"rollup": "^2.70.1"
},
"devDependencies": {
"@rollup/plugin-json": "^4.1.0",
"@types/node": "^17.0.21",
"@types/node": "^17.0.23",
"bob-esbuild-cli": "workspace:^3.0.2",
"changesets-github-release": "^0.1.0",
"commander": "^9.0.0",
"esbuild": "^0.14.27",
"commander": "^9.1.0",
"esbuild": "^0.14.31",
"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.6.2"
"typescript": "^4.6.3"
},
"peerDependencies": {
"@types/node": "*",
"esbuild": ">=0.14.13",
"typescript": "*"
},
"peerDependenciesMeta": {
"@types/node": {
"optional": true
},
"typescript": {
"optional": true
}
},
"engines": {
"node": "^12.20.0 || >=14.13.0"
},
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.8

### Patch Changes

- cbe654d: New option "--no-sourcemap" to disable sourcemaps

## 0.4.7

### Patch Changes
8 changes: 4 additions & 4 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.7",
"version": "0.4.8",
"homepage": "https://github.com/PabloSzx/bob-esbuild",
"bugs": "https://github.com/PabloSzx/bob-esbuild/issues",
"repository": {
@@ -44,11 +44,11 @@
"bob-esbuild-plugin": "workspace:^3.1.4",
"c8": "^7.11.0",
"chokidar": "^3.5.3",
"commander": "^9.0.0",
"esbuild": "^0.14.27",
"commander": "^9.1.0",
"esbuild": "^0.14.31",
"execa": "^6.1.0",
"tree-kill": "^1.2.2",
"typescript": "^4.6.2",
"typescript": "^4.6.3",
"typescript-paths": "^1.3.1"
},
"peerDependencies": {
13 changes: 11 additions & 2 deletions packages/bob-tsm/src/bin.ts
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@ program
.option('--tsmconfig <config>', 'Configuration file path', 'tsm.js')
.option('--watch <patterns...>', 'Enable & specify watch mode')
.option('--ignore <patterns...>', 'Ignore watch patterns')
.option('--no-sourcemap', "Don't generate/enable source maps")
.option('--keep-esm-loader', 'Keep ESM Loader for forks (It can break certain environments like Next.js custom server)')
.addOption(
new Option(
@@ -46,18 +47,22 @@ program
quiet?: boolean;
paths?: boolean;
keepEsmLoader?: boolean;
sourcemap?: boolean;
}>();

const { watch, ignore, cjs, node_env, quiet, tsmconfig, paths, keepEsmLoader } = options;
const { watch, ignore, cjs, node_env, quiet, tsmconfig, paths, keepEsmLoader, sourcemap } = options;

const binDirname = dirname(fileURLToPath(import.meta.url));

const spawnArgs = [
'--require=' + join(binDirname, 'require.js'),
'--loader=' + pathToFileURL(join(binDirname, 'loader.mjs')).href,
'--enable-source-maps',
];

if (sourcemap) {
spawnArgs.push('--enable-source-maps');
}

if (tsmconfig && existsSync(tsmconfig)) {
spawnArgs.push('--tsmconfig', tsmconfig);
}
@@ -76,6 +81,10 @@ program
Object.assign((spawnEnv ||= { ...process.env }), { FORCE_CJS: '1' });
}

if (!sourcemap) {
Object.assign((spawnEnv ||= { ...process.env }), { DISABLE_SOURCEMAP: '1' });
}

if (node_env) {
const NODE_ENV = node_env === 'prod' ? 'production' : node_env === 'dev' ? 'development' : node_env;
Object.assign((spawnEnv ||= { ...process.env }), {
2 changes: 1 addition & 1 deletion packages/bob-tsm/src/utils.ts
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ export const defaults = function (format: Format): Defaults {
options: {
format,
charset: 'utf8',
sourcemap: 'inline',
sourcemap: process.env.DISABLE_SOURCEMAP ? false : 'inline',
target: 'node' + process.versions.node,
logLevel: isQuiet ? 'silent' : 'warning',
color: enabled,
8 changes: 4 additions & 4 deletions packages/bob-watch/package.json
Original file line number Diff line number Diff line change
@@ -39,11 +39,11 @@
"postpublish": "gh-release"
},
"devDependencies": {
"bob-esbuild": "workspace:^3.2.4",
"bob-esbuild-cli": "workspace:^3.0.1",
"bob-tsm": "workspace:^0.4.6",
"bob-esbuild": "workspace:^3.2.5",
"bob-esbuild-cli": "workspace:^3.0.2",
"bob-tsm": "workspace:^0.4.7",
"chokidar": "^3.5.3",
"commander": "^9.0.0",
"commander": "^9.1.0",
"execa": "^6.1.0",
"tree-kill": "^1.2.2"
},
8 changes: 8 additions & 0 deletions packages/bob/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# bob-esbuild

## 3.2.6

### Patch Changes

- ee099eb: Update dependencies
- Updated dependencies [ee099eb]
- bob-esbuild-plugin@3.1.5

## 3.2.5

### Patch Changes
16 changes: 8 additions & 8 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.5",
"version": "3.2.6",
"repository": {
"type": "git",
"url": "https://github.com/PabloSzx/bob-esbuild",
@@ -31,23 +31,23 @@
"postpublish": "gh-release"
},
"dependencies": {
"@pnpm/types": "^7.10.0",
"bob-esbuild-plugin": "workspace:3.1.4",
"@pnpm/types": "^8.0.0",
"bob-esbuild-plugin": "workspace:3.1.5",
"rollup": "^2.70.1"
},
"devDependencies": {
"@pnpm/exportable-manifest": "^2.3.2",
"@pnpm/exportable-manifest": "^3.0.0",
"@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.21",
"@types/node": "^17.0.23",
"builtin-modules": "^3.2.0",
"chalk": "^5.0.1",
"changesets-github-release": "^0.1.0",
"cosmiconfig": "^7.0.1",
"date-fns": "^2.28.0",
"esbuild": "^0.14.27",
"esbuild": "^0.14.31",
"execa": "^6.1.0",
"fast-glob": "^3.2.11",
"folder-hash": "^4.0.2",
@@ -58,8 +58,8 @@
"rollup-plugin-node-externals": "^3.1.2",
"rollup-plugin-tsconfig-paths": "^1.1.6",
"tree-kill": "^1.2.2",
"tsconfck": "^1.2.0",
"typescript": "^4.6.2"
"tsconfck": "^1.2.2",
"typescript": "^4.6.3"
},
"peerDependencies": {
"esbuild": ">=0.14.13",
6 changes: 6 additions & 0 deletions packages/esbuild-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# bob-esbuild-plugin

## 3.1.5

### Patch Changes

- ee099eb: Update dependencies

## 3.1.4

### Patch Changes
Loading