
Company News
Socket Partners with Replit to Block Malicious Packages in AI-Powered Development
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.
@doist/react-compiler-tracker
Advanced tools
A React Compiler violation tracker to help migrations and prevent regressions
While it's safe to opt out of using memoization hooks such as useCallback and useMemo in code optimized by the React Compiler, it is easy to introduce violations that cause the compiler to bail out, leading to performance issues when values are not memoized.
Designed to run as a part of Git hooks and CI, this tool helps prevent this and progressively adopt the React Compiler by tracking and warning against newly introduced compilation errors. It maintains a .react-compiler-tracker.json record file to track known compiler errors per file.
This tool requires babel-plugin-react-compiler to be installed in your project:
npm install --save-dev babel-plugin-react-compiler
npm install --save-dev @doist/react-compiler-tracker
--overwriteRegenerates the entire .react-compiler-tracker.json by scanning all supported source files (src/**/*.{js,jsx,ts,tsx}). Useful for initialization or picking up changes from skipped Git hooks.
npx @doist/react-compiler-tracker --overwrite
--stage-record-fileChecks Git staged files and updates the records. Exits with code 1 if errors increase (preventing the commit), otherwise updates .react-compiler-tracker.json for staged files.
npx @doist/react-compiler-tracker --stage-record-file
--check-files <file1> <file2> ...Checks specific files without updating records. Exits with code 1 if checked files show increased error counts (or new errors). Primarily for CI to ensure PRs don't introduce new compiler errors.
npx @doist/react-compiler-tracker --check-files src/components/Button.tsx src/hooks/useData.ts
Checks all supported source files and reports the total error count. The records file is not updated in this mode.
npx @doist/react-compiler-tracker
In package.json:
{
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx}": "npx @doist/react-compiler-tracker --stage-record-file"
}
}
- name: Check React Compiler violations
run: |
# Get changed files in the PR
FILES=$(git diff --name-only origin/main...HEAD -- '*.tsx' '*.ts' '*.jsx' '*.js' | tr '\n' ' ')
if [ -n "$FILES" ]; then
npx @doist/react-compiler-tracker --check-files $FILES
fi
Released under the MIT License.
FAQs
A React Compiler violation tracker to help migrations and prevent regressions
We found that @doist/react-compiler-tracker demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 12 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.

Research
/Security News
Newer packages in this compromise use native extensions and .pth loaders to execute JavaScript stealers in developer environments.