Skip to content

Replace semver with verkit #277

Open

Description

@sxzz

https://github.com/sxzz/verkit is a SemVer toolkit for modern ESM and TypeScript projects. It follows node-semver semantics while providing a functional, tree-shakeable API.

verkit offers several advantages:

  • Complete SemVer version and range support
  • Faster than node-semver across the operations covered by its benchmarks
    • Between 1.13× and 2.26× faster in the current benchmark suite
  • Pure ESM with zero runtime dependencies
  • First-class TypeScript declarations—no need to install @types/semver
  • Functional, tree-shakeable named exports
  • Smaller bundles
    • 25.4% smaller for full-package imports
    • 59.7% smaller for common tree-shaken imports
  • Immutable collection helpers, while parsed SemVer and SemVerRange records remain mutable
  • A documented migration guide for renamed and reshaped node-semver APIs

node-semver does not appear to have an active ESM migration plan. ESM support was proposed as early as npm/node-semver#325, and the request in npm/node-semver#712 remains open. More recently, the dual-format ESM proposal in npm/node-semver#844 was closed, with a maintainer noting that moving npm packages to ESM is on their radar but is not currently being worked on.

The main concern is that verkit is still young, and it is not a completely drop-in replacement: it is ESM-only, some APIs have clearer names or different shapes, and it intentionally does not provide node-semver's CommonJS entry point, CLI, or NODE_DEBUG=semver output. Adoption should therefore focus on ESM projects whose actual node-semver usage is covered by verkit.

Progress

