Skip to content
Merged
Show file tree
Hide file tree
Changes from 48 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
853e88c
refactor: Rename Flatpack file to FlatpackV1
Jason3S Mar 3, 2026
ee6a444
copy v1 to v2
Jason3S Mar 5, 2026
91a9e7b
Add string table
Jason3S Mar 5, 2026
cb641d1
fix optimize
Jason3S Mar 5, 2026
acb323c
Add line wrapping and put all strings in the string table.
Jason3S Mar 5, 2026
6de2bf5
keep a copy of v1
Jason3S Mar 6, 2026
05a1080
[autofix.ci] apply automated fixes
autofix-ci[bot] Mar 6, 2026
b13061c
fix snapshots
Jason3S Mar 6, 2026
6e7d0b0
do not format fixture files
Jason3S Mar 6, 2026
b4618f5
[autofix.ci] apply automated fixes
autofix-ci[bot] Mar 6, 2026
f020665
Update .prettierignore
Jason3S Mar 6, 2026
d6277cf
do not format
Jason3S Mar 6, 2026
9ca5037
Update .npm-packages-info-v2.json
Jason3S Mar 6, 2026
8f26c19
Update proxy.mts
Jason3S Mar 11, 2026
88466c7
Add tests
Jason3S Mar 11, 2026
3c38edd
sort string table by refcount
Jason3S Mar 11, 2026
5d5c763
Try splitting into tokens/
Jason3S Mar 11, 2026
92259e6
Merge branch 'main' into dev-flatten
Jason3S Mar 11, 2026
236bfee
v2 always uses a string table
Jason3S Mar 12, 2026
ae4df7a
Work towards element reuse.
Jason3S Mar 13, 2026
ced48b2
refactor
Jason3S Mar 13, 2026
f7ccd55
Keep track of references
Jason3S Mar 16, 2026
42e76e6
Add more tests
Jason3S Mar 16, 2026
cbdcc75
fix ref counts
Jason3S Mar 16, 2026
ad18fc8
Use a Trie to cache the elements
Jason3S Mar 16, 2026
977ef75
Update Trie.test.mts
Jason3S Mar 19, 2026
69ab69b
keep trace of refs
Jason3S Mar 19, 2026
8f303ea
refactor
Jason3S Mar 20, 2026
a8eb180
Potential fix for pull request finding
Jason3S Mar 20, 2026
bd9b025
Potential fix for pull request finding
Jason3S Mar 20, 2026
990e68f
Update stringTable.mts
Jason3S Mar 20, 2026
c2ea920
Update WeakCache.test.mts
Jason3S Mar 20, 2026
e16dc42
Merge branch 'main' into dev-flatten
Jason3S Mar 20, 2026
6caa8d5
A bit of refactoring
Jason3S Mar 20, 2026
ac80a4e
Merge branch 'main' into dev-flatten
Jason3S Mar 20, 2026
457169f
step 1
Jason3S Mar 20, 2026
5dadfbe
step 2
Jason3S Mar 21, 2026
d765d41
fix reuse
Jason3S Mar 22, 2026
f9dd297
clean up
Jason3S Mar 22, 2026
aab7749
Update tests
Jason3S Mar 22, 2026
0a1157d
reuse object keys / values
Jason3S Mar 22, 2026
1d12796
Merge branch 'main' into dev-flatten
Jason3S Mar 22, 2026
8f432f6
Add more tests
Jason3S Mar 23, 2026
4b29a80
Work on better reuse.
Jason3S Mar 23, 2026
6240d7a
improve reuse
Jason3S Mar 23, 2026
68418fd
default to V2
Jason3S Mar 23, 2026
cc256e3
Use v2
Jason3S Mar 23, 2026
37c48e9
Update index.test.mts
Jason3S Mar 23, 2026
0db28aa
adjust name
Jason3S Mar 23, 2026
9511cc8
fix build
Jason3S Mar 23, 2026
f867167
Merge branch 'main' into dev-flatten
Jason3S Mar 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ CHANGELOG.md
examples/release-notes.md
**/cspell-cache-flatpack.json
**/cspell-cache-flatted.json
**/.npm*.json
coverage
**/*.schema.json
integration-tests/config/config.json
Expand Down
6 changes: 3 additions & 3 deletions packages/cspell-normalize-json/src/index.test.mts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { readFile } from 'node:fs/promises';
import { findMatchingFileTypes } from '@cspell/filetypes';
import { describe, expect, test } from 'vitest';

import { fromJSON, toJSON } from './index.ts';
import { fromJSON, toJSON } from './index.js';

const urlFileList = new URL('../fixtures/fileList.txt', import.meta.url);

Expand Down Expand Up @@ -63,7 +63,7 @@ describe('dehydrate', async () => {
${[1n, 2n, 1n, 2n, biMaxSafe, -biMaxSafe, biMaxSafe + 1n, -biMaxSafe - 1n]} | ${undefined}
${[Object(1n), Object('hello'), Object(/\w+/g), Object(null), Object([]), Object('hello')]} | ${undefined}
`('dehydrate $data $options', ({ data, options }) => {
const v = toJSON(data, { dedupe: options?.dedupe });
const v = toJSON(data, { dedupe: options?.dedupe, format: 'V1' });
expect(v).toMatchSnapshot();
expect(fromJSON(v)).toEqual(data);
expect(fromJSON(JSON.parse(JSON.stringify(v)))).toEqual(data);
Expand All @@ -74,7 +74,7 @@ describe('dehydrate', async () => {
${'fileList'} | ${await sampleFileList()} | ${undefined}
${'fileObjects'} | ${await sampleFileListObjects()} | ${undefined}
`('dehydrate $data $options', async ({ name, data, options }) => {
const v = toJSON(data, { dedupe: options?.dedupe });
const v = toJSON(data, { dedupe: options?.dedupe, format: 'V1' });
await expect(v).toMatchFileSnapshot(`__snapshots__/${name}.jsonc`);
await expect(JSON.stringify(v) + '\n').toMatchFileSnapshot(`__snapshots__/${name}.json`);
await expect(JSON.stringify(data) + '\n').toMatchFileSnapshot(`__snapshots__/${name}.data.json`);
Expand Down
36,873 changes: 36,873 additions & 0 deletions packages/flatpack-json/fixtures/.npm-packages-info-v1.json

Large diffs are not rendered by default.

36,899 changes: 36,899 additions & 0 deletions packages/flatpack-json/fixtures/.npm-packages-info-v1a.json

Large diffs are not rendered by default.

12,130 changes: 12,130 additions & 0 deletions packages/flatpack-json/fixtures/.npm-packages-info-v2.json

Large diffs are not rendered by default.

Loading
Loading