Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sqlite.org/sqlite-wasm

Package Overview
Dependencies
Maintainers
2
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sqlite.org/sqlite-wasm - npm Package Compare versions

Comparing version 3.44.2-build2 to 3.44.2-build3

sqlite-wasm/jswasm/sqlite3-bundler-friendly.mjs

23

bin/index.js
import fs from 'fs';
import fetch from 'node-fetch';
import * as cheerio from 'cheerio';
import decompress from 'decompress';

@@ -9,5 +8,12 @@

const html = await response.text();
const $ = cheerio.load(html);
const fileName = $('a[name="wasm"]').closest('tr').next().find('a').text();
const sqliteWasmLink = `https://sqlite.org/${new Date().getFullYear()}/${fileName}`;
const sqliteWasmLink =
'https://sqlite.org/' +
html
.replace(
/^.*?<!-- Download product data for scripts to read(.*?)-->.*?$/gms,
'$1',
)
.split(/\n/)
.filter((row) => /sqlite-wasm/.test(row))[0]
.split(/,/)[2];
console.log(`Found SQLite Wasm download link: ${sqliteWasmLink}`);

@@ -23,2 +29,7 @@ return sqliteWasmLink;

const response = await fetch(sqliteWasmDownloadLink);
if (!response.ok || response.status !== 200) {
throw new Error(
`Unable to download SQLite Wasm from ${sqliteWasmDownloadLink}`,
);
}
const buffer = await response.arrayBuffer();

@@ -40,5 +51,5 @@ fs.writeFileSync('sqlite-wasm.zip', Buffer.from(buffer));

async function main() {
const sqliteWasmLink = await getSqliteWasmDownloadLink();
await downloadAndUnzipSqliteWasm(sqliteWasmLink);
try {
const sqliteWasmLink = await getSqliteWasmDownloadLink();
await downloadAndUnzipSqliteWasm(sqliteWasmLink);
fs.copyFileSync(

@@ -45,0 +56,0 @@ './node_modules/module-workers-polyfill/module-workers-polyfill.min.js',

{
"name": "@sqlite.org/sqlite-wasm",
"version": "3.44.2-build2",
"version": "3.44.2-build3",
"description": "SQLite Wasm conveniently wrapped as an ES Module.",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc