fix(deps): update dependency screeps-api to v2 #102

Open
Renovate wants to merge 2 commits from renovate/screeps-api-2.x into main
Member

This PR contains the following updates:

Package Change Age Confidence
screeps-api ^1.7.2 → ^2.0.0 age confidence

Release Notes

screepers/node-screeps-api (screeps-api)

v2.1.0

Compare Source

What's Changed

Full Changelog: https://github.com/screepers/node-screeps-api/compare/v2.0.1...v2.1.0

v2.0.1

Compare Source

This is a re-release of v2.0.0 that fixes a packaging issue. Original release notes follow:


Please see the v2 Migration Guide for tips and examples for migrating from v1.x.

Breaking Changes

General:

  • Bumped minimum supported Node.js version to v22 (target version is v24)
    • Earlier versions may still work, but they are not explicitly supported
  • Updated package to ESM format, which breaks compatibility with CJS projects

HTTP API:

  • Renamed ScreepsAPI class to ScreepsHttpClient
  • ScreepsHttpClient.fromConfig() parameters have been changed
    • Server name is now required; it no longer defaults to 'main' to prevent accidental usage of the 'main' server
    • See docblock for other changes
  • Flattened the endpoint method structure on ScreepsHttpClient:
    • Almost every endpoint method has been renamed; see v2 Migration Guide for details
  • Added name: string parameter to ScreepsHttpClient.changeFlagColor()
  • Added _id: string parameter to ScreepsHttpClient.gameAddObjectIntent()
  • Removed encoded parameter from ScreepsHttpClient.gameRoomTerrain()
    • To get unencoded results, use ScreepsHttpClient.gameRoomTerrainUnencoded()
  • Refactored ScreepsHttpClient.userCodeSet() request params into an object so they could share types with ScreepsHttpClient.userCodeGet() responses
  • Endpoints that require a shard argument will now throw an error if the argument is not defined and if ScreepsClientConfig.defaultShard is not defined
    • 'shard0' is no longer used as a default to prevent accidental operations on the wrong shard
  • ScreepsHttpClient now only fires the rateLimit event when a rate limit is exceeded.
  • experimentalRetry429 option:
    • Renamed this option to retry429Global
    • It is now specified as a ScreepsClientConfig option instead of being part of the server config
    • This option is now enabled by default

WebSocket API:

  • connect() no longer accepts ScreepsSocketConfig options
    • These events are loaded/set in appConfig like they are for the HTTP client (see related change in "New Features")
  • resubscribe() no longer subscribes to events that were fully unsubscribed before disconnecting
  • subscribe() no longer registers duplicate instances of the same callback to the same events
    • Legacy behavior can be triggered by passing true for new force param
  • ScreepsHttpClient.setServer() now triggers disconnect()
  • authed, connected, and reconnecting properties now have private setters
  • ws and http properties are now protected

CLI:

  • Changed error-handling behavior:
    • Help is now printed after usage errors (ex: invalid raw command)
    • Non-zero exit status is now returned on all errors
  • Changed memory output format:
    • Nothing is emitted if the Memory path does not exist
    • JSON output is serialized before being emitted to stdout to allow the full contents to be inspected

New Features and Improvements

General:

HTTP API:

  • ScreepsHttpClient now authenticates automatically as needed
  • Added ScreepsHttpClient.userCpuShards endpoint
  • Added ScreepsHttpClient.seasonsCurrent endpoint
  • Added ScreepsHttpClient.userActivatePtr endpoint
  • Added support for automatic retries on HTTP 429 errors due to endpoint-specific rate limits

WebSocket API:

  • ScreepsSocketClient now authenticates automatically as needed
  • Added event-specific subscribe___()/unsubscribe____() methods:
    • These new variants of subscribe()/unsubscribe() automatically determine the eventSpec argument and enforce appropriate type constraints on callback arguments
    • These are equivalent to the endpoint methods on ScreepsHttpClient
  • ScreepsSocketClient options can now be loaded from config files

CLI:

  • Added memory --pretty option to pretty-print output to files or stdout

Fixes

WebSocket API:

  • Fixed ScreepsSocketClient async bug when trying to process gzipped data
  • Fixed bug that emitted queued messages as events instead of sending them

CLI:

  • Fixed async bug when trying to write memory to disk via memory -f <file>
  • Fixed ReferenceError when trying to write a single memory segment to disk via segment -d <dir> <segmentNumber>

Full Changelog: https://github.com/screepers/node-screeps-api/compare/8b6ad48b41526c47125807fb83ac279928e53e6e...v2.0

Please see the this package's npm versions page for releases between v1.0.0 and v2.0.0: https://www.npmjs.com/package/screeps-api?activeTab=versions

v2.0.0

Compare Source

Please see the v2 Migration Guide for tips and examples for migrating from v1.x.

Breaking Changes

General:

  • Bumped minimum supported Node.js version to v22 (target version is v24)
    • Earlier versions may still work, but they are not explicitly supported
  • Updated package to ESM format, which breaks compatibility with CJS projects

HTTP API:

  • Renamed ScreepsAPI class to ScreepsHttpClient
  • ScreepsHttpClient.fromConfig() parameters have been changed
    • Server name is now required; it no longer defaults to 'main' to prevent accidental usage of the 'main' server
    • See docblock for other changes
  • Flattened the endpoint method structure on ScreepsHttpClient:
    • Almost every endpoint method has been renamed; see v2 Migration Guide for details
  • Added name: string parameter to ScreepsHttpClient.changeFlagColor()
  • Added _id: string parameter to ScreepsHttpClient.gameAddObjectIntent()
  • Removed encoded parameter from ScreepsHttpClient.gameRoomTerrain()
    • To get unencoded results, use ScreepsHttpClient.gameRoomTerrainUnencoded()
  • Refactored ScreepsHttpClient.userCodeSet() request params into an object so they could share types with ScreepsHttpClient.userCodeGet() responses
  • Endpoints that require a shard argument will now throw an error if the argument is not defined and if ScreepsClientConfig.defaultShard is not defined
    • 'shard0' is no longer used as a default to prevent accidental operations on the wrong shard
  • ScreepsHttpClient now only fires the rateLimit event when a rate limit is exceeded.
  • experimentalRetry429 option:
    • Renamed this option to retry429Global
    • It is now specified as a ScreepsClientConfig option instead of being part of the server config
    • This option is now enabled by default

WebSocket API:

  • connect() no longer accepts ScreepsSocketConfig options
    • These events are loaded/set in appConfig like they are for the HTTP client (see related change in "New Features")
  • resubscribe() no longer subscribes to events that were fully unsubscribed before disconnecting
  • subscribe() no longer registers duplicate instances of the same callback to the same events
    • Legacy behavior can be triggered by passing true for new force param
  • ScreepsHttpClient.setServer() now triggers disconnect()
  • authed, connected, and reconnecting properties now have private setters
  • ws and http properties are now protected

CLI:

  • Changed error-handling behavior:
    • Help is now printed after usage errors (ex: invalid raw command)
    • Non-zero exit status is now returned on all errors
  • Changed memory output format:
    • Nothing is emitted if the Memory path does not exist
    • JSON output is serialized before being emitted to stdout to allow the full contents to be inspected

New Features and Improvements

General:

HTTP API:

  • ScreepsHttpClient now authenticates automatically as needed
  • Added ScreepsHttpClient.userCpuShards endpoint
  • Added ScreepsHttpClient.seasonsCurrent endpoint
  • Added ScreepsHttpClient.userActivatePtr endpoint
  • Added support for automatic retries on HTTP 429 errors due to endpoint-specific rate limits

WebSocket API:

  • ScreepsSocketClient now authenticates automatically as needed
  • Added event-specific subscribe___()/unsubscribe____() methods:
    • These new variants of subscribe()/unsubscribe() automatically determine the eventSpec argument and enforce appropriate type constraints on callback arguments
    • These are equivalent to the endpoint methods on ScreepsHttpClient
  • ScreepsSocketClient options can now be loaded from config files

CLI:

  • Added memory --pretty option to pretty-print output to files or stdout

Fixes

WebSocket API:

  • Fixed ScreepsSocketClient async bug when trying to process gzipped data
  • Fixed bug that emitted queued messages as events instead of sending them

CLI:

  • Fixed async bug when trying to write memory to disk via memory -f <file>
  • Fixed ReferenceError when trying to write a single memory segment to disk via segment -d <dir> <segmentNumber>

Full Changelog: https://github.com/screepers/node-screeps-api/compare/8b6ad48b41526c47125807fb83ac279928e53e6e...v2.0

Please see the this package's npm versions page for releases between v1.0.0 and v2.0.0: https://www.npmjs.com/package/screeps-api?activeTab=versions


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • "on monday,on friday"
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate CLI.

This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [screeps-api](https://github.com/screepers/node-screeps-api) | [`^1.7.2` → `^2.0.0`](https://renovatebot.com/diffs/npm/screeps-api/1.16.1/2.1.0) | ![age](https://developer.mend.io/api/mc/badges/age/npm/screeps-api/2.1.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/screeps-api/1.16.1/2.1.0?slim=true) | --- ### Release Notes <details> <summary>screepers/node-screeps-api (screeps-api)</summary> ### [`v2.1.0`](https://github.com/screepers/node-screeps-api/releases/tag/v2.1.0) [Compare Source](https://github.com/screepers/node-screeps-api/compare/v2.0.1...v2.1.0) #### What's Changed - docs: Update docs/examples for RoomEvent by [@&#8203;DocDvorak](https://github.com/DocDvorak) in [#&#8203;112](https://github.com/screepers/node-screeps-api/pull/112) - feat: Add `GET /api/seasons` endpoint method by [@&#8203;DocDvorak](https://github.com/DocDvorak) in [#&#8203;113](https://github.com/screepers/node-screeps-api/pull/113) - feat: Add search param to `ScreepsHttpClient.scoreboardList` by [@&#8203;DocDvorak](https://github.com/DocDvorak) in [#&#8203;114](https://github.com/screepers/node-screeps-api/pull/114) - docs: Update socket event docblocks by [@&#8203;DocDvorak](https://github.com/DocDvorak) in [#&#8203;116](https://github.com/screepers/node-screeps-api/pull/116) - docs: Update documentation for CLI call command by [@&#8203;DocDvorak](https://github.com/DocDvorak) in [#&#8203;117](https://github.com/screepers/node-screeps-api/pull/117) - chore: Bump version number to 2.1.0 by [@&#8203;DocDvorak](https://github.com/DocDvorak) in [#&#8203;118](https://github.com/screepers/node-screeps-api/pull/118) **Full Changelog**: <https://github.com/screepers/node-screeps-api/compare/v2.0.1...v2.1.0> ### [`v2.0.1`](https://github.com/screepers/node-screeps-api/releases/tag/v2.0.1) [Compare Source](https://github.com/screepers/node-screeps-api/compare/v2.0.0...v2.0.1) This is a re-release of [v2.0.0](https://github.com/screepers/node-screeps-api/releases/tag/v2.0.0) that fixes a packaging issue. Original release notes follow: *** Please see the [v2 Migration Guide](https://screepers.github.io/node-screeps-api/documents/v2_Migration_Guide.html) for tips and examples for migrating from v1.x. #### Breaking Changes General: - Bumped minimum supported Node.js version to v22 (target version is v24) - Earlier versions may still work, but they are not explicitly supported - Updated package to ESM format, which breaks compatibility with CJS projects HTTP API: - Renamed `ScreepsAPI` class to `ScreepsHttpClient` - `ScreepsHttpClient.fromConfig()` parameters have been changed - Server name is now required; it no longer defaults to `'main'` to prevent accidental usage of the `'main'` server - See docblock for other changes - Flattened the endpoint method structure on `ScreepsHttpClient`: - Almost every endpoint method has been renamed; see v2 Migration Guide for details - Added `name: string` parameter to `ScreepsHttpClient.changeFlagColor()` - Added `_id: string` parameter to `ScreepsHttpClient.gameAddObjectIntent()` - Removed `encoded` parameter from `ScreepsHttpClient.gameRoomTerrain()` - To get unencoded results, use `ScreepsHttpClient.gameRoomTerrainUnencoded()` - Refactored `ScreepsHttpClient.userCodeSet()` request params into an object so they could share types with `ScreepsHttpClient.userCodeGet()` responses - Endpoints that require a shard argument will now throw an error if the argument is not defined and if `ScreepsClientConfig.defaultShard` is not defined - `'shard0'` is no longer used as a default to prevent accidental operations on the wrong shard - `ScreepsHttpClient` now only fires the `rateLimit` event when a rate limit is exceeded. - `experimentalRetry429` option: - Renamed this option to `retry429Global` - It is now specified as a `ScreepsClientConfig` option instead of being part of the server config - This option is now enabled by default WebSocket API: - `connect()` no longer accepts `ScreepsSocketConfig` options - These events are loaded/set in `appConfig` like they are for the HTTP client (see related change in "New Features") - `resubscribe()` no longer subscribes to events that were fully unsubscribed before disconnecting - `subscribe()` no longer registers duplicate instances of the same callback to the same events - Legacy behavior can be triggered by passing `true` for new `force` param - `ScreepsHttpClient.setServer()` now triggers `disconnect()` - `authed`, `connected`, and `reconnecting` properties now have private setters - `ws` and `http` properties are now protected CLI: - Changed error-handling behavior: - Help is now printed after usage errors (ex: invalid raw command) - Non-zero exit status is now returned on all errors - Changed `memory` output format: - Nothing is emitted if the Memory path does not exist - JSON output is serialized before being emitted to stdout to allow the full contents to be inspected #### New Features and Improvements General: - Added detailed type definitions for most of the API: <https://screepers.github.io/node-screeps-api/modules.html> - Added support for `screeps.json` credential files: <https://screepers.github.io/node-screeps-api/documents/Configuration_and_Credential_Files.html> - Linux/\*BSD only: `ScreepsConfigManager` now checks for config files in the default `$XDG_CONFIG_HOME` directory if the env var is not defined - macOS only: `ScreepsConfigManager` now checks `$HOME/Library/Application Support` for config files. - Added `ScreepsClientConfig.defaultShard` option - Added `ScreepsHttpClient.debug()` method to enable/disable debug logging: <https://screepers.github.io/node-screeps-api/documents/Debugging.html#event-logging> HTTP API: - `ScreepsHttpClient` now authenticates automatically as needed - Added `ScreepsHttpClient.userCpuShards` endpoint - Added `ScreepsHttpClient.seasonsCurrent` endpoint - Added `ScreepsHttpClient.userActivatePtr` endpoint - Added support for automatic retries on HTTP 429 errors due to endpoint-specific rate limits - See [`ScreepsClientConfig`](https://screepers.github.io/node-screeps-api/interfaces/ScreepsClientConfig.html) options `retry429InitDelay`, `retry429MaxDelay`, and `retry429MaxRetries` WebSocket API: - `ScreepsSocketClient` now authenticates automatically as needed - Added event-specific `subscribe___()`/`unsubscribe____()` methods: - These new variants of `subscribe()`/`unsubscribe()` automatically determine the `eventSpec` argument and enforce appropriate type constraints on callback arguments - These are equivalent to the endpoint methods on `ScreepsHttpClient` - `ScreepsSocketClient` options can now be loaded from config files CLI: - Added `memory --pretty` option to pretty-print output to files or stdout #### Fixes WebSocket API: - Fixed `ScreepsSocketClient` async bug when trying to process gzipped data - Fixed bug that emitted queued messages as events instead of sending them CLI: - Fixed async bug when trying to write memory to disk via `memory -f <file>` - Fixed ReferenceError when trying to write a single memory segment to disk via `segment -d <dir> <segmentNumber>` **Full Changelog**: <https://github.com/screepers/node-screeps-api/compare/8b6ad48b41526c47125807fb83ac279928e53e6e...v2.0> Please see the this package's npm versions page for releases between v1.0.0 and v2.0.0: <https://www.npmjs.com/package/screeps-api?activeTab=versions> ### [`v2.0.0`](https://github.com/screepers/node-screeps-api/releases/tag/v2.0.0) [Compare Source](https://github.com/screepers/node-screeps-api/compare/8b6ad48b41526c47125807fb83ac279928e53e6e...v2.0.0) Please see the [v2 Migration Guide](https://screepers.github.io/node-screeps-api/documents/v2_Migration_Guide.html) for tips and examples for migrating from v1.x. #### Breaking Changes General: - Bumped minimum supported Node.js version to v22 (target version is v24) - Earlier versions may still work, but they are not explicitly supported - Updated package to ESM format, which breaks compatibility with CJS projects HTTP API: - Renamed `ScreepsAPI` class to `ScreepsHttpClient` - `ScreepsHttpClient.fromConfig()` parameters have been changed - Server name is now required; it no longer defaults to `'main'` to prevent accidental usage of the `'main'` server - See docblock for other changes - Flattened the endpoint method structure on `ScreepsHttpClient`: - Almost every endpoint method has been renamed; see v2 Migration Guide for details - Added `name: string` parameter to `ScreepsHttpClient.changeFlagColor()` - Added `_id: string` parameter to `ScreepsHttpClient.gameAddObjectIntent()` - Removed `encoded` parameter from `ScreepsHttpClient.gameRoomTerrain()` - To get unencoded results, use `ScreepsHttpClient.gameRoomTerrainUnencoded()` - Refactored `ScreepsHttpClient.userCodeSet()` request params into an object so they could share types with `ScreepsHttpClient.userCodeGet()` responses - Endpoints that require a shard argument will now throw an error if the argument is not defined and if `ScreepsClientConfig.defaultShard` is not defined - `'shard0'` is no longer used as a default to prevent accidental operations on the wrong shard - `ScreepsHttpClient` now only fires the `rateLimit` event when a rate limit is exceeded. - `experimentalRetry429` option: - Renamed this option to `retry429Global` - It is now specified as a `ScreepsClientConfig` option instead of being part of the server config - This option is now enabled by default WebSocket API: - `connect()` no longer accepts `ScreepsSocketConfig` options - These events are loaded/set in `appConfig` like they are for the HTTP client (see related change in "New Features") - `resubscribe()` no longer subscribes to events that were fully unsubscribed before disconnecting - `subscribe()` no longer registers duplicate instances of the same callback to the same events - Legacy behavior can be triggered by passing `true` for new `force` param - `ScreepsHttpClient.setServer()` now triggers `disconnect()` - `authed`, `connected`, and `reconnecting` properties now have private setters - `ws` and `http` properties are now protected CLI: - Changed error-handling behavior: - Help is now printed after usage errors (ex: invalid raw command) - Non-zero exit status is now returned on all errors - Changed `memory` output format: - Nothing is emitted if the Memory path does not exist - JSON output is serialized before being emitted to stdout to allow the full contents to be inspected #### New Features and Improvements General: - Added detailed type definitions for most of the API: <https://screepers.github.io/node-screeps-api/modules.html> - Added support for `screeps.json` credential files: <https://screepers.github.io/node-screeps-api/documents/Configuration_and_Credential_Files.html> - Linux/\*BSD only: `ScreepsConfigManager` now checks for config files in the default `$XDG_CONFIG_HOME` directory if the env var is not defined - macOS only: `ScreepsConfigManager` now checks `$HOME/Library/Application Support` for config files. - Added `ScreepsClientConfig.defaultShard` option - Added `ScreepsHttpClient.debug()` method to enable/disable debug logging: <https://screepers.github.io/node-screeps-api/documents/Debugging.html#event-logging> HTTP API: - `ScreepsHttpClient` now authenticates automatically as needed - Added `ScreepsHttpClient.userCpuShards` endpoint - Added `ScreepsHttpClient.seasonsCurrent` endpoint - Added `ScreepsHttpClient.userActivatePtr` endpoint - Added support for automatic retries on HTTP 429 errors due to endpoint-specific rate limits - See [`ScreepsClientConfig`](https://screepers.github.io/node-screeps-api/interfaces/ScreepsClientConfig.html) options `retry429InitDelay`, `retry429MaxDelay`, and `retry429MaxRetries` WebSocket API: - `ScreepsSocketClient` now authenticates automatically as needed - Added event-specific `subscribe___()`/`unsubscribe____()` methods: - These new variants of `subscribe()`/`unsubscribe()` automatically determine the `eventSpec` argument and enforce appropriate type constraints on callback arguments - These are equivalent to the endpoint methods on `ScreepsHttpClient` - `ScreepsSocketClient` options can now be loaded from config files CLI: - Added `memory --pretty` option to pretty-print output to files or stdout #### Fixes WebSocket API: - Fixed `ScreepsSocketClient` async bug when trying to process gzipped data - Fixed bug that emitted queued messages as events instead of sending them CLI: - Fixed async bug when trying to write memory to disk via `memory -f <file>` - Fixed ReferenceError when trying to write a single memory segment to disk via `segment -d <dir> <segmentNumber>` **Full Changelog**: <https://github.com/screepers/node-screeps-api/compare/8b6ad48b41526c47125807fb83ac279928e53e6e...v2.0> Please see the this package's npm versions page for releases between v1.0.0 and v2.0.0: <https://www.npmjs.com/package/screeps-api?activeTab=versions> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - "on monday,on friday" - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMjYuMiIsInVwZGF0ZWRJblZlciI6IjQ0LjU1LjAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbImF1dG9tYXRpb24iLCJucG0iXX0=-->
CODEOWNERS rules requested review from AutoReview 2026-06-20 01:18:16 +02:00
AutoReview left a comment
Member

Summary

  • Critical: The upgrade from screeps-api v1.x to v2.x introduces major breaking changes. Specifically, ScreepsAPI is no longer exported by the library, which causes the build step (npm run build utilizing @vercel/ncc) to fail with an export error. Merging this PR as-is package will completely break the GitHub/Gitea Action.
  • Testing: Test files (__tests__/index.test.js) still import and mock ScreepsAPI from screeps-api, which must be updated alongside any v2 migration refactoring.
  • Improvement: Close or pause this Renovate PR. A manual pull request is required to rewrite the integration using the new v2 modules (such as ScreepsHttpClient and ScreepsSocketClient).
  • Nitpick: None.
**Summary** * **Critical:** The upgrade from `screeps-api` v1.x to v2.x introduces major breaking changes. Specifically, `ScreepsAPI` is no longer exported by the library, which causes the build step (`npm run build` utilizing `@vercel/ncc`) to fail with an export error. Merging this PR as-is package will completely break the GitHub/Gitea Action. * **Testing:** Test files (`__tests__/index.test.js`) still import and mock `ScreepsAPI` from `screeps-api`, which must be updated alongside any v2 migration refactoring. * **Improvement:** Close or pause this Renovate PR. A manual pull request is required to rewrite the integration using the new v2 modules (such as `ScreepsHttpClient` and `ScreepsSocketClient`). * **Nitpick:** None.
index.js Outdated
@@ -1,1 +1,1 @@
import { ScreepsAPI } from "screeps-api";
Member

The build fails here because ScreepsAPI is no longer a valid export in screeps-api v2. Version 2 is a rewrite that exposes specialized modules (like ScreepsHttpClient and ScreepsSocketClient) rather than a single ScreepsAPI class.

The build fails here because `ScreepsAPI` is no longer a valid export in `screeps-api` v2. Version 2 is a rewrite that exposes specialized modules (like `ScreepsHttpClient` and `ScreepsSocketClient`) rather than a single `ScreepsAPI` class.
index.js Outdated
Member

This instantiation will fail under screeps-api v2 since ScreepsAPI is no longer exported. The logic here must be rewritten to match v2's new API client structure.

This instantiation will fail under `screeps-api` v2 since `ScreepsAPI` is no longer exported. The logic here must be rewritten to match v2's new API client structure.
Renovate force-pushed renovate/screeps-api-2.x from a022bbbb17 to ab87ee98a1 2026-08-11 00:23:53 +02:00 Compare
Philipp added the chore label 2026-09-04 23:21:35 +02:00
Renovate added 1 commit 2026-09-04 23:25:00 +02:00
fix(deps): update dependency screeps-api to v2
renovate/stability-days Updates have met minimum release age requirement
Test / Run Tests (push) Failing after 0s
Recompile dist/ on Renovate PR / recompile (pull_request) Failing after 0s
Test / Run Tests (pull_request) Failing after 0s
Philipp/Global-Workflows: Pre-commit Lint (Scoped) / pre-commit (pull_request) Failing after 0s
d644b19b47
Renovate force-pushed renovate/screeps-api-2.x from ab87ee98a1 to d644b19b47 2026-09-04 23:25:00 +02:00 Compare
AutoReview left a comment
Member

Summary

  • Critical: The upgrade from screeps-api v1 to v2 is a breaking change. The ScreepsAPI class is no longer the default export, and its API structure has significantly changed (e.g., authentication, socket handling, and client instantiation). The current PR only updates the dependency version in package.json and pnpm-lock.yaml, but the index.js and monitor.js code still rely on the old v1 ScreepsAPI structure, which will cause runtime failures.
  • Testing: No new tests were added to accommodate the v2 changes, and current logic is incompatible with the updated library.
  • Improvement: The codebase must be refactored to use the new ScreepsHttpClient and ScreepsSocketClient exports from screeps-api v2, as noted in previous review feedback.
  • Nitpick: None.

As requested by the system prompt, I am marking this PR as REQUEST_CHANGES because the changes are incomplete and will result in a non-functional action.

**Summary** * **Critical:** The upgrade from `screeps-api` v1 to v2 is a breaking change. The `ScreepsAPI` class is no longer the default export, and its API structure has significantly changed (e.g., authentication, socket handling, and client instantiation). The current PR only updates the dependency version in `package.json` and `pnpm-lock.yaml`, but the `index.js` and `monitor.js` code still rely on the old v1 `ScreepsAPI` structure, which will cause runtime failures. * **Testing:** No new tests were added to accommodate the v2 changes, and current logic is incompatible with the updated library. * **Improvement:** The codebase must be refactored to use the new `ScreepsHttpClient` and `ScreepsSocketClient` exports from `screeps-api` v2, as noted in previous review feedback. * **Nitpick:** None. As requested by the system prompt, I am marking this PR as `REQUEST_CHANGES` because the changes are incomplete and will result in a non-functional action.
index.js Outdated
@@ -1,1 +1,1 @@
import { ScreepsAPI } from "screeps-api";
Member

The upgrade to screeps-api v2 is a breaking change. ScreepsAPI is no longer a valid export. You need to refactor this to use the new ScreepsHttpClient and/or ScreepsSocketClient as per the v2 documentation. The current implementation will fail at runtime.

The upgrade to `screeps-api` v2 is a breaking change. `ScreepsAPI` is no longer a valid export. You need to refactor this to use the new `ScreepsHttpClient` and/or `ScreepsSocketClient` as per the v2 documentation. The current implementation will fail at runtime.
Philipp added 1 commit 2026-09-04 23:58:30 +02:00
refactor: migrate to screeps-api v2 and update actions to node 22
Test / Run Tests (push) Failing after 1s
Recompile dist/ on Renovate PR / recompile (pull_request) Failing after 0s
Test / Run Tests (pull_request) Failing after 0s
Philipp/Global-Workflows: Pre-commit Lint (Scoped) / pre-commit (pull_request) Failing after 1s
cfb97819ae
Author
Member

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

### Edited/Blocked Notification Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. ⚠️ **Warning**: custom changes will be lost.
Some required checks failed
Test / Run Tests (push) Failing after 1s
Required
Details
Recompile dist/ on Renovate PR / recompile (pull_request) Failing after 0s
Test / Run Tests (pull_request) Failing after 0s
Required
Details
Philipp/Global-Workflows: Pre-commit Lint (Scoped) / pre-commit (pull_request) Failing after 1s
Required
Details
Some required checks were not successful.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin renovate/screeps-api-2.x:renovate/screeps-api-2.x
git checkout renovate/screeps-api-2.x
Sign in to join this conversation.
No Reviewers
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Screeps/screeps-deploy-action#102