Add script to check JSR version
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Andrey Sitnik · committed by Andrey Sitnik · parent 508528f · Browse files · 3 files·+39 added−0 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
3 files+39 added−0 removed
- tests:+16 added−0 removed
- other:+23 added−0 removed
Provenance
- Commit
b31cb61- Tree
8169800- Author
Andrey Sitnik <andrey@sitnik.ru>- Committer
Andrey Sitnik <andrey@sitnik.ru>- Parent
508528f
3 files changed+39 added−0 removed
added:test/check-versions.js+16 added
12345678910111213141516#!/usr/bin/env node
import { readFileSync } from 'fs'import { join, dirname } from 'path'import { fileURLToPath } from 'url'
let dir = dirname(fileURLToPath(import.meta.url))let pkg = JSON.parse(readFileSync(join(dir, '../package.json'), 'utf8'))let jsr = JSON.parse(readFileSync(join(dir, '../jsr.json'), 'utf8'))
if (pkg.version !== jsr.version) { process.stderr.write( `Version mismatch: package.json has ${pkg.version}, jsr.json has ${jsr.version}\n` ) process.exit(1)}modified:package.json+14 added
12 unmodified lines13141516171819202146 unmodified lines68697071727374757655 unmodified lines13213313413513613713813914014114214314414514614714814912 unmodified lines "start": "vite --host 0.0.0.0 test/demo/", "test:coverage": "c8 bnt", "test:lint": "eslint .", "test:size": "pnpm clean && size-limit", "test:versions": "node ./test/check-versions.js", "test": "pnpm run /^test:/" }, "type": "module", "engines": {46 unmodified lines "eslint": "^10.0.3", "rndm": "^1.2.0", "secure-random-string": "^1.1.4", "shortid": "^2.2.17", "simple-git-hooks": "^2.13.1", "size-limit": "^12.0.1", "terser": "^5.46.0", "tinybench": "^6.0.0", "uid": "^2.0.2",55 unmodified lines "lcov" ], "skip-full": true, "clean": true }, "simple-git-hooks": { "pre-commit": "./test/check-versions.js" }, "pnpm": { "ignoredBuiltDependencies": [ "esbuild", "unrs-resolver" ], "onlyBuiltDependencies": [ "simple-git-hooks" ] }}modified:pnpm-lock.yaml+9 added
54 unmodified lines55 version: 1.1.456 shortid:57 specifier: ^2.2.1758 version: 2.2.1759+ simple-git-hooks:60+ specifier: ^2.13.161+ version: 2.13.162 size-limit:63 specifier: ^12.0.164 version: 12.0.1(jiti@2.5.1)65 terser:1558 unmodified lines1624 signal-exit@4.1.0:1625 resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==}1626 engines: {node: '>=14'}1627 1628+ simple-git-hooks@2.13.1:1629+ resolution: {integrity: sha512-WszCLXwT4h2k1ufIXAgsbiTOazqqevFCIncOuUBZJ91DdvWcC5+OFkluWRQPrcuSYd8fjq+o2y1QfWqYMoAToQ==}1630+ hasBin: true1631+1632 size-limit@12.0.1:1633 resolution: {integrity: sha512-vuFj+6lDOoBJQu6OLhcMQv7jnbXjuoEn4WsQHlSLOV/8EFfOka/tfjtLQ/rZig5Gagi3R0GnU/0kd4EY/y2etg==}1634 engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0}1635 hasBin: true1658 unmodified lines3294 nanoid: 3.3.113295 3296 signal-exit@4.1.0: {}3297 3298+ simple-git-hooks@2.13.1: {}3299+3300 size-limit@12.0.1(jiti@2.5.1):3301 dependencies:3302 bytes-iec: 3.1.13303 lilconfig: 3.1.3238 unmodified lines