Some Modernization#645
Merged
werthdavid merged 19 commits intomasterfrom Apr 27, 2026
Merged
Conversation
let -> const, initialize numbers, change equality operator, add missing comments.
… library had a workaround in StringEncoding.ts that routed ISO-8859-1 decoding through decodeURIComponent('%f3'),
which is invalid UTF-8 and throws. Since we've upgraded to Node ≥ 18, the native TextDecoder('ISO-8859-1') works correctly for all Latin-1 bytes. Fixed by returning false from
shouldDecodeOnFallback (no longer needed on Node 18).
RSSExpandedBlackBox2 — The test declared tryHarderCount=23 (all images must pass in try-harder mode) but the RSS Expanded reader can't decode 2 specific images in any mode. The other RSS Expanded
test sets all use equal mustPass/tryHarder counts. The threshold was overly optimistic. Fixed by aligning tryHarderCount=21 to match actual capability.
Clean up RSS14Reader
Feature/microqr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog:
feature/modernize26vsmasterNew Feature: MicroQR Code Support
src/core/microqr/)MicroQRCodeReaderinMultiFormatReaderandBarcodeFormatsrc/index.tssrc/test/resources/blackbox/microqr-1/)Bug Fixes
src/core/oned/rss/RSS14Reader.ts): Fixed finder pattern center calculation — off-by-one corrected (startEnd[0] + startEnd[1] - 1); non-throwing errors (other thanNotFoundException) no longer silently swallowed;new String()replaced withString(); strict equality (===) fixessrc/core/util/StringEncoding.ts): RemovedshouldDecodeOnFallbackworkaround for ISO-8859-1 — Node ≥ 18 nativeTextDecoderhandles all Latin-1 bytes correctly, fixingURIError: URI malformedon characters likeófindFinderPattern()[1]now correctly points to the outside pixel of the finder patternToolchain Modernization
@typescript-eslintv8 (flat config)rollup.config.js(Rollup v2)rollup.config.mjs(Rollup v4)>= 10.4.0>= 24.0.0Configuration Changes
jest.config.js,tsconfig.test.json,src/test/jest.setup.tseslint.config.mjs(flat config); removed.eslintrc,tslint.jsonkarma.conf.jstsconfig.json: addedignoreDeprecations: "6.0",strictNullChecks: false,useUnknownInCatchVariables: false,lib: ["es2020","dom"],rootDir: "./src"tsconfig.lib-cjs.jsonandtsconfig.lib-esm.json: addedignoreDeprecations: "6.0"Package Changes
0.21.3→0.22.0MIT→Apache-2.0. Actually the License has always been Apache but the package.json stated MIT which is wrong.chai,mocha,karma-*,tslint,nyc,sinon,@types/chai,@types/mocha,@types/seedrandom@2jest,ts-jest,eslint@10,typescript-eslint,@types/jest,@types/seedrandom@3rollupv2→v4,sharpv0.32→v0.34,typescriptv3→v6,seedrandomv2→v3,terser(removed deprecated--screw-ie8flag)