Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Chore] Update fork #13

Closed
wants to merge 297 commits into from
Closed
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
297 commits
Select commit Hold shift + click to select a range
c1fb01d
Code polishing.
shoestringresearch Jan 11, 2024
9f9b001
Handle int64_t arguments in TestVFS.
shoestringresearch Jan 11, 2024
b5c65d6
Change relay names to include added key argument(s).
shoestringresearch Jan 12, 2024
30bf4b8
Use macro to simplify relay declaration.
shoestringresearch Jan 12, 2024
0d831af
Improve async method handling.
shoestringresearch Jan 12, 2024
6e8f9b4
Rework VFS.Base and create FacadeVFS.
shoestringresearch Jan 12, 2024
2421a75
Pass sqlite3_free address to JavaScript.
shoestringresearch Jan 12, 2024
b1f2efc
Improve legalization handling.
shoestringresearch Jan 12, 2024
eefca58
Allow API use.
shoestringresearch Jan 12, 2024
98e65e6
Add MemoryAsyncVFS.
shoestringresearch Jan 12, 2024
2d79f3e
Rename locking argument.
shoestringresearch Jan 12, 2024
c121705
Remove libadapters.c debugging printf.
shoestringresearch Jan 12, 2024
299b5da
Code polishing.
shoestringresearch Jan 12, 2024
d39f338
Rename arguments.
shoestringresearch Jan 12, 2024
f2a8cf8
Parse URI search params in FacadeVFS.
shoestringresearch Jan 13, 2024
169b3d8
Create OriginPrivateVFS.
shoestringresearch Jan 13, 2024
9e5f9e5
Rewrote main demo.
shoestringresearch Jan 13, 2024
12f10b6
Add exclusive locking mixin.
shoestringresearch Jan 14, 2024
0cd6369
Add WebLocksShared mixin.
shoestringresearch Jan 14, 2024
f8d21e0
Use "build" param in demo-worker.js.
shoestringresearch Jan 14, 2024
a350256
Report config in demo.
shoestringresearch Jan 14, 2024
8578eda
Add isAsync argument to adapters_support().
shoestringresearch Jan 14, 2024
c244de9
Reimplement benchmarks page.
shoestringresearch Jan 14, 2024
da5e1d4
Check in builds.
shoestringresearch Jan 14, 2024
8d35055
Use build=asyncify in demos.
shoestringresearch Jan 14, 2024
5b653c7
Add static create() to VFS classes.
shoestringresearch Jan 14, 2024
38a48da
Add WebLocksSingleContextMixin.
shoestringresearch Jan 14, 2024
869bc1d
Remove obsolete source files.
shoestringresearch Jan 14, 2024
600ceb5
Install @web/test-runner.
shoestringresearch Jan 17, 2024
2bc9688
Updates for VSCode checks.
shoestringresearch Jan 17, 2024
5df57f2
Update typedoc.
shoestringresearch Jan 19, 2024
b555780
Create test framework.
shoestringresearch Jan 19, 2024
453e7ce
Implement API tests.
shoestringresearch Jan 20, 2024
55e153c
Create TestContext class.
shoestringresearch Jan 20, 2024
e468e26
Add better JSPI detection.
shoestringresearch Jan 20, 2024
0593169
Merge branch 'dev-retire-karma' into dev
shoestringresearch Jan 20, 2024
69f7f84
Update ci.yml
rhashimoto Jan 20, 2024
b5bc859
Update ci.yml.
shoestringresearch Jan 20, 2024
7e979a8
Add low-level prepare test.
shoestringresearch Jan 20, 2024
b20c90c
Enable JSPI in the test browser launcher.
shoestringresearch Jan 20, 2024
226f404
Update WASM builds with EMSDK 3.1.47.
shoestringresearch Jan 21, 2024
e81c533
Add tests for miscellaneous functions.
shoestringresearch Jan 21, 2024
0cb7a2d
Handle NoModificationAllowedError in test-worker.
shoestringresearch Jan 21, 2024
1bf2d40
Add SQL tests.
shoestringresearch Jan 21, 2024
f70d410
Add exclusive lock to test-worker.
shoestringresearch Jan 21, 2024
3dc3270
Use test-runner concurrency instead of lock.
shoestringresearch Jan 21, 2024
6ddd790
Clear IndexedDB for tests.
shoestringresearch Jan 21, 2024
a320dee
Create VFS tests.
shoestringresearch Jan 21, 2024
e2a160b
Add OriginPrivateVFS tests.
shoestringresearch Jan 21, 2024
520787a
Implement IDBBatchAtomicVFS.
shoestringresearch Jan 21, 2024
6aa8f36
Export more source files.
shoestringresearch Jan 30, 2024
e093402
Add obfuscated FLOOR VFS.
shoestringresearch Jan 30, 2024
c8a0fde
Multiple connection fallback for OriginPrivateVFS.
shoestringresearch Jan 30, 2024
e58654f
Add VFS comparison chart.
shoestringresearch Jan 31, 2024
4854da5
Bump CI Chrome version to 121.
shoestringresearch Jan 31, 2024
1cd7c45
Reset demo-worker in first instance only.
shoestringresearch Jan 31, 2024
ca82e28
Update FLOOR.
shoestringresearch Jan 31, 2024
d6e19ce
Restrict OriginPrivateVFS journal mode.
shoestringresearch Jan 31, 2024
ab37145
Cleanup.
shoestringresearch Jan 31, 2024
3a4fcf2
Update FLOOR.
shoestringresearch Jan 31, 2024
4eca6c9
Update README.md
rhashimoto Jan 31, 2024
895aee7
Create basic AccessHandlePoolVFS.
shoestringresearch Jan 31, 2024
ae411b5
Add AccessHandlePoolVFS tests.
shoestringresearch Jan 31, 2024
81a0dc6
Update README.md
rhashimoto Jan 31, 2024
a1d0401
Truncate "deleted" AccessHandlePoolVFS files.
shoestringresearch Feb 2, 2024
97f9a5f
Work around Chrome directory name bug.
shoestringresearch Feb 2, 2024
d7e5568
Improve demo-worker.js searchParams configurability.
shoestringresearch Feb 2, 2024
bacb22f
Add AccessHandlePoolVFS.createPersistentDatabaseFile().
shoestringresearch Feb 3, 2024
0b6e9b8
Remove open flags from IndexedDB metadata.
shoestringresearch Feb 3, 2024
abc672b
Upgrade old IDBBatchAtomicVFS databases.
shoestringresearch Feb 3, 2024
1d3ffbc
AccessHandlePoolVFS doesn't need to pre-create a -floor file.
shoestringresearch Feb 3, 2024
0201e02
Update FLOOR.
shoestringresearch Feb 3, 2024
ea22a3f
Implement create_function().
shoestringresearch Feb 4, 2024
4366731
Update doc.
shoestringresearch Feb 4, 2024
587a5af
Refactor callbacks to separate .c/.js files.
shoestringresearch Feb 4, 2024
4eaa8b2
Add progress handler.
shoestringresearch Feb 4, 2024
9a63f61
Wrap libvfs.js and libfunction.js in IIFE.
shoestringresearch Feb 4, 2024
1935205
Add libauthorizer.{c,js}.
shoestringresearch Feb 4, 2024
649ac77
Minor cleanup.
shoestringresearch Feb 4, 2024
d5c471a
Guarantee freeing open_v2() filename.
shoestringresearch Feb 7, 2024
2d6ab41
Rewrite statements() convenience function.
shoestringresearch Feb 7, 2024
c0e4550
Remove str and prepare_v2 functions.
shoestringresearch Feb 7, 2024
22eb7d4
Add options argument to statements().
shoestringresearch Feb 7, 2024
3697ae3
Fix statements() for WebAssembly memory growth.
shoestringresearch Feb 7, 2024
dbe7f14
Change statements() encoding back to UTF-8.
shoestringresearch Feb 7, 2024
c20cf28
Reimplement createUTF8() with TextEncoder.
shoestringresearch Feb 7, 2024
7efcc9b
Add contention demo.
shoestringresearch Feb 10, 2024
a757d82
Remove obsolete demos.
shoestringresearch Feb 10, 2024
507eda5
Update file demo.
shoestringresearch Feb 10, 2024
a4dc38b
Minor type fix.
shoestringresearch Feb 10, 2024
8e4eabc
Tweak contention demo.
shoestringresearch Feb 10, 2024
6e9a0e0
Switch IDBBatchAtomicVFS to WebLocksShared.
shoestringresearch Feb 11, 2024
09d7dbb
Reimplement AccessHandlePoolVFS with retry ops.
shoestringresearch Feb 16, 2024
b6fa913
Remove task release from contention worker.
shoestringresearch Feb 17, 2024
6423caf
Tweaks for AccessHandlePoolVFS.
shoestringresearch Feb 17, 2024
69c95bc
Fix OriginPrivateVFS race.
shoestringresearch Feb 17, 2024
dd42596
Restore WebLocksShared on OriginPrivateVFS.
shoestringresearch Feb 18, 2024
b5ee4ec
Improve UnsafeHandlePoolVFS logging.
shoestringresearch Feb 18, 2024
16bae9f
Remove AccessHandlePoolVFS unnecessary state.
shoestringresearch Feb 18, 2024
783c99e
Update IDBBatchAtomicVFS logging.
shoestringresearch Feb 18, 2024
a4e614e
Update README.md
rhashimoto Feb 18, 2024
68cfe9f
Checkpoint for PermutedVFS.
shoestringresearch Feb 20, 2024
e32c145
Reclaim unused offsets.
shoestringresearch Feb 21, 2024
d38e2b2
Add PermutedVFS to contention demo.
shoestringresearch Feb 21, 2024
e93764b
Refactor pending and reclaiming processing.
shoestringresearch Feb 21, 2024
c9cd240
Fix contention demo race condition bugs.
shoestringresearch Feb 21, 2024
7a78f5b
Update FLOOR.
shoestringresearch Feb 29, 2024
1be3b46
Add flush to PermutedVFS.
shoestringresearch Feb 29, 2024
a4c3651
Abandon PermutedVFS for now.
shoestringresearch Apr 2, 2024
f85ba74
Attempt to fix GitHub Actions.
shoestringresearch Apr 2, 2024
17ec15f
Rename to OPFSCoopSyncVFS.
shoestringresearch May 1, 2024
d91d5eb
Port the original AccessHandlePoolVFS.
shoestringresearch May 2, 2024
071e865
Add AccessHandlePoolVFS tests.
shoestringresearch May 2, 2024
f91cd7b
Update dependencies per dependabot.
shoestringresearch May 2, 2024
70931a9
Merge pull request #170 from rhashimoto/dependabot
rhashimoto May 2, 2024
0549208
Merge branch 'master' into dev
shoestringresearch May 2, 2024
92f2694
Update README.md
rhashimoto May 2, 2024
d68f66f
Change GitHub Actions CI to node 20.
shoestringresearch May 2, 2024
9d5e3a2
Rework TestContext usage.
shoestringresearch May 3, 2024
98e8269
Add crash recovery test.
shoestringresearch May 3, 2024
d3ebdf4
Remove module (vtable) API.
shoestringresearch May 3, 2024
fcd8bec
Remove unused debugging code.
shoestringresearch May 3, 2024
66f2f0f
Add unscoped statement test.
shoestringresearch May 3, 2024
7af7dc4
Add create_function() tests.
shoestringresearch May 3, 2024
27f6779
Add MemoryAsyncVFS test.
shoestringresearch May 4, 2024
6321d75
Test VFS short read.
shoestringresearch May 4, 2024
013eb6f
Improve delete on close test.
shoestringresearch May 4, 2024
7014ec7
Add contention test.
shoestringresearch May 4, 2024
f5b5ca4
Update README.md
rhashimoto May 4, 2024
f65fb1b
Remove UnsafeHandlePoolVFS.
shoestringresearch May 4, 2024
8f8ce16
Remove AHP contention demo.
shoestringresearch May 4, 2024
8957f5a
Fix hello demo.
shoestringresearch May 4, 2024
ab910f4
Update README.md
rhashimoto May 4, 2024
e22a6ee
Update README.md
rhashimoto May 5, 2024
a3930bf
Restrict journal_mode accepted settings.
shoestringresearch May 5, 2024
942f89f
Rename OriginPrivateVFS to OPFSAdaptiveVFS.
shoestringresearch May 5, 2024
c75a4b3
Fix create_function asynchronous test.
shoestringresearch May 5, 2024
ccba448
Test callbacks on Asyncify and JSPI builds.
shoestringresearch May 5, 2024
8f13d97
Add progress handler test.
shoestringresearch May 5, 2024
9dfdda2
Fix set_authorizer() with async function.
shoestringresearch May 5, 2024
bac53b4
Removed unused directory reference.
shoestringresearch May 5, 2024
956462b
Fix libprogress_progress_handler return type.
shoestringresearch May 5, 2024
6b45afc
Update minimum EMSDK version.
shoestringresearch May 5, 2024
95c6d7c
Rework WebLocksMixin.
shoestringresearch May 10, 2024
760cd55
Rename method FacadeVFS.getFilename().
shoestringresearch May 10, 2024
ef70abd
Add option for IDBBatchAtomicVFS IndexedDB name.
shoestringresearch May 10, 2024
c6b8bd2
Add WebLocksMixin tests.
shoestringresearch May 10, 2024
ff4c9e1
Update web-test-runner-jasmine.
shoestringresearch May 10, 2024
d1ef697
Prepare for write transaction hints.
shoestringresearch May 10, 2024
c352775
Implement "shared+hint" locking with PRAGMA write_hint.
shoestringresearch May 11, 2024
9341282
Fix IDBBatchAtomicVFS synchronization bug.
shoestringresearch May 12, 2024
e669da9
Checkpoint for write_hint demo.
shoestringresearch May 12, 2024
55748b8
Create OPFSPermutedVFS.
shoestringresearch May 18, 2024
be729ff
Implement OPFSPermutedVFS VACUUM.
shoestringresearch May 18, 2024
7abd2f2
Fix OPFSPermutedVFS off-by-1 bug.
shoestringresearch May 19, 2024
5a29f03
Add OPFSPermutedVFS checksums.
shoestringresearch May 19, 2024
f6c84a1
Add OPFSPermutedVFS flush PRAGMAs.
shoestringresearch May 19, 2024
6303fd4
Fix OPFSPermutedVFS pageSize initialization.
shoestringresearch May 19, 2024
c7c2600
Add OPFSPermutedVFS tests.
shoestringresearch May 19, 2024
ad0c0ba
Fix example imports for demos.
shoestringresearch May 19, 2024
3ef2756
Add OPFSPermutedVFS to API tests.
shoestringresearch May 19, 2024
3f6a633
Fix OPFSPermutedVFS zero pageSize bug.
shoestringresearch May 19, 2024
29ec532
Fix OPFSPermutedVFS VACUUM file truncation.
shoestringresearch May 19, 2024
69549ee
Fix OPFSPermutedVFS consistency checks.
shoestringresearch May 19, 2024
4a42d8c
Optimize OPFSPermutedVFS IDB transactions.
shoestringresearch May 20, 2024
09820b8
Fix OPFSPermutedVFS free list initialization.
shoestringresearch May 21, 2024
031a00e
Improve OPFSPermutedVFS.#prepareOverwrite() performance.
shoestringresearch May 21, 2024
4b47b2e
Remove FLOOR.
shoestringresearch May 21, 2024
b9da74f
Update README.md
rhashimoto May 21, 2024
5420dd2
Add WebLocksMixin shared+hint tests.
shoestringresearch May 22, 2024
23acef9
Use write hint in OPFSPermutedVFS.
shoestringresearch May 23, 2024
518be94
Limit OPFSPermutedVFS calls to getSize().
shoestringresearch May 23, 2024
a287839
Add OPFSPermutedVFS synchronous setting.
shoestringresearch May 24, 2024
b4dcd3e
Code polishing.
shoestringresearch May 25, 2024
8224660
Bump package version.
shoestringresearch May 25, 2024
eb6e625
Merge pull request #174 from rhashimoto/merge-dev
rhashimoto May 26, 2024
12d5c0d
Improve hello demo.
shoestringresearch May 26, 2024
0968478
Update README.md
rhashimoto May 26, 2024
5666020
Merge pull request #175 from rhashimoto/hello-demo
rhashimoto May 26, 2024
477c331
Update README.md
rhashimoto May 26, 2024
8b4be5e
Update dependencies per dependabot.
shoestringresearch May 26, 2024
4dc6a19
Merge pull request #176 from rhashimoto/dependabot
rhashimoto May 26, 2024
bf27888
Update README.md
rhashimoto May 27, 2024
0845f27
Move hello demo to its own directory.
shoestringresearch May 27, 2024
c02a70d
Update README.md
rhashimoto May 27, 2024
bcf51ad
Merge pull request #177 from rhashimoto/move-hello
rhashimoto May 28, 2024
65e27b0
Update README.md
rhashimoto May 28, 2024
f7a1cc4
Merge pull request #178 from rhashimoto/move-hello
rhashimoto May 28, 2024
2511b98
Fix hello for GitHub Pages.
shoestringresearch May 28, 2024
1af11e6
Merge pull request #179 from rhashimoto/fix-hello
rhashimoto May 28, 2024
ac2a9b5
Output HTML tables in hello demo.
shoestringresearch May 28, 2024
7975871
Merge pull request #180 from rhashimoto/hello-tables
rhashimoto May 28, 2024
eee23f5
remove sql_0001
AlexErrant May 29, 2024
a6d71b9
Merge pull request #181 from AlexErrant/remove-sql_0001
rhashimoto May 29, 2024
de2fa2b
Update README.md
rhashimoto May 29, 2024
a16ed34
Add IDBBatchAtomicVFS version upgrade test.
shoestringresearch Jun 1, 2024
73cc8ac
Remove obsolete tests.
shoestringresearch Jun 1, 2024
3ddeca1
Remove unused package dependency.
shoestringresearch Jun 2, 2024
7aabd2f
Improve IDBBatchAtomicVFS update test data.
shoestringresearch Jun 2, 2024
90047fd
Update README.md
rhashimoto Jun 3, 2024
456ca21
Remove obsolete karma configuration file.
shoestringresearch Jun 3, 2024
0842353
Update README.md
rhashimoto Jun 5, 2024
f5a2f44
Update README.md
rhashimoto Jun 5, 2024
304dba3
Fix WebLocksMixin.jCheckReservedLock bug.
shoestringresearch Jun 8, 2024
a05f863
Merge pull request #182 from rhashimoto/WebLocksMixin-bug
rhashimoto Jun 8, 2024
c3a81a1
Add OPFSAnyContextVFS.
shoestringresearch Jun 11, 2024
d248b79
Update README.md
rhashimoto Jun 11, 2024
2f7b024
Add OPFSAnyContextVFS to hello demo.
shoestringresearch Jun 11, 2024
8d7eda9
Merge pull request #183 from rhashimoto/OPFSAnyContextVFS
rhashimoto Jun 11, 2024
0df7366
Update README.md
rhashimoto Jun 13, 2024
7c6a438
Add JSPI feature detection credit comment.
shoestringresearch Jun 16, 2024
44cc640
Upgrade SQLite to 3.46.0.
shoestringresearch Jun 16, 2024
5c36915
Merge pull request #185 from rhashimoto/sqlite-3.46.0
rhashimoto Jun 16, 2024
c451743
Update package version.
shoestringresearch Jun 16, 2024
2f0163f
Create IDBMirrorVFS.
shoestringresearch Jun 18, 2024
ddd82eb
Merge pull request #188 from rhashimoto/IDBMirrorVFS
rhashimoto Jun 29, 2024
3ccf9d8
Avoid IndexedDB name conflict in demo.
shoestringresearch Jun 29, 2024
1508eae
Updates per dependabot.
shoestringresearch Jun 29, 2024
82b7dc0
Merge pull request #190 from rhashimoto/dependabot
rhashimoto Jun 29, 2024
ec56366
More dependabot updates.
shoestringresearch Jun 29, 2024
230c4c5
Merge pull request #191 from rhashimoto/dependabot
rhashimoto Jun 29, 2024
6b411ef
Update README.md
rhashimoto Jun 29, 2024
7a99adc
Update README.md
rhashimoto Jun 29, 2024
61b4298
Fix #192. Incorrect package.json.
shoestringresearch Jun 30, 2024
8193d40
Merge pull request #193 from rhashimoto/package
rhashimoto Jun 30, 2024
6e74c76
Set package version to 1.0.0.
shoestringresearch Jul 5, 2024
55bf0b6
Merge pull request #194 from rhashimoto/release-1.0.0
rhashimoto Jul 6, 2024
100eea7
Update README.md
rhashimoto Jul 18, 2024
e635e31
Add IDBMirrorVFS to hello demo.
shoestringresearch Jul 23, 2024
f1ab3d5
Merge pull request #195 from rhashimoto/update-hello-demo
rhashimoto Jul 23, 2024
bfd23c5
Defer IDBMirrorVFS and OPFSPermutedVFS broadcasts.
shoestringresearch Jul 26, 2024
7722688
Merge pull request #197 from rhashimoto/sync-broadcast
rhashimoto Jul 26, 2024
3d5aa74
Update README.md
rhashimoto Jul 26, 2024
001852b
Fix #187. Add clear_bindings().
shoestringresearch Jul 26, 2024
5fef539
Merge pull request #198 from rhashimoto/clear-bindings
rhashimoto Jul 26, 2024
fc5c264
Update package.json
rhashimoto Jul 28, 2024
f5092b5
Merge pull request #199 from rhashimoto/increment-version
rhashimoto Jul 29, 2024
b1cf757
Bump @75lb/deep-merge from 1.1.1 to 1.1.2
dependabot[bot] Aug 15, 2024
160e2fb
Merge pull request #203 from rhashimoto/dependabot/npm_and_yarn/75lb/…
rhashimoto Aug 15, 2024
2578a2f
chore: update from upstream
stevensJourney Sep 5, 2024
0af8134
chore: re-add table changes
stevensJourney Sep 5, 2024
351ba93
wip
stevensJourney Sep 5, 2024
de00ff0
wip
stevensJourney Sep 5, 2024
f0d4148
update makefile
stevensJourney Sep 5, 2024
55ee81d
update types
stevensJourney Sep 5, 2024
8573556
update core version
stevensJourney Sep 5, 2024
187d9cd
added changeset
stevensJourney Sep 5, 2024
df52bc1
better building on macos
stevensJourney Sep 5, 2024
24ec2c9
use node 20
stevensJourney Sep 5, 2024
2997cf2
restore last insert id method
stevensJourney Sep 5, 2024
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
24 changes: 18 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,35 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"

- uses: browser-actions/setup-chrome@v1
id: setup-chrome
with:
chrome-version: 121
- run: |
${{ steps.setup-chrome.outputs.chrome-path }} --version

- name: Rust Setup
run: |
rustup toolchain install nightly-2023-08-28-x86_64-unknown-linux-gnu
rustup component add rust-src --toolchain nightly-2023-08-28-x86_64-unknown-linux-gnu

# Install yarn dependencies.
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
Expand All @@ -49,12 +61,12 @@ jobs:
rustup component add rust-src --toolchain nightly-2024-05-18-x86_64-unknown-linux-gnu

- name: Test with checked-in WASM files
run: yarn test --reporters progress
run: yarn test

# Install EMSDK
- name: Setup Emscripten
id: cache-system-libraries
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{env.EM_CACHE_FOLDER}}
key: ${{env.EM_VERSION}}-${{ runner.os }}
Expand All @@ -67,4 +79,4 @@ jobs:
- name: Test WASM build
run: |
make clean && make
yarn test --reporters progress
yarn test
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@
/debug
/deps
/tmp

/dist-xl.zip
/dist-xl
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"arcanis.vscode-zipfs"
]
}
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"search.exclude": {
"**/.yarn": true,
"**/.pnp.*": true
},
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
}
768 changes: 0 additions & 768 deletions .yarn/releases/yarn-3.1.1.cjs

