Why doesn't `yarn outdated` show babel 7 as latest? - babeljs

I currently have babel v6 installed, and yarn outdated does not show anything about babel v7. (I have the latest version of yarn, 1.15.2)
package.json
"devDependencies": {
"babel": "^6.23.0",
"babel-core": "^6.26.0",
I'm just wondering why that is, thanks.

From v6 to v7, babel changed their package naming convention from babel to #babel. To get the newest version of babel, you need to use the entirely new packages.

Related

How to install no latest but highest version of npm package without specifying a version

For some reason when I do npm publish the registry does not remove latest tag from previous version and does not attach latest to newer version.
I there a way to download highest version of package without knowing exactly what the version is?
I recommend using semantic versioning if you aren't already. You can use this tool to see examples of how version spec works. Here's an example that could be included in package.json which will install the highest version of lodash in the registry:
"dependencies": {
"lodash": "x"
}
Ok, I do not know how to install highest version. But I localized a error in npm, if I publish my package when in package.json is "depraceted":false it will not change tag to latest even if I pass it as flag in publish command.

Updating ionic with command?

I just installed ionic CLI#5.4.4. It is latest version.
But When I started new project it installed "#ionic/angular": "^4.7.1", "#angular/core": "~8.1.2" and so on. So not latest versions :/
How should I update those?
ng update #ionic/angular #angular/core #angular/cli ?
Or maybe simply update package.json file?
You can also just modify your package.json and run npm install.

How do I check which babel version is on my windows 10 OS?

I need help to find which version of Babel is on my Windows Machine. I have installed it using
npm install --save-dev babel-cli babel-preset-env.
How do I check which version is on my Windows OS?
After you finish installing Babel, your package.json file should look like this:
{
"name": "my-project",
"version": "1.0.0",
"devDependencies": {
"babel-cli": "^6.0.0"
}
}
So you can find your Babel version in this configuration file.
Try this at the command line:
npm list babel-cli
You can also check the version of babel-cli by finding the babel-cli folder in node_modules and looking at the version property of the package.json that is at the base of that folder.
If babel-cli was installed globally via -g flag of npm install, you could check the version by executing command babel --version.
Hopefully the helps!
As the babel is updated to babel 7,
check using
npm list #babel/cli
or
npm list #babel/core
possibly your local ./node_modules/.bin is not in $PATH check out
this previous question for further info.
babel --version
You can figure this out by typing in the command line:
babel --help, look over the output and you can see other options that you might need.
Good luck

How to duplicate the behavior of babel's removed { "optional" : "runtime" } argument?

I was building an ES6 project with browserify and babelify 6.4.0, but using the latest versions of both there is no more {"optional": "runtime"} option. Is there a way to get babel 6.10.2 and babelify 7.3.0 to do exactly the same thing as the older versions?
You'll want to:
npm install --save-dev babel-plugin-transform-runtime
npm install --save babel-runtime
then in your Babel config, you'd enable the plugin:
plugins: ['transform-runtime']

How to compile and run an ES6 file with node when using babel6?

I installed the latest version 6 of babel, babel-core and babel-loader.
How can I run an ES6 file in Node with Babel6?
Previously I would run the command
babel-node server.js
but now I get this message:
The CLI has been moved into the package `babel-cli`. See http://babeljs.io/docs/usage/cli/.
None of the instructions on that page say how to do this.
The message could be clearer. You've installed the babel package and you should have installed the babel-cli package.
npm uninstall babel
npm install babel-cli
Upon installing babel-cli I also had to specify the es2015 loader and to specifically use my local babel-node package since I don't have it installed globally.
./node_modules/.bin/babel-node --presets es2015 server.js