npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

polymer2-migrator

v1.2.0

Published

Migrate your Polymer 1.x components to Polymer 2.x components

Readme

polymer2-migrator

:warning: Important: this project is still a WIP and highly experimental.

Migrates a Polymer 1.x component to Polymer 2.x component (class based).

Installation

npm install -g polymer2-migrator

Usage

migrate-component [<folder>|<file>] [--analysis] [--log-level=level]

Examples:

migrate-component
migrate-component ./src
migrate-component file_1.html file_2.html --analysis
migrate-component --log-level=verbose

Options

analysis

If the --analysis flag is used, the migrator will only analyze the component to check which migrations are possible, and generate a migrator-analysis file. It will not make any changes in the component's files.

log-level

Defines the log level of the console output.

Available values: error, warn, info, verbose, debug.

How does it work?

The polymer2-migrator applies the following changes to upgrade your Polymer 1.x component to Polymer 2.x class-based component:

DOM template

  • :white_check_mark: Remove deprecated patterns in the DOM module: <dom-module> using is or name.
  • :white_circle: Remove deprecated patterns in the DOM module: styles outside of the template.
  • :white_check_mark: Update your element's DOM template to use the new <slot> element instead of <content>.
  • :white_circle: Update any URLs inside the template.

Source

Shadow DOM styles

  • :white_check_mark: Replace ::content selectors with ::slotted() selectors.
  • :white_check_mark: Remove /deep/ and ::shadow selectors, if you're still using them.
  • :white_check_mark: Remove :root selectors.
  • :white_check_mark: Update custom property syntax.
  • :white_check_mark: Wrap custom-style elements.

Source

DOM APIs

  • :white_check_mark: Convert to class syntax.
  • :white_check_mark: Add listeners to ready function.
  • :white_check_mark: Behaviors as mixins.
  • :white_check_mark: Automatically import dom-if.html and dom-repeat.html if needed.

Source

Common utility APIs

  • :white_check_mark: fire - Replaces the fire method with dispatchEvent and adapts the syntax.
  • :white_circle: async
  • :white_circle: debounce
  • :white_circle: importHref
  • :white_check_mark: $$ - Replaces the $$('selector') syntax with shadowRoot.querySelector('selector').

Source

Additional Features

  • Analysis file: Generates a verbose log file showing all the applied changes to each file.
  • ...