GeezerVison is showing github.com — chore(release): new release (#245) · webpack/webpack-sources@210e0a4
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: .changeset/original-source-stream-potential-tokens.md -7Lines changed: 0 additions & 7 deletions Collapse file Copy file name to clipboardExpand all lines: .changeset/perf-mappings-writer-replace-final-source.md -5Lines changed: 0 additions & 5 deletions Collapse file Copy file name to clipboardExpand all lines: .changeset/replace-source-skip-presorted-sort.md -5Lines changed: 0 additions & 5 deletions Collapse file Copy file name to clipboardExpand all lines: .changeset/split-into-potential-tokens-lookup-table.md -7Lines changed: 0 additions & 7 deletions Collapse file Copy file name to clipboardExpand all lines: CHANGELOG.md +16Lines changed: 16 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | # webpack-sources | 2 | 2 |
| | 3 | +## 3.5.1 | | 4 | + | | 5 | +### Patch Changes | | 6 | + | | 7 | +- perf: stream potential tokens in OriginalSource instead of materialising an array (by [@alexander-akait](https://github.com/alexander-akait) in [#246](https://github.com/webpack/webpack-sources/pull/246)) | | 8 | + | | 9 | + `OriginalSource.streamChunks` (and therefore `map()` / `sourceAndMap()`) previously built the full `splitIntoPotentialTokens` array of substrings and then iterated it — even though `map()` and `sourceAndMap()` run with `finalSource: true` and discard every chunk substring. The scan is now streamed by offset, so chunk substrings are only allocated when actually emitted. This removes the intermediate array and, on the dominant final-source paths, all per-token slices: `map()` / `sourceAndMap()` allocate ~38–46% less memory and run ~15–40% faster. | | 10 | + | | 11 | +- Reduce allocations and CPU in `map()` / `sourceAndMap()`: mappings are serialized into a reused byte buffer instead of per-mapping strings, `ReplaceSource` verifies original content through a line-offset index instead of splitting sources into line arrays, and `ReplaceSource.streamChunks` emits position-only chunks and returns the final source directly when `finalSource` is requested. (by [@alexander-akait](https://github.com/alexander-akait) in [#251](https://github.com/webpack/webpack-sources/pull/251)) | | 12 | + | | 13 | +- Skip sorting ReplaceSource replacements when they were added in order. (by [@alexander-akait](https://github.com/alexander-akait) in [#249](https://github.com/webpack/webpack-sources/pull/249)) | | 14 | + | | 15 | +- perf: use lookup table in splitIntoPotentialTokens for faster character classification (by [@xiaoxiaojx](https://github.com/xiaoxiaojx) in [#240](https://github.com/webpack/webpack-sources/pull/240)) | | 16 | + | | 17 | + Replace multi-comparison chains (4 comparisons in phase 1, 6 in phase 2) with a single Uint8Array bitmask lookup per character. This reduces per-character branching overhead, yielding ~7% improvement on typical source and ~21% on large sources. | | 18 | + | 3 | 19 | ## 3.5.0 | 4 | 20 |
| 5 | 21 | ### Minor Changes | |
Collapse file Copy file name to clipboardExpand all lines: package.json +9-3Lines changed: 9 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | { | 2 | 2 | "name": "webpack-sources", | 3 | | - "version": "3.5.0", | | 3 | + "version": "3.5.1", | 4 | 4 | "description": "Source code handling classes for webpack", | 5 | | - "keywords": ["webpack", "source-map"], | | 5 | + "keywords": [ | | 6 | + "webpack", | | 7 | + "source-map" | | 8 | + ], | 6 | 9 | "homepage": "https://github.com/webpack/webpack-sources#readme", | 7 | 10 | "bugs": { | 8 | 11 | "url": "https://github.com/webpack/webpack-sources/issues" | | 15 | 18 | "author": "Tobias Koppers @sokra", | 16 | 19 | "main": "lib/index.js", | 17 | 20 | "types": "types.d.ts", | 18 | | - "files": ["lib/", "types.d.ts"], | | 21 | + "files": [ | | 22 | + "lib/", | | 23 | + "types.d.ts" | | 24 | + ], | 19 | 25 | "scripts": { | 20 | 26 | "lint": "npm run lint:code && npm run lint:types && npm run lint:types-test && npm run lint:special", | 21 | 27 | "lint:code": "eslint --cache .", | |
|