This file was deleted.

893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.0.2.cjs

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions .yarn/sdks/integrations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This file is automatically generated by @yarnpkg/sdks.
# Manual changes might be lost!

integrations:
- vscode
20 changes: 20 additions & 0 deletions .yarn/sdks/typescript/bin/tsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/bin/tsc
require(absPnpApiPath).setup();
}
}

// Defer to the real typescript/bin/tsc your application uses
module.exports = absRequire(`typescript/bin/tsc`);
20 changes: 20 additions & 0 deletions .yarn/sdks/typescript/bin/tsserver
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/bin/tsserver
require(absPnpApiPath).setup();
}
}

// Defer to the real typescript/bin/tsserver your application uses
module.exports = absRequire(`typescript/bin/tsserver`);
20 changes: 20 additions & 0 deletions .yarn/sdks/typescript/lib/tsc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/tsc.js
require(absPnpApiPath).setup();
}
}

// Defer to the real typescript/lib/tsc.js your application uses
module.exports = absRequire(`typescript/lib/tsc.js`);
225 changes: 225 additions & 0 deletions .yarn/sdks/typescript/lib/tsserver.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

const moduleWrapper = tsserver => {
if (!process.versions.pnp) {
return tsserver;
}

const {isAbsolute} = require(`path`);
const pnpApi = require(`pnpapi`);

const isVirtual = str => str.match(/\/(\$\$virtual|__virtual__)\//);
const isPortal = str => str.startsWith("portal:/");
const normalize = str => str.replace(/\\/g, `/`).replace(/^\/?/, `/`);

const dependencyTreeRoots = new Set(pnpApi.getDependencyTreeRoots().map(locator => {
return `${locator.name}@${locator.reference}`;
}));

// VSCode sends the zip paths to TS using the "zip://" prefix, that TS
// doesn't understand. This layer makes sure to remove the protocol
// before forwarding it to TS, and to add it back on all returned paths.

function toEditorPath(str) {
// We add the `zip:` prefix to both `.zip/` paths and virtual paths
if (isAbsolute(str) && !str.match(/^\^?(zip:|\/zip\/)/) && (str.match(/\.zip\//) || isVirtual(str))) {
// We also take the opportunity to turn virtual paths into physical ones;
// this makes it much easier to work with workspaces that list peer
// dependencies, since otherwise Ctrl+Click would bring us to the virtual
// file instances instead of the real ones.
//
// We only do this to modules owned by the the dependency tree roots.
// This avoids breaking the resolution when jumping inside a vendor
// with peer dep (otherwise jumping into react-dom would show resolution
// errors on react).
//
const resolved = isVirtual(str) ? pnpApi.resolveVirtual(str) : str;
if (resolved) {
const locator = pnpApi.findPackageLocator(resolved);
if (locator && (dependencyTreeRoots.has(`${locator.name}@${locator.reference}`) || isPortal(locator.reference))) {
str = resolved;
}
}

str = normalize(str);

if (str.match(/\.zip\//)) {
switch (hostInfo) {
// Absolute VSCode `Uri.fsPath`s need to start with a slash.
// VSCode only adds it automatically for supported schemes,
// so we have to do it manually for the `zip` scheme.
// The path needs to start with a caret otherwise VSCode doesn't handle the protocol
//
// Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910
//
// 2021-10-08: VSCode changed the format in 1.61.
// Before | ^zip:/c:/foo/bar.zip/package.json
// After | ^/zip//c:/foo/bar.zip/package.json
//
// 2022-04-06: VSCode changed the format in 1.66.
// Before | ^/zip//c:/foo/bar.zip/package.json
// After | ^/zip/c:/foo/bar.zip/package.json
//
// 2022-05-06: VSCode changed the format in 1.68
// Before | ^/zip/c:/foo/bar.zip/package.json
// After | ^/zip//c:/foo/bar.zip/package.json
//
case `vscode <1.61`: {
str = `^zip:${str}`;
} break;

case `vscode <1.66`: {
str = `^/zip/${str}`;
} break;

case `vscode <1.68`: {
str = `^/zip${str}`;
} break;

case `vscode`: {
str = `^/zip/${str}`;
} break;

// To make "go to definition" work,
// We have to resolve the actual file system path from virtual path
// and convert scheme to supported by [vim-rzip](https://github.com/lbrayner/vim-rzip)
case `coc-nvim`: {
str = normalize(resolved).replace(/\.zip\//, `.zip::`);
str = resolve(`zipfile:${str}`);
} break;

// Support neovim native LSP and [typescript-language-server](https://github.com/theia-ide/typescript-language-server)
// We have to resolve the actual file system path from virtual path,
// everything else is up to neovim
case `neovim`: {
str = normalize(resolved).replace(/\.zip\//, `.zip::`);
str = `zipfile://${str}`;
} break;

default: {
str = `zip:${str}`;
} break;
}
} else {
str = str.replace(/^\/?/, process.platform === `win32` ? `` : `/`);
}
}

return str;
}

function fromEditorPath(str) {
switch (hostInfo) {
case `coc-nvim`: {
str = str.replace(/\.zip::/, `.zip/`);
// The path for coc-nvim is in format of /<pwd>/zipfile:/<pwd>/.yarn/...
// So in order to convert it back, we use .* to match all the thing
// before `zipfile:`
return process.platform === `win32`
? str.replace(/^.*zipfile:\//, ``)
: str.replace(/^.*zipfile:/, ``);
} break;

case `neovim`: {
str = str.replace(/\.zip::/, `.zip/`);
// The path for neovim is in format of zipfile:///<pwd>/.yarn/...
return str.replace(/^zipfile:\/\//, ``);
} break;

case `vscode`:
default: {
return str.replace(/^\^?(zip:|\/zip(\/ts-nul-authority)?)\/+/, process.platform === `win32` ? `` : `/`)
} break;
}
}

// Force enable 'allowLocalPluginLoads'
// TypeScript tries to resolve plugins using a path relative to itself
// which doesn't work when using the global cache
// https://github.com/microsoft/TypeScript/blob/1b57a0395e0bff191581c9606aab92832001de62/src/server/project.ts#L2238
// VSCode doesn't want to enable 'allowLocalPluginLoads' due to security concerns but
// TypeScript already does local loads and if this code is running the user trusts the workspace
// https://github.com/microsoft/vscode/issues/45856
const ConfiguredProject = tsserver.server.ConfiguredProject;
const {enablePluginsWithOptions: originalEnablePluginsWithOptions} = ConfiguredProject.prototype;
ConfiguredProject.prototype.enablePluginsWithOptions = function() {
this.projectService.allowLocalPluginLoads = true;
return originalEnablePluginsWithOptions.apply(this, arguments);
};

// And here is the point where we hijack the VSCode <-> TS communications
// by adding ourselves in the middle. We locate everything that looks
// like an absolute path of ours and normalize it.

const Session = tsserver.server.Session;
const {onMessage: originalOnMessage, send: originalSend} = Session.prototype;
let hostInfo = `unknown`;

Object.assign(Session.prototype, {
onMessage(/** @type {string | object} */ message) {
const isStringMessage = typeof message === 'string';
const parsedMessage = isStringMessage ? JSON.parse(message) : message;

if (
parsedMessage != null &&
typeof parsedMessage === `object` &&
parsedMessage.arguments &&
typeof parsedMessage.arguments.hostInfo === `string`
) {
hostInfo = parsedMessage.arguments.hostInfo;
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK) {
const [, major, minor] = (process.env.VSCODE_IPC_HOOK.match(
// The RegExp from https://semver.org/ but without the caret at the start
/(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/
) ?? []).map(Number)

if (major === 1) {
if (minor < 61) {
hostInfo += ` <1.61`;
} else if (minor < 66) {
hostInfo += ` <1.66`;
} else if (minor < 68) {
hostInfo += ` <1.68`;
}
}
}
}

const processedMessageJSON = JSON.stringify(parsedMessage, (key, value) => {
return typeof value === 'string' ? fromEditorPath(value) : value;
});

return originalOnMessage.call(
this,
isStringMessage ? processedMessageJSON : JSON.parse(processedMessageJSON)
);
},

send(/** @type {any} */ msg) {
return originalSend.call(this, JSON.parse(JSON.stringify(msg, (key, value) => {
return typeof value === `string` ? toEditorPath(value) : value;
})));
}
});

return tsserver;
};

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/tsserver.js
require(absPnpApiPath).setup();
}
}

// Defer to the real typescript/lib/tsserver.js your application uses
module.exports = moduleWrapper(absRequire(`typescript/lib/tsserver.js`));
Loading
Loading