Comments (25)
ahh... i think i found a bug on Promise.all that bluebird fixed, hence the need for bluebird. i'll have to investigate a little more on that.
I'd still like to keep bluebird as a devdependency though. its stack traces are super useful.
from pnpm.
the object-assign
makes sense!
actually, i've been thinking on whether it should support legacy node.js versions too... not sure on that. being able to use arrow functions really cleans up the source considerably.
from pnpm.
My $0.02 is to keep the source clean for the moment and use the ES6 features that are available. Could always do a babelified mirror for older versions of node if there's a demand for it.
from pnpm.
actually i can probably do something like this:
{
"prepublish": /* convert lib/ to babel-ified versions */
"postpublish": /* reset lib/ */
}
in which case it makes sense to keep bluebird/object-assign.
from pnpm.
Yup, I prefer the idea of doing this for a node 0.x fork though, and keeping the main lib unbabelified.
from pnpm.
Babel can polyfill Promises and Object.assign
too by the way. Although perhaps it's best to keep bluebird for the reasons you mentioned.
from pnpm.
Babel can polyfill Promises and Object.assign too by the way
using require('babel-polyfill')
, afaik. I'd rather keep that out :)
from pnpm.
using require('babel-polyfill'), afaik. I'd rather keep that out :)
With Babel6, you selectively choose the polyfills so it's not much different than the object-assign
polyfill currently being used. https://babeljs.io/docs/plugins/transform-object-assign/
from pnpm.
okay, that's quite handy.
from pnpm.
Just going to lodge a π on babelifying the main lib. :-)
I'd prefer to keep the node 0.x version as a fork. Babel adds a layer of abstraction (albeit lightweight) to debugging and stacktraces.
from pnpm.
I suppose sourcemaps negate that a little bit but I still prefer the idea of keeping the main lib without it.
from pnpm.
I'd prefer to keep the node 0.x version as a fork.
wouldn't a hard fork present a problem?
how about publishing a babelified version as "pnpm-legacy"?
from pnpm.
how about publishing a babelified version as "pnpm-legacy"?
Yup, that's what I meant. Fork was probably a confusing word to use. :-)
from pnpm.
oh there's also --retain-lines, how aboout that one?
from pnpm.
also, there's an idea of something like
install = isNodeVersion4orAbove
? require('lib/cmd/install')
: require('lib.es5/cmd/install')
from pnpm.
oh there's also --retain-lines, how aboout that one?
I'd prefer to just use sourcemaps over --retain-lines
, if it was between the two.
install = isNodeVersion4orAbove ? require('lib/cmd/install') : require('lib.es5/cmd/install')
Are you bundling two versions of the lib in that case (es5 and es6)? My preference would still be to have a separate pnpm-legacy
module.
from pnpm.
yeah. my only concern with publishing a pnpm-legacy
module is that it isn't putting the users ahead first: it's essentially pushing the burden on the user.
from pnpm.
I'd prefer to just use sourcemaps over --retain-lines, if it was between the two.
Does (modern) node.js support source maps?
from pnpm.
Does (modern) node.js support source maps?
Yup
from pnpm.
#73 now adds inline source maps as part of the babel experiment. No idea if it works, haha.
from pnpm.
yeah. my only concern with publishing a pnpm-legacy module is that it isn't putting the users ahead first: it's essentially pushing the burden on the user.
Yeah, I look at it another way. You would be treating node >= 4 as a first class citizen, while still providing a path for Node 0.x users. The marketshare for 0.x will only continue to diminish over time. You can always decide to move the legacy version into core in the future if there's a demand... but it's much more difficult to move the other way because there will probably be people relying on 0.x support.
Just my 2 cents, obviously it's your module and your call though :-)
from pnpm.
Also, you can always console.log
a descriptive error message telling users to install pnpm-legacy
when run on node 0.x. It's not much of a roadblock really.
from pnpm.
on the other hand it'd cause fragmentation. keep in mind the CLI isn't the only way to consume pnpm
βsay, if ember-cli were to add pnpm support, they'd likely opt to use pnpm-legacy
instead.
from pnpm.
Yeah, but the nice thing is that pnpm-legacy
would be phased out over time. There may be a demand for it now but perhaps not so much in a couple of years time. And when demand goes away then you're not left in a position where you still need to transpile to support 1% of the user-base who are still using node 0.x.
Anyway, I see pros and cons both ways and my opinion is more of a personal preference really :-)
from pnpm.
I couldnt get the object-assign transform to work, btw. bummer
from pnpm.
Related Issues (20)
- `--ignore-engines` api in pnpm? HOT 2
- `pnpm upgrade --interactive --latest` breaks when using `.tgz` files as dependencies HOT 1
- The script written by node executes exec('pnpm update --latest \"@babel/*\"'), which does not take effect and does not report an error
- URL.canParse Error in Corepack Brew Formula with pnpm and use-node-version
- `pnpm licenses --json` in workspace package returns incorrect path
- How do I suppress this annoying "The modules directory ... will be removed and reinstalled from scratch..." question? HOT 1
- command `pnpm why` returns nothing HOT 2
- The requested module '/_nuxt/node_modules/.pnpm/@[email protected]/node_modules/@firebase/component/dist/index.cjs.js' does not provide an export named 'Component' (at index.esm2017.js:2:10) HOT 1
- `pnpm deploy` in a workspace creates `${deployDir}/node_modules/.modules.yaml` at the root of the workspace instead of under the requested deployment directory
- Please revert b970d96 HOT 3
- pnpm issues with corepack packageManager field
- Stuck after resolving packages
- With ignore-workspace-root-check set to true I am getting βERR_PNPM_ADDING_TO_ROOTβ HOT 2
- pnpm install --frozen-lockfile=false will not update the outdated packages HOT 6
- Cannot delete folder because esbuild.exe is locked
- Cannot authenticate to private registry HOT 5
- `shamefully-hoist` Configuration Bug in pnpm HOT 4
- ffprobe Binary Lacks Execute Permissions When Installed in a Second Directory with pnpm
- resolution-mode lowest-direct and time-based doesnot works as expected HOT 1
- Having `@latest` on packages while using `pnpm remove` doesn't remove packages HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pnpm.