Polymer / tools

Polymer Tools Monorepo
BSD 3-Clause "New" or "Revised" License
430 stars 199 forks source link

upgrade deprecated dependencies #2532

Open baocang opened 7 years ago

baocang commented 7 years ago

Description

While install polymer-cli, I get some warnings:

- npm WARN **deprecated babel-preset-babili@0.0.10**: babili has been renamed to babel-minify. Please update to babel-preset-minify npm WARN deprecated bower@1.8.0: ..psst! While Bower is maintained, we recommend Yarn and Webpack for *new* front-end projects! Yarn's advantage is security and reliability, and Webpack's is support for both CommonJS and AMD projects. Currently there's no migration path, but please help to create it: https://github.com/bower/bower/issues/2467 - npm WARN **deprecated babel-preset-es2015@6.24.1**: We're super ???? excited that you're trying to use ES2015 syntax, but instead of continuing yearly presets ???? , we recommend using babel-preset-env: npm install babel-preset-env. preset-env without options will compile ES2015+ down to ES5. And by targeting specific browsers, Babel can do less work and you can ship native ES2015+ to users ???? ! Also, we are in the process of releasing v7, so give http://babeljs.io/blog/2017/09/12/planning-for-7.0 a read and test it! Thanks so much for using Babel ???? , please give us a follow @babeljs for updates, join slack.babeljs.io for discussion and help support at opencollective.com/babel - npm WARN **deprecated @types/assert@0.0.29**: See https://github.com/DefinitelyTyped/DefinitelyTyped/issues/12826 /usr/local/bin/polymer -> /usr/local/lib/node_modules/polymer-cli/bin/polymer.js

Versions & Environment

Steps to Reproduce

install polymer-cli: npm install -g polymer-cli

Expected Results

No warning is throw

Actual Results

Warning is throw

TimvdLippe commented 7 years ago

npm WARN deprecated babel-preset-babili@0.0.10

This has been resolved in #847

npm WARN deprecated @0.0.29

This is @types/assert which has to be fixed in Polyserve: https://github.com/Polymer/polyserve/blob/8b97cd4646b5cf527f693a0d35aa45c5e91035a3/package.json#L25

npm WARN deprecated babel-preset-es2015@6.24.1

Has to be fixed in the CLI

stramel commented 7 years ago

I am definitely in favor of using env instead of es2015. It provides a much more configurable transpilation step.

justinfagnani commented 7 years ago

We don't really want a configurable compilation step. We don't want to support any features that would require building on evergreen browsers.

TimvdLippe commented 7 years ago

If I understand the docs correctly, the only change would be to modify

const babelPresetES2015 = require('babel-preset-es2015');
const minifyPreset = require('babel-preset-minify');
const babelPresetES2015NoModules =
    babelPresetES2015.buildPreset({}, {modules: false});

to

const babelPresetEnv = require('babel-preset-env');
const babelPresetEnvModules =
    babelPresetEnv.buildPreset({}, {modules: false});
stramel commented 7 years ago

That sounds right to me.

The big the for me about using env is that it only polyfills what you need based on what features you are using and if the browsers specified support those features or not.

For instance, if you are using strictly ES2015 features and below:

We use this for our applications at my company. When we drop IE11 from our supported browsers, it will automatically reduce the amount of polyfilling that is being added.

evanp commented 7 years ago

I also get:

npm WARN deprecated bower@1.8.2: ...psst! Your project can stop working at any moment because its dependencies can change. Prevent this by migrating to Yarn: https://bower.io/blog/2017/how-to-migrate-away-from-bower/
FredKSchott commented 7 years ago

@evanp That's because bower is deprecated. This is one of the reasons we're moving to npm. You can learn more here: https://www.polymer-project.org/blog/2017-08-22-npm-modules.html

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.