Giter Club home page Giter Club logo

browser-unpack's People

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

Watchers

 avatar  avatar  avatar  avatar

browser-unpack's Issues

Fix buffer warning

Could you apply the following patch ?

ommit 8ef945dad2a3c5223bf92f1431c6899380593c29 (HEAD -> patched)
Author: Bastien Roucariès <[email protected]>
Date:   Wed Sep 1 18:51:22 2021 +0000

    Fix buffer deprecation
    
    Replace by correct API
    
    Forwarded

diff --git a/test/multi-byte.js b/test/multi-byte.js
index 7ad4d57..a753098 100644
--- a/test/multi-byte.js
+++ b/test/multi-byte.js
@@ -3,7 +3,7 @@ var unpack = require('../');
 var fs = require('fs');
 
 var src = fs.readFileSync(__dirname + '/files/utf-8.js', 'utf8');
-var buf = new Buffer(src);
+var buf = new Buffer.from(src);
 
 test('multi-byte characters', function (t) {
     t.plan(6);

Merge https://github.com/substack/node-falafel/pull/29

Raising this issue here is probably a total breach of open source etiquette, but I'm doing so as you're a lot more active on this project and the issue on node-falafel has been sitting there for months.

Can you please, please merge https://github.com/substack/node-falafel/pull/29 into falafel and publish a patch. Falafel is a widely used dependency and no-one else can fix the fact that falafel breaks npm shrinkwrap, a serious bug which impacts developers' use of a lot of other npm modules.

The pull request is a very simple update to the package.json which passes Travis CI and shouldn't require much time or effort to review.

Thanks in advance

problem: couldn't parse this bundle

Hi, there :-)

Due to some reasons, I can not leak my js file out for this issue. 😟

Maybe you can give me a little advice about this.

I encounter this error at command line: couldn't parse this bundle, and after that, clone this repo, do debug to find where throw this error, finally, I find this line, it will return when ast.body.length not equal 1, but here is my ast.body(see the picture below)

2017-03-18 10 57 20

There are "ExpressionStatement", "IfStatement" there. Because I know nothing about ast things, but maybe you can give me a advice how to fix this? Thanks in advance.

Depends on acorn

From debian:

Date: Sat, 11 Nov 2023 21:25:14 +0000
Subject: Depend on acorn instead of node-acorn

---
 index.js     | 2 +-
 package.json | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/index.js b/index.js
index bbdd7c1..8656a22 100644
--- a/index.js
+++ b/index.js
@@ -1,4 +1,4 @@
-var parse = require('acorn-node').parse;
+var parse = require('acorn').parse;
 
 module.exports = function (src) {
     // If src is a Buffer, esprima will just stringify it, so we beat them to
diff --git a/package.json b/package.json
index 88165e8..0bc9c70 100644
--- a/package.json
+++ b/package.json
@@ -7,7 +7,7 @@
     "browser-unpack": "bin/cmd.js"
   },
   "dependencies": {
-    "acorn-node": "^1.3.0",
+    "acorn": "^8.3.0",
     "concat-stream": "^1.5.0",
     "minimist": "^1.1.1"
   },

Unable to unpack a Browserify build where one module is replaced with another.

I believe browser-unpack is the cause of smallhelm/unpathify#2

When the code generated in the issue above is run through browser-unpack programmatically, undefined is returned. When the code generated in the issue above is run through the CLI, "couldn't parse this bundle" is printed.

For reference, here is what I'm doing to generate the build to run through unpathify (which in turn uses browser-unpack which returns undefined);

package.json:

{
  "name": "build",
  "dependencies": {
    "lodash": "~2.4.1",
    "backbone": "~1.1.2",
    "browserify": "~4.1.5"
  }
}

client.js:

require('backbone');

build.js:

var browserify = require('browserify');
// Construct browserify bundle with client
var b = browserify();
b.add('./client.js');
// Replace underscore with lodash
b.exclude('underscore');
b.require('lodash', {expose: 'underscore'});
// Bundle and write stream
var fs = require('fs');
b.bundle().pipe(fs.createWriteStream('client.build.js'));

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.