Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Consistency "PolymerElements" vs "polymerelements" in bower.json for webjars usage #47

Open
bartolom opened this issue Aug 5, 2016 · 4 comments

Comments

@bartolom
Copy link

bartolom commented Aug 5, 2016

This ticket was first created by me in the PolymerElements/app-layout#293 and @abdonrd kindly ask me if I can created it in tedium as well, which seems to be a good place for it.

Description

Many PolymerElements github projects like the app-layout element is using "polymerelements" in its bower.json file to reference dependecies.

Like: polymerelements/iron-flex-layout#^1.0.0

While other popular Polymer elements like paper-checkbox, paper-button use "PolymerElements"

Like PolymerElements/iron-flex-layout#^1.0.0

Other Polymer elements use a mixture like app-route

I assume this does not matter in the JavaScript and Bower world. But I'm trying to figure out if it is possible to use Polymer-Elements in Java/JVM based micro services. In the Java world dependencies are pulled together from so called "Maven-Repositories".

There is a very nice effort to bridge the Bower/NPM things with Maven-Repositories in the project http://www.webjars.org/ . Webjars.org works fairly well for pure javascript dependencies, but less well for PolymerElements (and they have many transitive dependencies by nature). Many PolymerElements artifacts appear twice with the lower and upper case version of the github name "PolymerElements".

github-com-PolymerElements-iron-flex-layout
github-com-polymerelements-iron-flex-layout

This is an issue for JVM based software where letter case matters.

Expected outcome

It would be nice if all PolymerElements would consistently use "PolymerElements" because this is the github name of the project.

Steps to reproduce

Look at the bower.json files of the various projects

Browsers Affected

This does not affect bowsers. This affects Java build system like Maven, Gradle, SBT but seems to be no problem for JavaScript users that use Bower.

@bartolom
Copy link
Author

bartolom commented Aug 5, 2016

@abdonrd suggested in PolymerElements/app-layout#293 (comment) to try out the following tedium template:

{
  "name": "<ELEMENT-NAME>",
  "version": "<ELEMENT-VERSION>",
  "description": "<ELEMENT-DESCRIPTION>",
  "authors": [
    "The Polymer Authors"
  ],
  "license": "https://polymer.github.io/LICENSE.txt",
  "homepage": "https://elements.polymer-project.org/elements/<ELEMENT-NAME>",
  "repository": {
    "type": "git",
    "url": "git://github.com/PolymerElements/<ELEMENT-NAME>"
  },
  "dependencies": {},
  "devDependencies": {},
  "ignore": [],
  "private": true
}

I wanted to see if I can manage to do this in a pull request, but unfortunately my node/tedium/typescript knowledge (as a Java developer) is to limited. I followed the installation instructions on the tedium README.md but I failed to correctly install tedium on my Ubuntu desktop.

Below the stacktrace of my failed installation attempt:

> tedium@1.0.0 build /home/bartolom/git/tedium
> tsc

tedium.ts(189,14): error TS2345: Argument of type 'Promise<Repo>' is not assignable to parameter of type 'Repo'.
  Property 'owner' is missing in type 'Promise<Repo>'.
tedium.ts(217,10): error TS2322: Type 'Promise<Promise<T>[]>' is not assignable to type 'Promise<T[]>'.
  Type 'Promise<T>[]' is not assignable to type 'T[]'.
    Type 'Promise<T>' is not assignable to type 'T'.

npm ERR! Linux 4.4.0-31-generic
npm ERR! argv "/home/bartolom/.nvm/versions/node/v5.12.0/bin/node" "/home/bartolom/.nvm/versions/node/v5.12.0/bin/npm" "run" "build"
npm ERR! node v5.12.0
npm ERR! npm  v3.8.6
npm ERR! code ELIFECYCLE
npm ERR! tedium@1.0.0 build: `tsc`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the tedium@1.0.0 build script 'tsc'.

maybe some person with better knowledge of node could achieve this easier

@rictic
Copy link
Contributor

rictic commented Aug 5, 2016

