Git Product home page Git Product logo

path-loader's People

Contributors

brettz9 avatar gitter-badger avatar hansottowirtz avatar whitlockjc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

path-loader's Issues

SyntaxError: Unexpected token ... on version 1.0.11

Your patch version update is actually a major version upgrade since you have bumped superagent dependency from 3.8.3 to 7.1.6.
And superagent has this upgrade on its dependency:

formidable@1.2.6 -> formidable@2.0.1

Which now on my version of node hits the following error:

formidable/src/index.js:27
  ...parsers,
  ^^^
SyntaxError: Unexpected token ...

Testing labels (processContent and non-JSON)

At https://github.com/whitlockjc/path-loader/blob/master/test/test-loaders-browser.js#L121 , I see "should support non-JSON with options.processContent" as a condition, though the file indicated is actually JSON and there is no inclusion of options.processContent. Similarly at https://github.com/whitlockjc/path-loader/blob/master/test/test-loaders-node.js#L164 (and https://github.com/whitlockjc/path-loader/blob/master/test/test-loaders-node.js#L100 there is a non-JSON file but it also has no options.processContent).

JsDoc comment for load function is incorrect

API documentation for load method lists location parameter to be of type module:path-loader~LoadOptions instead of string and does not specify options as a parameter at all.

Engine version change should be a major change

This repository is a nested dependency of my project. The latest version (1.0.11) added the node v14 engine as mandatory (it wasn't even defined before). My project uses node v12 and the pipeline broke due to this change. Any engine update should be done on a major, so everyone that directly depends on it could test it. Please, deprecate the latest tag and release it as a major (if node engine 14 is really necessary).

"node": ">=14.0.0"

Avoid superagent method warning

From this code:

// buffer() is only available in Node.js
if (typeof req.buffer === 'function') {
req.buffer(true);
}

...there actually still is always a warning in the browser because:

https://github.com/visionmedia/superagent/blob/ec987f6f154de764435da2f5cbd88a3a85d1fb7f/lib/client.js#L631-L635

...contains a stub for this method.

I think the warning could be avoided by checking for window and self (as superagent does in the beginning of that same file:

https://github.com/visionmedia/superagent/blob/ec987f6f154de764435da2f5cbd88a3a85d1fb7f/lib/client.js#L6-L13

...and if neither is present, only then do the check to run the buffer method...

Would be nice to implement a cache

It would be nice to have a clearable cache so that multiple loads of the same path do not duplicate efforts. Might even make sense to allow for disabling cache via an option.

Deploy changes to npm?

Would you be able to deploy the changes that have been made to the npm registry? The version that exists in the npm registry is missing any updates from the last 2 years that have been made, including security vulnerabilities (such as the older version of jQuery).

You'll likely need to bump your package version for it to be deployed.

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.