Skip to content

Commit

Permalink
Merge pull request #473 from mrmlnc/remove_bundling
Browse files Browse the repository at this point in the history
Remove bundle stage
  • Loading branch information
mrmlnc authored Jan 3, 2025
2 parents 7f28b15 + d533841 commit 0f90824
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 37 deletions.
5 changes: 0 additions & 5 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ npm run test:e2e
# Watch changes
npm run watch

# Build bundle
npm run bundle
npm t
npm run test:e2e

# Run benchmark
npm run bench:async
npm run bench:sync
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ jobs:
node-version: 22
- name: Install dependencies
run: npm install
- name: Prepare bundle
run: npm run bundle
- name: Build
run: node --run build
- name: Benchmark (async)
run: npm run bench:product:async
run: node --run bench:product:async
- name: Benchmark (stream)
run: npm run bench:product:stream
run: node --run bench:product:stream
- name: Benchmark (sync)
run: npm run bench:product:sync
run: node --run bench:product:sync

regress:
name: Regress benchmark with options (${{ matrix.benchmark_options }})
Expand All @@ -55,14 +55,14 @@ jobs:
node-version: 22
- name: Install dependencies
run: npm install
- name: Prepare bundle
run: npm run bundle
- name: Build
run: node --run build
- name: Benchmark (async)
run: npm run bench:regression:async
run: node --run bench:regression:async
- name: Benchmark (stream)
run: npm run bench:regression:stream
run: node --run bench:regression:stream
- name: Benchmark (sync)
run: npm run bench:regression:sync
run: node --run bench:regression:sync

overhead:
name: Overhead benchmark
Expand All @@ -79,11 +79,11 @@ jobs:
node-version: 22
- name: Install dependencies
run: npm install
- name: Prepare bundle
run: npm run bundle
- name: Build
run: node --run build
- name: Benchmark (async)
run: npm run bench:overhead:async
run: node --run bench:overhead:async
- name: Benchmark (stream)
run: npm run bench:overhead:stream
run: node --run bench:overhead:stream
- name: Benchmark (sync)
run: npm run bench:overhead:sync
run: node --run bench:overhead:sync
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:
run: npm install
- name: Run Hygiene Checks
run: npm run lint
- name: Prepare bundle
run: npm run bundle
- name: Compile
run: npm run compile
- name: Run unit tests
run: npm run test
- name: Run e2e tests (sync)
Expand Down
23 changes: 8 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
"engines": {
"node": ">=18.18.0"
},
"main": "build/index.js",
"typings": "build/index.d.ts",
"main": "out/index.js",
"typings": "out/index.d.ts",
"files": [
"build",
"!build/{benchmark,tests}",
"!build/**/*.map",
"!build/**/*.spec.*"
"out",
"!out/{benchmark,tests}",
"!out/**/*.map",
"!out/**/*.spec.*"
],
"keywords": [
"glob",
Expand All @@ -35,7 +35,6 @@
"@types/picomatch": "^3.0.1",
"@types/sinon": "^17.0.3",
"bencho": "^0.1.1",
"esbuild": "^0.24.0",
"eslint": "9.14.0",
"eslint-config-mrmlnc": "^5.0.0",
"execa": "^7.2.0",
Expand All @@ -57,7 +56,7 @@
"micromatch": "^4.0.8"
},
"scripts": {
"clean": "rimraf out build",
"clean": "rimraf out",
"lint": "eslint \"src/**/*.ts\" --cache",
"compile": "tsc",
"test": "mocha \"out/**/*.spec.js\" -s 0",
Expand All @@ -68,12 +67,6 @@
"_build:compile": "npm run clean && npm run compile",
"build": "npm run _build:compile && npm run lint && npm test",
"watch": "npm run _build:compile -- -- --sourceMap --watch",
"_bundle:dts": "tsc --emitDeclarationOnly --outDir ./build",
"_bundle:ts": "esbuild --bundle ./src/index.ts --outfile=./build/index.js --platform=node --target=node18.18 --format=cjs",
"_bundle:build": "npm run _bundle:dts && npm run _bundle:ts",
"_bundle:test:replace": "cp ./build/index.js ./out",
"_bundle:test": "npm run _bundle:test:replace",
"bundle": "npm run _build:compile && npm run _bundle:build && npm run _bundle:test",
"bench:async": "npm run bench:product:async && npm run bench:regression:async",
"bench:stream": "npm run bench:product:stream && npm run bench:regression:stream",
"bench:sync": "npm run bench:product:sync && npm run bench:regression:sync",
Expand All @@ -89,6 +82,6 @@
"bench:overhead:async": "hereby bench:overhead:async",
"bench:overhead:sync": "hereby bench:overhead:sync",
"bench:overhead:stream": "hereby bench:overhead:stream",
"prepublishOnly": "npm run bundle"
"prepublishOnly": "npm run build"
}
}

0 comments on commit 0f90824

Please sign in to comment.