Skip to content

please make package.json version on github more useful #1818

Closed

Description

What is the suggested path for taking the github version of typescript as npm package dependency?

For instance, there are some small issues with the latest npm package 1.4.1, which are fixed in master, but master package.json still has version 1.4.0. So even if I npm install from the git repo, the version for the dependency can't be specified correctly.

My (naive?) suggestion would be:

  1. master version should always be at least as high as latest npm version
  2. add a build number to the version in master, and bump it every time the LKG is updated,

Btw, does anyone know how to specify a github dependency in package.json, without npm install being wasteful? Using

  "dependencies": "git+ssh://git@github.com:Microsoft/TypeScript.git"

npm (1.4.3) seems to clone the whole repo, when a shallow clone would be sufficient, and I don't want to think whether it is going to be more clever on updates. And while npm accepts tarballs, github offers zipfiles.

My best guess would be to specify the dependency with name and version only, then manually do something like

(cd ..;git clone --depth 1 git@github.com:Microsoft/TypeScript.git)
npm install ../TypeScript

If anyone has a good solution, that should perhaps go into the docs/readme somewhere?

Activity

  1. RyanCavanaugh commented on Jan 27, 2015

    @RyanCavanaugh
    Member

    Welcome back Claus 😄

    We've been talking about doing a rolling-build style thing on NPM and should roll the above recommendations into that.

  2. Arnavion commented on Jan 28, 2015

    @Arnavion

    Claus Reinke (@clausreinke) Meanwhile, you can use https://github.com/Arnavion/typescript-github

    "dependencies": {
        "typescript-github": "https://github.com/Arnavion/typescript-github/tarball/2015-01-28-67023a83d520fe72cf723359198a931e36def0de"
    }
  3. mhegazy commented on Jan 30, 2015

    @mhegazy
    Contributor

    Daniel Rosenwasser (@DanielRosenwasser) just pump up the version to 1.5 everywhere.

  4. clausreinke commented on Jan 30, 2015

    @clausreinke
    Author

    Mohamed Hegazy (@mhegazy) Daniel Rosenwasser (@DanielRosenwasser) as long as version bump + fresh LKG always go together, that should help. If you don't like to spend a "real" version number for every build, add a build number.

    (Since I raised concerns about npm github dependencies above: after the initial (too deep) clone, subsequent installs have been fast.)

  5. clausreinke commented on Jan 31, 2015

    @clausreinke
    Author

    grmpf. Now that you've been so helpful, npm is driving me crazy: even though I've got typescript 1.5.0 installed globally, it refuses to accept that as a dependency, no matter what I try to convince it to ignore the registry. But that seems to be an npm bug: npm/npm#5509 (and no, the workaround doesn't for me).

  6. DanielRosenwasser commented on Jan 31, 2015

    @DanielRosenwasser
    Member

    Labels:

    • bug
    • i-wanna-be-the-very-best

    We should definitely adopt that label for some issues.

  7. DanielRosenwasser commented on Jan 31, 2015

    @DanielRosenwasser
    Member

    Should we consider this Fixed now?

  8. clausreinke commented on Feb 1, 2015

    @clausreinke
    Author

    submitter here: sure.

    Is there a tracking issue for the npm build automation?

    Daniel Rosenwasser (@DanielRosenwasser) I wondered about the purpose of that label: since it isn't self-descriptive, it has the feeling of an inside joke.

  9. DanielRosenwasser commented on Feb 2, 2015

    @DanielRosenwasser
    Member

    Is there a tracking issue for the npm build automation?

    Not currently, I'll set one up.

    Since it isn't self-descriptive, it has the feeling of an inside joke.

    It's a Pokémon reference. The intro song starts off with the lyrics "I wanna be the very best". The tag is basically as if to say "this is a very hard task, you must be very determined to figure out a solution".

  10. locked and limited conversation to collaborators on Jun 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions