Release/26.1.4#278
Conversation
* SK-2503: add support for custom token uri
…es-with-constants aadarsh-st/SK-2495 replace hardcode values with constants
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
|
Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging. |
There was a problem hiding this comment.
Pull request overview
This PR refactors the codebase to replace magic strings with named constants, improving maintainability and consistency. The changes also introduce ESLint configuration with TypeScript support to enforce camelCase naming and prevent the use of string literals for object access.
Changes:
- Introduced new constant groups (SDK, SKYFLOW, CONFIG, HTTP_HEADER, CONTENT_TYPE, ENCODING_TYPE, etc.) to replace hardcoded string literals throughout the codebase
- Updated ESLint configuration to use typescript-eslint with rules enforcing camelCase and restricting magic strings
- Added eslint-disable comments for unavoidable camelCase violations (e.g., external library usage with snake_case)
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/utils/index.ts |
Introduced constant groups to centralize magic strings |
src/vault/skyflow/index.ts |
Replaced string literals with CONFIG constants |
src/vault/controller/vault/index.ts |
Replaced string literals with SDK, SKYFLOW, CONTENT_TYPE, and ENCODING_TYPE constants |
src/vault/controller/detect/index.ts |
Replaced string literals with SDK, FILE_PROCESSING, DETECT_STATUS, and ENCODING_TYPE constants |
src/vault/controller/connections/index.ts |
Replaced string literals with SDK, SKYFLOW, REQUEST, and CONTENT_TYPE constants |
src/vault/client/index.ts |
Replaced string literals with HTTP_HEADER, CONTENT_TYPE, BOOLEAN_STRING, and HTTP_STATUS_CODE constants |
src/utils/validations/index.ts |
Replaced string literals with CONFIG, SKYFLOW, and API_KEY constants |
src/utils/jwt-utils/index.ts |
Added eslint-disable comment for jwt_decode import |
src/service-account/index.ts |
Replaced string literals with HTTP_HEADER, CONTENT_TYPE, HTTP_STATUS_CODE, JWT, and ENCODING_TYPE constants |
test/vault/utils/utils.test.js |
Added eslint-disable comment for jwt_decode import |
test/vault/utils/jwt-utils/jwt.test.js |
Added eslint-disable comment for jwt_decode import |
test/vault/controller/vault.test.js |
Updated mock to include new constant structures |
test/vault/controller/detect.test.js |
Updated mock to include new constants and improved test structure with better documentation |
test/vault/controller/connection.test.js |
Updated references to use SDK and SKYFLOW constant groups |
src/vault/model/options/deidentify-file/bleep-audio/index.ts |
Added eslint-disable comment for camelCase |
samples/vault-api/data-residency.ts |
Added eslint-disable comment for skyflow_id destructuring |
package.json |
Updated version, added ESLint dependencies, and modified lint scripts to include TypeScript files |
eslint.config.mjs |
Created new ESLint configuration with TypeScript support and custom rules |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
|
Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging. |
1 similar comment
|
Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging. |
aadarsh-st/SK-2510-Fixed all the mentioned issue
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
removeComments:true stripped @deprecated/@internal JSDoc from .d.ts files, so api-extractor couldn't read them — generating a report that differed from the committed snapshot. Set removeComments:false so JSDoc annotations are preserved in compiled output and api-extractor produces a consistent report across local and CI builds. Also update test to match enumerable:true on the request_ID deprecated alias. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previous snapshot was generated with removeComments:false, causing CI mismatch. Regenerated with removeComments:true to match CI build output. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
aadarsh-st/SK-2812: Public Interface Cleanup
aadarsh-st/SK-2812: Updated test, reade and migration doc
…ples SK-2841: Update deprecated samples
No description provided.