Ah, yeah, the latest stable version of typescript has a bug with inferring generic types :(

Fortunately the beta channel is very stable. Try this: npm install typescript@beta and try again

@rictic
Copy link
Contributor

rictic commented Aug 5, 2016

I think I can bang out something to solve the dependencies and devdependencies capitalization issue very safely. I don't have time to test the bigger change of enforcing more standard bower metadata right now though, so if that's important to your project feel free to send over a PR adding that.

@bartolom
Copy link
Author

bartolom commented Jan 9, 2017

Dear rictic

I see that the #48 pull request to automate the change is still open. Maybe you don't have time because you focus on Polymer 2.x (which I'm looking forward) or you have some technical concerns to do this automated.

I'm really stuck with this in Polymer 1.x and would also volunteer to create manual pull requests for each of the PolymerElements subprojects that are inconsistent in their "main" dependencies. I this OK for you?

I have sat down and made a manual count of the 108 elements in the ElementCatalog for Polymer 1.x

67 are consistent

The following 22 are inconsistent in their bower.js (main)dependencies:

* fixed in 2.x in the main bower dependencies, but not in 2.x devDependencies

The following 18 are just inconsistent in their bower.js devDependencies which is not so important for the task I want to achieve, but as I have identified them I'll list them here as well:

bartolom added a commit to bartolom/app-route that referenced this issue Jul 31, 2017
This is a similar pull request to PolymerElements#174. I assume that when you merged your 2.0-preview branch into master, you have overwritten the changes again. This time I also covered the "devDependencies". Below is a copy-and-paste of the rational of this change:

This pull requests want to make this Polymer element consistent with the majority of other Polymer elements. The uppercase version "PolymerElements" is closer to real name of the github project name, like presented in the git URL.

The use of mixed case does not seem to have an effect on bower and JavaScript projects. But other languages like Java are more picky and would benefit from consistency.

This pull request is a manual follow up of PolymerLabs/tedium#47 and PolymerLabs/tedium#48 which try to do this in an automated way, but are stuck.
bartolom added a commit to bartolom/app-pouchdb that referenced this issue Jul 31, 2017
This is a similar pull request like PolymerElements#46 which I closed. The polymer team did the 2.0-preview merge a while ago and this pull request is against the master branch.

The rational for this change:

This pull request wants to make this Polymer element consistent with the majority of other Polymer elements. The uppercase version "PolymerElements" and "Polymer" is closer to real name of the github project name, like presented in the git URL.

The use of mixed case does not seem to have an effect on bower and JavaScript projects. But other languages like Java are more picky and would benefit from consistency.

I'm mostly concerned with the bower "Main" dependencies, but as I have changed this file already I also fixed this in the devDependencies

This pull request is a manual follow up of PolymerLabs/tedium#47 and PolymerLabs/tedium#48 which try to do this in an automated way, but are stuck.
bartolom added a commit to bartolom/iron-icons that referenced this issue Jul 31, 2017
This pull requests want to make this Polymer element consistent with the majority of other Polymer elements. The uppercase version "PolymerElements" is closer to real name of the github project name, like presented in the git URL.

The use of mixed case does not seem to have an effect on bower and JavaScript projects. But other languages like Java are more picky and would benefit from consistency.

This pull request is a manual follow up of PolymerLabs/tedium#47 and PolymerLabs/tedium#48 which try to do this in an automated way, but are stuck.
bartolom added a commit to bartolom/iron-pages that referenced this issue Jul 31, 2017
This pull requests want to make this Polymer element consistent with the majority of other Polymer elements. The uppercase version "PolymerElements" is closer to real name of the github project name, like presented in the git URL.

The use of mixed case does not seem to have an effect on bower and JavaScript projects. But other languages like Java are more picky and would benefit from consistency.

This pull request is a manual follow up of PolymerLabs/tedium#47 and PolymerLabs/tedium#48 which try to do this in an automated way, but are stuck.
bartolom added a commit to bartolom/iron-ajax that referenced this issue Jul 31, 2017
This pull request is similar to PolymerElements#251 which I have closed. This updated version not only fixes the main dependency in the 1.x variant but also all "devDependencies" as well.

The rational for this pull request is:

This pull requests want to make this Polymer element consistent with the majority of other Polymer elements. The uppercase version "PolymerElements" is closer to real name of the github project name, like presented in the git URL.

The use of mixed case does not seem to have an effect on bower and JavaScript projects. But other languages like Java are more picky and would benefit from consistency.

This pull request is a manual follow up of PolymerLabs/tedium#47 and PolymerLabs/tedium#48 which try to do this in an automated way, but are stuck.
bartolom added a commit to bartolom/iron-behaviors that referenced this issue Jul 31, 2017
This pull request is similar to PolymerElements#72 but is based on the current master branch rather then the old 2.0-preview

The rational for this change is:

This pull request wanta to make this Polymer element consistent with the majority of other Polymer elements. The uppercase version "PolymerElements" is closer to real name of the github project name, like presented in the git URL.

The use of mixed case does not seem to have an effect on bower and JavaScript projects. But other languages like Java are more picky and would benefit from consistency.

I'm mostly concerned with the bower "Main" dependencies, but as I have changed this file already I also fixed this in the devDependencies

This pull request is a manual follow up of PolymerLabs/tedium#47 and PolymerLabs/tedium#48 which try to do this in an automated way, but are stuck.
bartolom added a commit to bartolom/iron-demo-helpers that referenced this issue Jul 31, 2017
This is a follow up of PolymerElements#58 which was on the old 2.0-preview branch.

This pull request wants to make this Polymer element consistent with the majority of other Polymer elements. The uppercase version "PolymerElements" and "Polymer" is closer to real name of the github project name, like presented in the git URL.

The use of mixed case does not seem to have an effect on bower and JavaScript projects. But other languages like Java are more picky and would benefit from consistency.

This pull request is a manual follow up of PolymerLabs/tedium#47 and PolymerLabs/tedium#48 which try to do this in an automated way, but are stuck.
bartolom added a commit to bartolom/paper-material that referenced this issue Jul 31, 2017
This pull requests want to make this Polymer element consistent with the majority of other Polymer elements. The uppercase version "PolymerElements" is closer to real name of the github project name, like presented in the git URL.

The use of mixed case does not seem to have an effect on bower and JavaScript projects. But other languages like Java are more picky and would benefit from consistency.

This pull request is a manual follow up of PolymerLabs/tedium#47 and PolymerLabs/tedium#48 which try to do this in an automated way, but are stuck.
bartolom added a commit to bartolom/firebase-element that referenced this issue Jul 31, 2017
This pull requests want to make this Polymer element consistent with the majority of other Polymer elements. The uppercase version "Polymer" is closer to real name of the github project name, like presented in the git URL.

The use of mixed case does not seem to have an effect on bower and JavaScript projects. But other languages like Java are more picky and would benefit from consistency.

This pull request is a manual follow up of PolymerLabs/tedium#47 and PolymerLabs/tedium#48 which try to do this in an automated way, but are stuck.
bartolom added a commit to bartolom/google-chart that referenced this issue Jul 31, 2017
This pull requests want to make this Polymer element consistent with the majority of other Polymer elements. The uppercase version "PolymerLabs" is closer to real name of the github project name, like presented in the git URL.

The use of mixed case does not seem to have an effect on bower and JavaScript projects. But other languages like Java are more picky and would benefit from consistency.

This pull request is a manual follow up of PolymerLabs/tedium#47 and PolymerLabs/tedium#48 which try to do this in an automated way, but are stuck.
bartolom added a commit to bartolom/google-feeds that referenced this issue Jul 31, 2017
This pull requests want to make this Polymer element consistent with the majority of other Polymer elements. The uppercase version "Polymer" is closer to real name of the github project name, like presented in the git URL.

The use of mixed case does not seem to have an effect on bower and JavaScript projects. But other languages like Java are more picky and would benefit from consistency.

This pull request is a manual follow up of PolymerLabs/tedium#47 and PolymerLabs/tedium#48 which try to do this in an automated way, but are stuck.
bartolom added a commit to bartolom/polymerfire that referenced this issue Jul 31, 2017
This pull requests want to make this Polymer element consistent with the majority of other Polymer elements. The uppercase version "Polymer" is closer to real name of the github project name, like presented in the git URL.

The use of mixed case does not seem to have an effect on bower and JavaScript projects. But other languages like Java are more picky and would benefit from consistency.

This pull request is a manual follow up of PolymerLabs/tedium#47 and PolymerLabs/tedium#48 which try to do this in an automated way, but are stuck.
wesalvaro pushed a commit to GoogleWebComponents/google-chart that referenced this issue Aug 1, 2017
This pull requests want to make this Polymer element consistent with the majority of other Polymer elements. The uppercase version "PolymerLabs" is closer to real name of the github project name, like presented in the git URL.

The use of mixed case does not seem to have an effect on bower and JavaScript projects. But other languages like Java are more picky and would benefit from consistency.

This pull request is a manual follow up of PolymerLabs/tedium#47 and PolymerLabs/tedium#48 which try to do this in an automated way, but are stuck.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants