Repository navigation
Commit c7c56d8
chore(core): bump detect-port from ^1.5.1 to ^2.1.0 (#35533)
## Current Behavior
`@nx/web`, `@nx/js`, and `@nx/cypress` declare `detect-port: ^1.5.1`.
Per the bulk-dependency-update sweep (NXC-4329), this is due for a major
bump. The queue task initially flagged this as ESM-only — that was stale
info; v2 is actually dual-published.
## Expected Behavior
Bumped to `detect-port@^2.1.0`.
## Validation
`detect-port@2.1.0` ships both ESM and CJS builds via the package.json
exports map:
```jsonc
{
"type": "module",
"main": "./dist/commonjs/index.js",
"exports": {
".": {
"import": { "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.js" },
"require": { "types": "./dist/commonjs/index.d.ts", "default": "./dist/commonjs/index.js" }
}
},
"engines": { "node": ">= 16.0.0" }
}
```
The three call sites in this repo:
```ts
// packages/web/src/executors/file-server/file-server.impl.ts
const detectPort = require('detect-port'); // CJS path
// packages/js/src/executors/verdaccio/verdaccio.impl.ts
import detectPort from 'detect-port'; // compiles to require → CJS
// packages/cypress/src/utils/start-dev-server.ts
import detectPort from 'detect-port'; // compiles to require → CJS
```
All three resolve to `./dist/commonjs/index.js` — no code changes
needed. The default-export function shape (`detect(port, callback?) →
Promise<number>`) is unchanged across v1 → v2.
`pnpm nx run-many -t build -p web,js,cypress` — passes.
## Related Issue(s)
Part of [NXC-4329](https://linear.app/nxdev/issue/NXC-4329)
bulk-dependency-update sweep.
---------
Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com>
Co-authored-by: FrozenPandaz <FrozenPandaz@users.noreply.github.com>1 parent d64c172 commit c7c56d8
6 files changed
Lines changed: 28 additions & 13 deletions
File tree
- packages
- cypress
- js
- web
- src/executors/file-server
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments