Repository navigation
Updates - #85
Merged
Merged
Updates#85
Conversation
Bumps [serialize-javascript](https://github.com/yahoo/serialize-javascript) to 7.1.2 and updates ancestor dependency [mocha](https://github.com/mochajs/mocha). These dependencies need to be updated together. Updates `serialize-javascript` from 6.0.2 to 7.1.2 - [Release notes](https://github.com/yahoo/serialize-javascript/releases) - [Commits](yahoo/serialize-javascript@v6.0.2...v7.1.2) Updates `mocha` from 11.8.0 to 12.0.2 - [Release notes](https://github.com/mochajs/mocha/releases) - [Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md) - [Commits](mochajs/mocha@v11.8.0...v12.0.2) --- updated-dependencies: - dependency-name: serialize-javascript dependency-version: 7.1.2 dependency-type: indirect - dependency-name: mocha dependency-version: 12.0.2 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com>
Add User-Agent validation helpers and reject requests without a descriptive custom header across the public API endpoints. This helps block generic clients and browsers while guiding callers toward the expected `company/location`-style format.
Make the test suite configurable via `API_BASE_URL` and add coverage for requests missing a `User-Agent` header on `/apps` and `/app/MicrosoftEdge`. This also updates the health endpoint expectation to allow the stricter validation responses now returned by the API.
This change updates the API schema documentation to reflect the current application cache lifetime. The documented `max-age` value was corrected from 5 minutes to 12 hours so the public contract matches the implementation.
Remove exception messages from public error and health-check responses, while updating the OpenAPI spec to allow dots in the appId pattern and reflect the longer cache max-age examples.
Change the `/` route to return a 404 JSON response with documentation and guidance to valid API paths instead of API metadata. Update the root endpoint test to expect the 404 status and verify the guidance message.
Update the Cloudflare developer toolchain from Wrangler 4.131.0 to 4.137.0, including Miniflare, workerd, and related packages. Also bump the app version from 1.5.5 to 1.6.0 to align the release with the upgraded runtime dependencies.
Load `chai` asynchronously in a `before` hook and assign `assert` there so the test suite can work with environments where `chai` must be imported as an ES module.
Co-authored-by: aaronparker <8227455+aaronparker@users.noreply.github.com>
…tests Update API tests for current endpoint behavior and ESM-compatible Chai loading
Update the lockfile package metadata to match the Evergreen package version bump from 1.5.5 to 1.6.0.
Refresh the GitHub Actions test workflow to run the main matrix on Node.js 24.x and 26.x, and align the other workflow jobs that were pinned to 20.x so CI consistently targets the newer runtime versions.
…ulti-74780f5fa2 Bump serialize-javascript and mocha in /tests
Co-authored-by: aaronparker <8227455+aaronparker@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new required validation for the
User-Agentheader on all public API endpoints, updates documentation and schema to reflect longer cache durations, and bumps several dependencies and the package version. The most significant changes are grouped below.API Security & Validation Improvements:
validateUserAgentfunction and middleware to require a valid, descriptiveUser-Agentheader (e.g., "company/location") for all major endpoints. Requests without a valid header now receive a 400 response with a helpful message. (src/index.js) [1] [2] [3] [4] [5] [6] [7] [8] [9]Caching Policy Updates:
schema/API_SCHEMA.md,schema/openapi.yml) [1] [2] [3] [4] [5]Schema and Validation Enhancements:
appIdin the OpenAPI schema to permit periods (.) and underscores (_) in addition to previous characters. (schema/openapi.yml)Dependency and Version Updates:
1.6.0and upgraded several dependencies, including Cloudflare Worker packages, Miniflare, and Wrangler, to their latest releases. (src/package.json,src/package-lock.json) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]Minor API Response Changes:
errorfield from some internal server error responses. (src/index.js) [1] [2] [3]These changes improve API security, clarify caching behavior, and keep dependencies up-to-date.