Skip to content

Commit 4a7bb89

Browse files
committed
sqlite 3.49 / emscripten 4 / node 22
the worker scripts are now compatible with nodejs worker threads: https://nodejs.org/api/worker_threads.html the worker tests now use node worker threads instead of a browser removes dependency to puppeteer
1 parent 436a880 commit 4a7bb89

File tree

7 files changed

+828
-1472
lines changed

7 files changed

+828
-1472
lines changed

.devcontainer/Dockerfile

Lines changed: 5 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# We build our DevContainer on MS' Typescript-Node Devcontainer
2-
# This gives us lots of standard stuff, and lets us layer a few custom things on top, like the Emscripten compiler, Puppeteer
2+
# This gives us lots of standard stuff, and lets us layer a few custom things on top, like the Emscripten compiler
33

44
# --------------------------------------------------------------------
55
# BEGIN Standard MS Devcontainer for Typescript-Node
66

77
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.155.1/containers/typescript-node/.devcontainer/base.Dockerfile
88
# [Choice] Node.js version: 14, 12, 10
9-
ARG VARIANT="16-buster"
10-
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT}
9+
ARG VARIANT="22-bullseye"
10+
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:1-${VARIANT}
1111

1212
# [Optional] Uncomment if you want to install an additional version of node using nvm
1313
# ARG EXTRA_NODE_VERSION=10
@@ -24,7 +24,7 @@ FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT}
2424
# Install EMSDK to /emsdk just like the EMSDK Dockerfile: https://github.com/emscripten-core/emsdk/blob/master/docker/Dockerfile
2525
ENV EMSDK /emsdk
2626
# We pin the EMSDK version rather than 'latest' so that everyone is using the same compiler version
27-
ENV EMSCRIPTEN_VERSION 3.1.64
27+
ENV EMSCRIPTEN_VERSION 4.0.5
2828

2929
RUN git clone https://github.com/emscripten-core/emsdk.git $EMSDK
3030

@@ -68,38 +68,4 @@ RUN echo ". /emsdk/emsdk_env.sh" >> /etc/bash.bashrc
6868
RUN echo 'export EM_NODE_JS="$EMSDK_NODE"' >> /etc/bash.bashrc
6969

7070
# END EMSDK
71-
# --------------------------------------------------------------------
72-
73-
# --------------------------------------------------------------------
74-
# BEGIN PUPPETEER dependencies
75-
# Here we install all of the packages depended upon by Chrome (that Puppeteer will use for headless tests).
76-
# We could also take a page from https://github.com/buildkite/docker-puppeteer/blob/master/Dockerfile instead,
77-
# and install the latest stable version of Chrome to get the right dependencies, but that version changes over time,
78-
# so the stable version of Chrome and the version installed by Puppeteer might diverge over time.
79-
# It also means they end up having Chrome downloaded and installed twice.
80-
# We could install the particular version of Chrome that our version of Puppeteer would use and then tell Puppeteer not to download its own version of Chrome,
81-
# but then we'd have to rebuild our Docker container every time we revved Puppeteer, and that feels fiddly too.
82-
# For all of these reasons, it seems safer to simply install the explicit list packages depended upon by Chrome, assume that's unlikely to change
83-
# and move on.
84-
85-
# List taken from:
86-
# https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#chrome-headless-doesnt-launch-on-unix
87-
RUN apt-get update \
88-
&& apt-get install -y wget gnupg \
89-
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
90-
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
91-
&& apt-get update \
92-
&& apt-get install -y google-chrome-stable fonts-freefont-ttf libxss1 libxshmfence1 libglu1 \
93-
--no-install-recommends \
94-
# Installs the command "sha3sum", which is used check the download integrity of sqlite source.
95-
&& apt-get install -y libdigest-sha3-perl \
96-
&& rm -rf /var/lib/apt/lists/*
97-
98-
# We set this env variable (RUN_WORKER_TEST_WITHOUT_PUPPETEER_SANDBOX=1) this to tell our sql.js test harness to run Puppeteer without the sandbox.
99-
# Otherwise, when we instantiate Puppeteer, we get this error:
100-
# Puppeteer can't start due to a sandbox error. (Details follow.)
101-
# [0321/173044.694524:FATAL:zygote_host_impl_linux.cc(117)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux/suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
102-
ENV RUN_WORKER_TEST_WITHOUT_PUPPETEER_SANDBOX=1
103-
104-
# END PUPPETEER
105-
# --------------------------------------------------------------------
71+
# --------------------------------------------------------------------

.devcontainer/devcontainer.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,11 @@
44
"name": "Node.js & TypeScript",
55
"build": {
66
"dockerfile": "Dockerfile",
7-
// Update 'VARIANT' to pick a Node version: 12, 14, 16
7+
// Update 'VARIANT' to pick a Node version
88
"args": {
9-
"VARIANT": "16-buster"
10-
},
9+
"VARIANT": "22-bullseye"
10+
}
1111
},
12-
// Set *default* container specific settings.json values on container create.
13-
"settings": {},
14-
// Add the IDs of extensions you want installed when the container is created.
15-
"extensions": [
16-
"dbaeumer.vscode-eslint"
17-
],
1812
// Use 'forwardPorts' to make a list of ports inside the container available locally.
1913
// "forwardPorts": [],
2014
// Use 'postCreateCommand' to run commands after the container is created.

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
# I got this handy makefile syntax from : https://github.com/mandel59/sqlite-wasm (MIT License) Credited in LICENSE
88
# To use another version of Sqlite, visit https://www.sqlite.org/download.html and copy the appropriate values here:
9-
SQLITE_AMALGAMATION = sqlite-amalgamation-3450200
10-
SQLITE_AMALGAMATION_ZIP_URL = https://www.sqlite.org/2024/sqlite-amalgamation-3450200.zip
11-
SQLITE_AMALGAMATION_ZIP_SHA3 = 8d9c553b52c7b1656a97fec7907cb00fd1419ac45104e45c76b7c2b81ffe0a9d
9+
SQLITE_AMALGAMATION = sqlite-amalgamation-3490100
10+
SQLITE_AMALGAMATION_ZIP_URL = https://sqlite.org/2025/sqlite-amalgamation-3490100.zip
11+
SQLITE_AMALGAMATION_ZIP_SHA3 = e7eb4cfb2d95626e782cfa748f534c74482f2c3c93f13ee828b9187ce05b2da7
1212

1313
# Note that extension-functions.c hasn't been updated since 2010-02-06, so likely doesn't need to be updated
1414
EXTENSION_FUNCTIONS = extension-functions.c

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy