Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Can not be uglify

Open
#228 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript
Domain
databases

Research direction

Start by reproducing the uncompressed and UglifyJS2-compressed snippets using SQLjs.Database, then compare the failure at the SELECT query and the reported “Error: not an error” message. Done means the compressed example runs the SELECT without error and the behavior is documented or covered by an appropriate regression check.

Written by the indexing model from the issue text.

Description

It's working without UglifyJS2. But after uglify, I got an error Error: not an error at selet query line . Is sql.js can't be compressed?

Origin Code

let db = new SQLjs.Database()
try {
  db.run("CREATE TABLE products_2 (product_id int, name char, origin_price int);")
  console.log('getRowsModified()', db.getRowsModified())
  db.each("SELECT * FROM products_2", [], (row) => {
    console.log('tables', row)
  })
}catch(err) {
  console.log('err', err)
}

after compressed

var t=new a.default.Database;try{t.run("CREATE TABLE products_2 (product_id int, name char, origin_price int);"),console.log("getRowsModified()",t.getRowsModified()),t.each("SELECT * FROM products_2",[],function(e){console.log("tables",e)})}catch(e){console.log("err",e)}
Dominant language
JavaScript
Stars
13.7k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sql-js/sql.js

All issues in sql-js/sql.js

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.