Activity

  1. Norbiros commented on Jul 22, 2026

    @Norbiros

    @sxzz, since you’re already updating many libraries across the Nuxt ecosystem, could you also take a look at https://github.com/nuxt/cli?

  2. sxzz commented on Jul 22, 2026

    @sxzz
    Author

    Thanks for the suggestion. I’m not planning to migrate every project in the ecosystem myself. If you’d like nuxt/cli to adopt verkit, please open an issue or PR in that repository so its maintainers can evaluate it.

  3. ghostdevv commented on Jul 22, 2026

    @ghostdevv
    Member

    How come you're shipping an index.min.js? You could shrink the unpack size by ~18kb

  4. sxzz commented on Jul 23, 2026

    @sxzz
    Author

    Thanks for the suggestion. Removed now.

  5. MichaelDeBoey commented on Jul 23, 2026

    @MichaelDeBoey
    npx github:Fuzzyma/e18e-tools semver -n 100 -q -o md  -U https://npm.devminer.xyz/registry
    # Downloads Traffic Version Package PR Notes
    1 276.38M 8125.37 GB ^7.7.3 @typescript-eslint/typescript-estree
    2 255.58M 7513.67 GB ^6.3.1 @babel/core babel/babel#18145
    3 219.22M 6444.76 GB ^7.5.4 istanbul-lib-instrument
    4 211.58M 6220.30 GB ^6.3.1 @babel/helper-compilation-targets babel/babel#18145
    5 165.94M 4878.56 GB ^7.3.5 normalize-package-data
    6 115.74M 3402.58 GB ^7.7.2 jest-snapshot
    7 112.34M 3302.73 GB ^6.3.1 eslint-plugin-import
    8 104.46M 3071.02 GB ^6.3.1 eslint-plugin-react
    9 97.34M 2861.61 GB ^6.3.1 @babel/preset-env babel/babel#18145
    10 96.23M 2829.20 GB ^7.5.4 jsonwebtoken
    11 90.87M 2671.44 GB ^6.3.1 babel-plugin-polyfill-corejs2
    12 82.03M 2411.72 GB ^7.3.5 @npmcli/fs
    13 78.73M 2314.49 GB ^7.5.4 css-loader
    14 78.58M 2310.30 GB ^7.7.3 sharp
    15 75.72M 2226.22 GB ^7.3.5 npm-package-arg
    16 62.92M 1849.91 GB ^7.7.3 ts-jest
    17 61.22M 1799.76 GB ^7.3.5 node-gyp
    18 60.77M 1786.58 GB ^6.3.1 @babel/plugin-transform-runtime babel/babel#17511
    19 54.98M 1616.35 GB ^7.6.2 postcss-loader
    20 45.08M 1325.23 GB ^7.7.1 is-bun-module
    21 41.52M 1220.73 GB ^7.6.3 node-abi
    22 38.18M 1122.32 GB ^7.3.5 npm-pick-manifest
    23 35.49M 1043.37 GB ^7.1.1 npm-install-checks
    24 34.78M 1022.46 GB ^7.0.0 builtins
    25 32.65M 959.93 GB ^7.6.0 package-json
    26 32.23M 947.65 GB ^7.3.5 @npmcli/git
    27 31.91M 938.11 GB ^7.7.3 @puppeteer/browsers
    28 31.31M 920.36 GB ^7.3.4 ts-loader
    29 30.25M 889.22 GB ^7.5.3 nodemon
    30 29.57M 869.44 GB ^7.5.3 @mapbox/node-pre-gyp
    31 28.62M 841.46 GB ^6.3.1 @babel/eslint-parser babel/babel#18145
    32 28.57M 839.97 GB ^7.5.3 simple-update-notifier
    33 28.49M 837.44 GB ^7.7.3 npm
    34 28.07M 825.35 GB ^7.7.3 storybook
    35 26.87M 790.04 GB ^7.3.5 semver-diff
    36 26.86M 789.52 GB ^7.5.3 @npmcli/package-json
    37 24.35M 715.82 GB ^7.6.3 nx
    38 22.57M 663.41 GB ^6.3.0 eslint-config-airbnb-base
    39 22.10M 649.81 GB ^7.7.2 editorconfig
    40 21.39M 628.80 GB ^7.6.3 update-notifier
    41 19.04M 559.81 GB ^7.6.3 @nx/devkit
    42 18.67M 549.02 GB ^7.6.3 vue-eslint-parser
    43 18.57M 545.86 GB ^7.5.2 conventional-changelog-writer
    44 17.84M 524.52 GB ^7.3.5 node-notifier
    45 17.00M 499.82 GB ^7.5.4 eslint-compat-utils
    46 16.39M 481.86 GB ~7.5.4 @rushstack/node-core-library
    47 15.97M 469.48 GB ^7.6.0 @commitlint/is-ignored
    48 15.41M 452.93 GB ^7.6.3 eslint-plugin-n
    49 15.27M 449.03 GB ^7.7.3 eslint-plugin-unicorn
    50 14.87M 437.22 GB ^7.6.2 @storybook/core
    51 14.32M 421.02 GB ^7.1.3 react-native
    52 14.15M 415.96 GB ^7.7.3 @oclif/core
    53 14.09M 414.15 GB ^7.5.4 @expo/config-plugins
    54 13.80M 405.79 GB ^7.7.3 eslint-plugin-jsdoc
    55 13.54M 398.00 GB ^7.3.2 global-agent
    56 13.49M 396.49 GB ^7.5.3 patch-package
    57 13.33M 391.90 GB ^7.6.3 eslint-plugin-vue
    58 13.03M 383.08 GB ^7.1.3 @react-native/community-cli-plugin
    59 12.51M 367.86 GB ^7.6.0 @expo/config
    60 12.43M 365.46 GB ^7.6.3 @nx/js
    61 12.32M 362.07 GB 7.7.3 @angular/cli
    62 11.66M 342.71 GB ^7.6.3 @nx/workspace
    63 11.65M 342.51 GB ^7.3.5 jsonc-eslint-parser ota-meshi/jsonc-eslint-parser#300
    64 11.44M 336.41 GB ^7.0.0 @angular/compiler-cli
    65 11.28M 331.50 GB ^6.1.0 eslint-plugin-node
    66 11.23M 330.21 GB ^7.7.3 @nuxt/kit nuxt/nuxt#35713
    67 10.97M 322.65 GB ^7.6.0 fastify
    68 10.81M 317.72 GB ^7.3.5 semver-truncate
    69 10.76M 316.30 GB ^7.6.0 bin-version-check
    70 10.52M 309.18 GB ^7.7.3 @storybook/preset-react-webpack
    71 10.40M 305.70 GB ^7.3.5 @npmcli/metavuln-calculator
    72 10.10M 296.91 GB ^5.4.1 cls-hooked
    73 10.07M 295.90 GB ^7.6.0 @expo/image-utils
    npx github:Fuzzyma/e18e-tools semver -n 100 -q -o md -D -U https://npm.devminer.xyz/registry
    # Downloads Traffic Version Package PR Notes
    1 494.93M 14550.49 GB iconv-lite
    2 410.02M 12054.10 GB resolve
    3 383.05M 11261.29 GB form-data
    4 279.38M 8213.37 GB doctrine
    5 277.92M 8170.54 GB object-inspect
    6 260.01M 7644.03 GB node-releases
    7 260.00M 7643.81 GB is-core-module
    8 250.92M 7376.82 GB postcss-selector-parser
    9 231.51M 6806.21 GB async
    10 230.39M 6773.11 GB eslint
    11 219.23M 6445.04 GB supports-preserve-symlinks-flag
    12 198.05M 5822.35 GB @eslint-community/eslint-utils
    13 188.43M 5539.56 GB rollup
    14 148.79M 4374.19 GB jws
    15 147.21M 4327.74 GB terser
    16 145.65M 4281.82 GB node-addon-api
    17 145.44M 4275.72 GB jwa
    18 137.93M 4054.91 GB escodegen
    19 115.68M 3400.82 GB ts-node
    20 112.04M 3293.77 GB jest-config
    21 108.18M 3180.28 GB async-function
    22 105.76M 3109.15 GB v8-to-istanbul
    23 103.84M 3052.88 GB @istanbuljs/load-nyc-config
    24 100.76M 2962.22 GB uglify-js
    25 99.58M 2927.53 GB @cspotcode/source-map-support
    26 91.21M 2681.37 GB v8-compile-cache-lib
    27 87.36M 2568.30 GB handlebars
    28 83.75M 2462.07 GB generator-function
    29 83.34M 2450.18 GB cross-fetch
    30 79.60M 2340.21 GB deep-equal
    31 74.62M 2193.68 GB @grpc/grpc-js
    32 71.84M 2111.90 GB at-least-node
    33 70.47M 2071.72 GB eslint-plugin-jsx-a11y
    34 65.25M 1918.24 GB eslint-utils
    35 65.16M 1915.77 GB http-proxy
    36 61.68M 1813.33 GB require-in-the-middle
    37 61.41M 1805.45 GB next
    38 55.74M 1638.79 GB style-loader
    39 55.11M 1620.15 GB pino
    40 48.97M 1439.69 GB lint-staged
    41 47.63M 1400.31 GB sass-loader
    42 42.00M 1234.84 GB eslint-plugin-jest
    43 37.55M 1104.00 GB mocha
    44 35.53M 1044.48 GB pbkdf2
    45 34.35M 1009.74 GB crypto-browserify
    46 34.25M 1006.95 GB @faker-js/faker
    47 33.51M 985.16 GB v8-compile-cache
    48 29.64M 871.49 GB chromium-bidi
    49 29.05M 854.03 GB browserify-sign
    50 28.54M 839.02 GB latest-version
    51 28.40M 834.93 GB mongodb
    52 28.27M 830.99 GB import-meta-resolve
    53 27.96M 822.00 GB less
    54 27.24M 800.80 GB aws-sdk
    55 26.82M 788.37 GB sinon
    56 25.52M 750.26 GB pino-pretty
    57 21.73M 638.98 GB jest-watch-typeahead
    58 21.57M 634.00 GB swr
    59 20.55M 604.21 GB semver-regex
    60 18.94M 556.84 GB cssdb
    61 15.33M 450.60 GB eslint-plugin-es
    62 14.60M 429.23 GB @datadog/pprof
    63 14.31M 420.78 GB regexp-to-ast
    64 14.26M 419.23 GB dd-trace
    65 13.76M 404.42 GB chromatic
    66 13.75M 404.25 GB @datadog/native-iast-taint-tracking
    67 12.17M 357.78 GB react-draggable
    68 11.68M 343.37 GB eslint-plugin-es-x
    69 11.36M 333.88 GB @napi-rs/canvas
    70 10.99M 323.06 GB ts-essentials
    71 10.79M 317.13 GB @vercel/nft
    72 10.28M 302.32 GB @babel/cli babel/babel#18145
  6. gameroman commented on Jul 30, 2026

    @gameroman

    Would be great to convince @typescript-eslint/typescript-estree to switch

  7. sxzz commented on Jul 30, 2026

    @sxzz
    Author

    They need to switch to pure ESM first typescript-eslint/typescript-eslint#11379

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions