Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ USER node
EXPOSE 3000

# Start the application
CMD ["node", "dist/index.js"]
CMD ["node", "dist/index.mjs"]
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"version": "1.5.0",
"description": "Mock Http - Easy way to mock http with httpbin replacement",
"type": "module",
"main": "dist/index.js",
"main": "dist/index.mjs",
"types": "dist/index.d.mts",
"directories": {
"test": "test"
},
Expand All @@ -12,7 +13,8 @@
"test": "pnpm lint && vitest run --coverage",
"test:ci": "biome check --error-on-warnings && vitest run --coverage",
"dev": "pnpm lint && tsx src/index.ts --watch",
"build": "rimraf ./dist && tsup src/index.ts --format esm --dts --clean",
"build": "tsdown src/index.ts --format esm --dts",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The build script no longer cleans the dist directory before building. This can lead to stale build artifacts being present in the output, which might cause unexpected behavior. It's a good practice to ensure a clean build environment by removing the output directory before each build.

Suggested change
"build": "tsdown src/index.ts --format esm --dts",
"build": "rimraf ./dist && tsdown src/index.ts --format esm --dts",

"clean": "rimraf ./node_modules ./dist ./coverage DOCKER.md",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The clean script removes node_modules, which is quite aggressive for a standard clean task and forces a full dependency re-installation. This can slow down the development workflow. Typically, a clean script is for removing build artifacts and temporary files.

Consider renaming this to clean:all or deep-clean and having a more standard clean script that only removes build artifacts like dist, coverage, and generated files.

"docker:build": "docker build -t jaredwray/mockhttp .",
"docker:run": "docker run -p 3000:3000 jaredwray/mockhttp",
"docker:push": "docker push jaredwray/mockhttp",
Expand All @@ -21,7 +23,7 @@
"docker:compose:up": "docker-compose up -d",
"docker:compose:down": "docker-compose down",
"prepublishOnly": "pnpm run build",
"start": "node dist/index.js"
"start": "node dist/index.mjs"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -56,9 +58,9 @@
"@types/html-escaper": "^3.0.4",
"@vitest/coverage-v8": "^4.1.4",
"rimraf": "^6.1.3",
"tsup": "^8.5.1",
"tsdown": "^0.18.4",
"tsx": "^4.21.0",
"typescript": "^5.9.3",
"typescript": "6.0.2",
"vitest": "^4.1.4"
},
"dependencies": {
Expand Down
Loading
Loading