New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

checksync

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

checksync

A tool that allows code to be annotated across different files to ensure they remain in sync.

latest
Source
npmnpm
Version
10.0.2
Version published
Weekly downloads
2.6K
-41.99%
Maintainers
1
Weekly downloads
 
Created
Source

checksync

Node CI codecov npm (tag) Required Node Version

Usage

You can install checksync if you want, but the easiest way to use it is via npx.

npx checksync --help

For detailed usage information, run npx checksync --help.

Example workflow

  • Add synchronization tags to files indicating what sections to synchronize and with which files:

    // my-javascriptfile.js
    // sync-start:mysyncid ./my-pythonfile.py
    /**
     * Some code that needs to be synchronised.
     */
    // sync-end:mysyncid
    
    # my-pythonfile.py
    # sync-start:mysyncid ./my-javascriptfile.js
    '''
    Some code that needs to be synchronised.
    '''
    # sync-end:mysyncid
    

    Use consecutive sync-start tags with the same identifier to target multiple files.

    // my-csharpfile.cs
    // sync-start:mysyncid ./my-pythonfile.py
    // sync-start:mysyncid ./my-javascriptfile.js
    /**
     * Some code that needs to be synchronised.
     */
    // sync-end:mysyncid
    
  • Run checksync to verify the tags are correct:

    pnpm checksync <globs|files|dirs>
    
  • Run with --update-tags or -u to automatically insert the missing checksums:

    pnpm checksync -u <globs|files|dirs>
    
  • Add a pre-commit step to run checksync on commiting changes so that you catch when synchronized blocks change. You can do this using a package like husky, or pre-commit.

  • Commit your tagged files!

To get more information about the various arguments that checksync supports as well as information about sync-tags, run pnpm checksync --help.

Target file paths

All target paths are relative to your project root directory. By default, this is determined, using ancesdir to be the ancestor directory of the files being processed that contains package.json. If you want to specify a different root (for example, if you're syncing across multiple packages in a monorepo) you can specify a custom marker name using the --root-marker argument.

Contributing

For details on contributing to checksync, checkout our contribution guidelines.

Keywords

lint

FAQs

Package last updated on 09 Aug 2025

Did you know?

Socket

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.

Install

Related posts