Hi, I am Sakina.
- ๐ฐ Iโm a web developer who follow my heart
- ๐ Iโm current learning
React
,Vue.js
- ๐ธ Programming with love
ES module parser powered by Rust ( compat. with es-module-lexer )
License: MIT License
I'm looking at running rs-module-lexer
inside an edge function, but noticed that there doesn't seem to be a wasm variant available. I can only find native binaries.
Add a wasm build of rs-module-lexer
No response
No response
I believe this may just need errors to be cast to napi::Error.
Given the following example:
import {parse} from 'rs-module-lexer';
try {
parse({
input: [{
filename: 'x.jsx',
code: '(``<div />)'
}]
});
} catch (err) {
// never runs
}
Node exits with a Rust panic message:
node
> const{parse} = require('rs-module-lexer');
... try {
... parse({
... input: [{
... filename: 'x.jsx',
... code: '(``<div />)'
... }]
... });
... } catch (err) {
... // never runs
... }
thread '<unnamed>' panicked at crates/core/src/parser.rs:52:40:
failed to parse module: Error { error: (Span { lo: BytePos(11), hi: BytePos(12), ctxt: #0 }, TS1109) }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
zsh: IOT instruction (core dumped) node
parse({input:[{filename:'x.jsx',code:'(``
System:
OS: Linux 6.2 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
CPU: (8) x64 Intel(R) Xeon(R) CPU @ 2.60GHz
Memory: 31.45 GB / 62.79 GB
Container: Yes
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.2.3 - ~/.nvm/versions/node/v20.10.0/bin/npm
Watchman: 4.9.0 - /usr/bin/watchman
yarn
It looks like the facade
property does not match the output of es-module-lexer
. Is that intentional?
I noticed tests for facade are disabled in equal.ts
.
https://runkit.com/iamnathanj/runkit-npm-rs-module-lexer
System:
OS: macOS 13.5.2
CPU: (8) arm64 Apple M1 Pro
Memory: 232.45 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 16.12.0 - ~/.nvm/versions/node/v16.12.0/bin/node
Yarn: 1.22.18 - ~/.nvm/versions/node/v16.12.0/bin/yarn
npm: 8.1.0 - ~/.nvm/versions/node/v16.12.0/bin/npm
Browsers:
Chrome: 118.0.5993.117
Safari: 16.6
Safari Technology Preview: 17.0
npm
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.