Giter Site home page Giter Site logo

rs-module-lexer's Introduction

About me

Hi, I am Sakina.

  • ๐Ÿฐ Iโ€™m a web developer who follow my heart
  • ๐ŸŒˆ Iโ€™m current learning React, Vue.js
  • ๐ŸŒธ Programming with love

rs-module-lexer's People

Contributors

developit avatar fz6m avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

developit

rs-module-lexer's Issues

Wasm build

Clear and concise description of the problem

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.

Suggested solution

Add a wasm build of rs-module-lexer

Alternative

No response

Additional context

No response

Validations

  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Syntax Errors cause panic that can't be caught in JS

Describe the bug

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

Reproduction

parse({input:[{filename:'x.jsx',code:'(``

)'}]})

System Info

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

Used Package Manager

yarn

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

facade doesn't match es-module-lexer

Describe the bug

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.

Reproduction

https://runkit.com/iamnathanj/runkit-npm-rs-module-lexer

System Info

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

Used Package Manager

npm

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.