Skip to content

Commit

Permalink
Update all (#372)
Browse files Browse the repository at this point in the history
* Update all

* gh

* 20.5.1

* rollback unrelated

* rollback test

* previous bun version

* no windows for now

* 20.5.1
  • Loading branch information
PabloSzx authored Jan 2, 2024
1 parent 510d126 commit f55b2d0
Show file tree
Hide file tree
Showing 26 changed files with 1,533 additions and 1,306 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ jobs:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup Node.js 16.x
uses: actions/setup-node@master
- name: Setup Node.js 20.5.1
uses: actions/setup-node@v2
with:
node-version: 16.x
node-version: 20.5.1

- uses: oven-sh/setup-bun@v1

- name: Setup NPM credentials
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ jobs:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup Node.js 16.x
uses: actions/setup-node@master
- name: Setup Node.js 20.5.1
uses: actions/setup-node@v2
with:
node-version: 16.x
node-version: 20.5.1

- uses: oven-sh/setup-bun@v1

- name: Cache pnpm modules
uses: actions/cache@v3
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ jobs:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
node_version: [16, 18]
os: [ubuntu-latest, macOS-latest]
node_version: [18, 20.5.1]
steps:
- name: Checkout Repo
uses: actions/checkout@master
Expand All @@ -21,6 +21,8 @@ jobs:
with:
node-version: ${{ matrix.node_version }}

- uses: oven-sh/setup-bun@v1

- name: Cache pnpm modules
uses: actions/cache@v3
env:
Expand Down
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

pnpm pretty-quick --staged
pnpx lint-staged
6 changes: 3 additions & 3 deletions examples/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
"shared": "workspace:^1.0.0"
},
"devDependencies": {
"@types/node": "^18.7.9",
"esbuild": "^0.17.18",
"typescript": "^5.0.4"
"@types/node": "^20.10.6",
"esbuild": "^0.19.11",
"typescript": "^5.3.3"
},
"publishConfig": {
"directory": "lib",
Expand Down
10 changes: 5 additions & 5 deletions examples/nextjs-custom-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
},
"dependencies": {
"bob-tsm": "workspace:^1.1.2",
"next": "^12.3.4",
"next": "^14.0.4",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/node": "^18.7.9",
"@types/react": "^18.0.17",
"@types/node": "^20.10.6",
"@types/react": "^18.2.46",
"cross-env": "^7.0.3",
"esbuild": "^0.17.18",
"typescript": "^5.0.4"
"esbuild": "^0.19.11",
"typescript": "^5.3.3"
},
"dependenciesMeta": {
"bob-tsm": {
Expand Down
4 changes: 2 additions & 2 deletions examples/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"bob-esbuild-cli": "workspace:^4.0.0"
},
"devDependencies": {
"esbuild": "^0.17.18",
"typescript": "^5.0.4"
"esbuild": "^0.19.11",
"typescript": "^5.3.3"
},
"dependenciesMeta": {
"bob-esbuild-cli": {
Expand Down
31 changes: 17 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@
"types": "pnpm --filter bob-esbuild build:types"
},
"devDependencies": {
"@changesets/apply-release-plan": "^6.0.4",
"@changesets/assemble-release-plan": "^5.2.1",
"@changesets/cli": "^2.24.3",
"@changesets/config": "^2.1.1",
"@changesets/read": "^0.5.7",
"@manypkg/get-packages": "^1.1.3",
"@types/node": "^18.7.9",
"@changesets/apply-release-plan": "^7.0.0",
"@changesets/assemble-release-plan": "^6.0.0",
"@changesets/cli": "^2.27.1",
"@changesets/config": "^3.0.0",
"@changesets/read": "^0.6.0",
"@manypkg/get-packages": "^2.2.0",
"@types/node": "^20.10.6",
"changesets-github-release": "^0.1.0",
"esbuild": "^0.17.18",
"husky": "^8.0.1",
"prettier": "^2.7.1",
"esbuild": "^0.19.11",
"husky": "^8.0.3",
"prettier": "^3.1.1",
"pretty-quick": "^3.1.3",
"rimraf": "^3.0.2",
"semver": "^7.3.7",
"tsm": "^2.2.2",
"typescript": "^5.0.4"
"rimraf": "^5.0.5",
"semver": "^7.5.4",
"tsx": "^4.7.0",
"typescript": "^5.3.3"
},
"engines": {
"pnpm": ">=8.4.0"
Expand All @@ -50,5 +50,8 @@
"overrides": {
"ramda": "0.27.2"
}
},
"lint-staged": {
"*.{js,css,md}": "prettier --write"
}
}
6 changes: 3 additions & 3 deletions packages/bob-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@
],
"scripts": {
"dev": "node bin/run.mjs watch",
"prepare": "node -r tsm self-build.ts",
"prepare": "bun self-build.ts",
"postpublish": "gh-release"
},
"dependencies": {
"commander": "^9.4.0"
"commander": "^11.1.0"
},
"devDependencies": {
"bob-esbuild": "workspace:^4.0.3",
"changesets-github-release": "^0.1.0",
"typescript": "^5.0.4"
"typescript": "^5.3.3"
},
"peerDependencies": {
"bob-esbuild": "workspace:^4.0.0"
Expand Down
20 changes: 10 additions & 10 deletions packages/bob-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,27 @@
"/lib"
],
"scripts": {
"prepare": "node -r tsm self-build.ts",
"prepare": "bun self-build.ts",
"postpublish": "gh-release"
},
"dependencies": {
"bob-esbuild-plugin": "workspace:^4.0.0",
"rollup": "^2.78.1"
"rollup": "^4.9.2"
},
"devDependencies": {
"@rollup/plugin-json": "^4.1.0",
"@types/node": "^18.7.9",
"@rollup/plugin-json": "^6.1.0",
"@types/node": "^20.10.6",
"bob-esbuild-cli": "workspace:^4.0.0",
"changesets-github-release": "^0.1.0",
"commander": "^9.4.0",
"esbuild": "^0.17.18",
"commander": "^11.1.0",
"esbuild": "^0.19.11",
"execa": "^6.1.0",
"globby": "^13.1.2",
"globby": "^14.0.0",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-node-externals": "^4.1.1",
"rollup-plugin-tsconfig-paths": "^1.3.0",
"rollup-plugin-node-externals": "^6.1.2",
"rollup-plugin-tsconfig-paths": "^1.5.2",
"tree-kill": "^1.2.2",
"typescript": "^5.0.4"
"typescript": "^5.3.3"
},
"peerDependencies": {
"@types/node": "*",
Expand Down
7 changes: 3 additions & 4 deletions packages/bob-ts/src/rollupConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,10 @@ export const getRollupConfig = async ({
)
).filter(file => !!file.match(/\.(js|cjs|mjs|ts|tsx|cts|mts|ctsx|mtsx)$/));

const customPluginsAwaited = (await customPlugins) || [];

const plugins: InputOptions['plugins'] = [
...(customPlugins || []),
...Array.from(Array.isArray(customPluginsAwaited) ? customPluginsAwaited : [customPluginsAwaited]),
externals({
packagePath: resolve(process.cwd(), 'package.json'),
deps: true,
Expand Down Expand Up @@ -348,7 +350,6 @@ export const getRollupConfig = async ({
preserveModules: true,
exports: 'auto',
sourcemap,
preferConst: true,
...rollup,
},
{
Expand All @@ -358,7 +359,6 @@ export const getRollupConfig = async ({
preserveModules: true,
exports: 'auto',
sourcemap,
preferConst: true,
...rollup,
},
]
Expand All @@ -370,7 +370,6 @@ export const getRollupConfig = async ({
preserveModules: true,
exports: 'auto',
sourcemap,
preferConst: true,
...rollup,
},
];
Expand Down
11 changes: 11 additions & 0 deletions packages/bob-tsm/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ async function main() {
minify: false,
},
}),
buildCode({
entryPoints: ['./src/register.ts'],
clean: false,
format: 'cjs',
outDir: 'lib',
target: 'node18',
sourcemap: false,
esbuild: {
minify: false,
},
}),
buildCode({
entryPoints: ['./src/loader.ts'],
clean: false,
Expand Down
18 changes: 9 additions & 9 deletions packages/bob-tsm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,21 @@
"scripts": {
"dev": "node ../bob-watch/bin/bob-watch.mjs --watch=src -c \"pnpm i\"",
"playground": "node ../bob-watch/bin/bob-watch.mjs --watch src playground -c \"pnpm prepare && node bin/bob-tsm.mjs playground/index.ts\"",
"prepare": "node -r tsm build.ts",
"prepare": "bun build.ts",
"postpublish": "gh-release",
"test": "node -r tsm build.ts && c8 node -r tsm ./test/test.cjs"
"test": "bun build.ts && c8 bun ./test/test.cjs"
},
"devDependencies": {
"@types/semver": "^7.3.12",
"@types/semver": "^7.5.6",
"bob-esbuild-plugin": "workspace:^4.0.0",
"c8": "^7.12.0",
"c8": "^8.0.1",
"chokidar": "^3.5.3",
"commander": "^9.4.0",
"esbuild": "^0.17.18",
"commander": "^11.1.0",
"esbuild": "^0.19.11",
"execa": "^6.1.0",
"tree-kill": "^1.2.2",
"typescript": "^5.0.4",
"typescript-paths": "^1.4.0"
"typescript": "^5.3.3",
"typescript-paths": "^1.5.1"
},
"peerDependencies": {
"esbuild": ">=0.14.39",
Expand All @@ -61,7 +61,7 @@
}
},
"optionalDependencies": {
"fsevents": "~2.3.2"
"fsevents": "~2.3.3"
},
"engines": {
"node": ">=14.13.1"
Expand Down
4 changes: 4 additions & 0 deletions packages/bob-tsm/src/register.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { register } from 'node:module';
import { pathToFileURL } from 'node:url';

register('./loader.mjs', pathToFileURL(__filename));
4 changes: 2 additions & 2 deletions packages/bob-watch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@
"bob-esbuild-cli": "workspace:^4.0.0",
"bob-tsm": "workspace:^1.1.0",
"chokidar": "^3.5.3",
"commander": "^9.4.0",
"commander": "^11.1.0",
"execa": "^6.1.0",
"tree-kill": "^1.2.2"
},
"optionalDependencies": {
"fsevents": "~2.3.2"
"fsevents": "~2.3.3"
},
"publishConfig": {
"access": "public",
Expand Down
44 changes: 22 additions & 22 deletions packages/bob/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,41 +25,41 @@
"lib"
],
"scripts": {
"build:types": "node -r tsm build-types.ts",
"dev": "node -r tsm self-watch.ts",
"prepare": "node -r tsm self-build.ts",
"build:types": "bun build-types.ts",
"dev": "bun self-watch.ts",
"prepare": "bun self-build.ts",
"postpublish": "gh-release"
},
"dependencies": {
"@pnpm/types": "^8.5.0",
"@pnpm/types": "^9.4.2",
"bob-esbuild-plugin": "workspace:4.0.0",
"rollup": "^2.78.1"
"rollup": "^4.9.2"
},
"devDependencies": {
"@pnpm/exportable-manifest": "^3.1.2",
"@rollup/plugin-json": "^4.1.0",
"@types/folder-hash": "^4.0.2",
"@types/fs-extra": "^9.0.13",
"@types/lodash.get": "^4.4.7",
"@types/node": "^18.7.9",
"@pnpm/exportable-manifest": "^5.0.11",
"@rollup/plugin-json": "^6.1.0",
"@types/folder-hash": "^4.0.4",
"@types/fs-extra": "^11.0.4",
"@types/lodash.get": "^4.4.9",
"@types/node": "^20.10.6",
"builtin-modules": "^3.3.0",
"chalk": "^5.0.1",
"chalk": "^5.3.0",
"changesets-github-release": "^0.1.0",
"cosmiconfig": "^7.0.1",
"date-fns": "^2.29.2",
"esbuild": "^0.17.18",
"date-fns": "^3.0.6",
"esbuild": "^0.19.11",
"execa": "^6.1.0",
"fast-glob": "^3.2.11",
"folder-hash": "^4.0.2",
"fs-extra": "^10.1.0",
"globby": "^13.1.2",
"fast-glob": "^3.3.2",
"folder-hash": "^4.0.4",
"fs-extra": "^11.2.0",
"globby": "^14.0.0",
"lodash.get": "^4.4.2",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-node-externals": "^4.1.1",
"rollup-plugin-tsconfig-paths": "^1.3.0",
"rollup-plugin-node-externals": "^6.1.2",
"rollup-plugin-tsconfig-paths": "^1.5.2",
"tree-kill": "^1.2.2",
"tsconfck": "^2.0.1",
"typescript": "^5.0.4"
"tsconfck": "^3.0.0",
"typescript": "^5.3.3"
},
"peerDependencies": {
"esbuild": ">=0.14.39",
Expand Down
2 changes: 1 addition & 1 deletion packages/bob/src/config/packageBuildConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface PackageBuildConfig {
}

export async function GetPackageBuildConfig(cwd: string = process.cwd()): Promise<PackageBuildConfig> {
const pkg: PackageJSON = await readJSON(resolve(cwd, 'package.json'));
const pkg: PackageJSON = (await readJSON(resolve(cwd, 'package.json'))) as PackageJSON;

if (!pkg.name) throw Error('Invalid "name" field for package.json in ' + cwd);

Expand Down
Loading

0 comments on commit f55b2d0

Please sign in to comment.