Repository navigation
ci: unit tests on main with Node 24; declare and prune dependencies - #196
pritesh-jain-cstk wants to merge 4 commits into
Conversation
…verage (MKT-22131) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…2131) loader-utils (runtime), @babel/preset-env, @testing-library/jest-dom, babel-loader, ts-node and webpack-dev-server are imported or configured nowhere. No remaining lock entry changes version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
🟠 High Severity - SLA Breached Issues (with fixes)Showing 6 issue(s) that have exceeded the 30-day SLA threshold:
🟡 Medium Severity - SLA Breached Issues (with fixes)Showing 10 issue(s) that have exceeded the 90-day SLA threshold:
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
❌ BUILD FAILED - Security checks failed Please review and fix the security vulnerabilities before merging. |
…MKT-22131) prefer-const and no-inferrable-types only; dist/src/**/*.d.ts is byte-identical before and after. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 3 remaining warnings are on exported types (MKT-22133), so this job fails until that is decided; the build-and-test job is separate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🔒 Security Scan Results
⏱️ SLA Breach Summary
🟠 High Severity - SLA Breached Issues (with fixes)Showing 6 issue(s) that have exceeded the 30-day SLA threshold:
🟡 Medium Severity - SLA Breached Issues (with fixes)Showing 10 issue(s) that have exceeded the 90-day SLA threshold:
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
❌ BUILD FAILED - Security checks failed Please review and fix the security vulnerabilities before merging. |
Branch graph
Epic MKT-21672. This PR is highlighted. Only [Routine] depends on [Tests]; the rest are independent.
What
Jira: MKT-22131
Depends on #195 (base branch; CI runs its tests).
Consumer impact:
dist/src/**/*.d.tshas no diff.dist/index.jsdiffers only in the embedded copy ofpackage.json(used forSDK_VERSION). Installing the package no longer pullsloader-utils, which no source file imports. webpack bundles all code intodist/index.js, so nothing at runtime changes..github/workflows/unit-test.yml: push triggermaster->main(wiki gotchaunit-test-workflow-triggers-on-master: merges tomainran no tests), Node from the new.nvmrc(24, current LTS; was 18, end of life), actions v4 with npm cache, a build step, andtest:coverage. No coverage threshold: 79% against a bar of 90. Workflow files need@contentstack/security-adminreview; this is a draft and no review is requested.lintjob (npm run lint, no--fix).mainhad 8 warnings under--max-warnings=0; this PR fixes the 5 that leavedist/src/**/*.d.tsbyte-identical (prefer-const, no-inferrable-types; checked by building before and after). The 3 left are on exported types ({}intypes.ts:273,Stringinstack.types.ts:149-150); fixing them changes the published typings, so they are filed as MKT-22133. Thelintjob fails until MKT-22133 is done; nocontinue-on-error, no eslint-disable. Build and tests are a separate job and stay green.package.json: declares@jest/globals(imported by__test__/entry.test.ts) at the installed 27.5.1; removesloader-utils(dependency) and@babel/preset-env,@testing-library/jest-dom,babel-loader,ts-node,webpack-dev-server(devDependencies), all imported or configured nowhere. The lock only loses 319 entries; no remaining entry changes version.@babel/coreleft for fix: bump 2 deps to resolve Snyk vulnerabilities #191. Supersedes Snyk [Snyk] Upgrade loader-utils from 3.2.1 to 3.3.1 #112.package-lock.json; whichever merges second needsnpm installto resolve the lock.Readiness items
routine.dependencies, CI hygieneCommands (exit codes, Node 24 locally)
npm cinpm run lintnpm run buildnpx tsc --noEmit -p .npm testnpm audit --omit=devnpm run test:coverageCI:
security-scafails here as onmain: the lock pins axios 1.16.0 (8 High). That is fixed by #191 (MKT-22129 links it), not by this PR. The pre-push hook (npm test) passed on every push; none bypassed. Local Snyk cannot authenticate (SNYK-0005); the PR's Snyk checks are the scan.🤖 Generated with Claude Code