package.json "publishConfig": {"tag": "..."} ignored #2653

Closed
cowboy opened this Issue Jul 25, 2012 · 2 comments

3 participants

@cowboy

Relevant parts of the related chat transcript:

[15:34] <@ben_alman> i see npm info publishConfig tag=devel
[15:34] <@ben_alman> in --verbose
[15:35] <@isaacs> oh, right... but at that point it's too late, isn't it, because the new abstracted-out agent thingie isn't getting re-set.
[15:35] <@isaacs> k, that's a bug.
[15:36] <@isaacs> it sets the npm config, but it doesn't set npm.registry.tag
[15:37] <@isaacs> or it should set npm.registry.tag to a getter that does npm.config.get('tag')
[15:37] <@isaacs> (maybe too magical)
@arikon

Another proof

arikon@arikon-osx-2:~/projects/bem/bem-tools (server)$ npm publish
npm http PUT https://registry.npmjs.org/bem
npm http 409 https://registry.npmjs.org/bem
npm http GET https://registry.npmjs.org/bem
npm http 200 https://registry.npmjs.org/bem
npm http PUT https://registry.npmjs.org/bem/0.5.13/-tag/latest
npm http 201 https://registry.npmjs.org/bem/0.5.13/-tag/latest
npm http GET https://registry.npmjs.org/bem
npm http 200 https://registry.npmjs.org/bem
npm http PUT https://registry.npmjs.org/bem/-/bem-0.5.13.tgz/-rev/130-27c38ca86934355c2d98cfce01eac91f
npm http 201 https://registry.npmjs.org/bem/-/bem-0.5.13.tgz/-rev/130-27c38ca86934355c2d98cfce01eac91f
+ bem@0.5.13

package.json

{
  "name": "bem",
  "description": "BEM Tools",
  "version": "0.5.13",
  "homepage": "http://github.com/bem/bem-tools",
  "author": "Sergey Berezhnoy <veged@mail.ru> (http://github.com/veged)",
  "maintainers": [
    "Sergey Berezhnoy <veged@mail.ru> (http://github.com/veged)",
    "Sergey Belov <peimei@ya.ru> (http://github.com/arikon)"
  ],
  "contributors": [
    "Sergey Berezhnoy <veged@mail.ru> (http://github.com/veged)",
    "Sergey Belov <peimei@ya.ru> (http://github.com/arikon)",
    "Varvara Stepanova <toivonen@toivonen.ru> (http://github.com/toivonen)",
    "Vladimir Alaev <scf2k4@gmail.com> (http://github.com/scf2k)"
  ],
  "bugs": {
    "url": "http://github.com/bem/bem-tools/issues"
  },
  "repository": {
    "type": "git",
    "url": "git://github.com/bem/bem-tools.git"
  },
  "directories": {
    "lib": "./lib"
  },
  "bin": {
    "bem": "./bin/bem"
  },
  "dependencies": {
    "coa": "~0.3.5",
    "q": "~0.8.5",
    "qq": "~0.3.4",
    "q-fs": "0.1",
    "q-http": "~0.1.14",
    "mime": "~1.2.5",
    "underscore": "~1.3.1",
    "inherit": "~1.0.0",
    "xjst": "0.2.21",
    "ometajs": "~2.1.10",
    "borschik": "~0.0.11",
    "apw": "~0.3.5",
    "winston": ">= 0.5.0",
    "memorystream": ">= 0.1.1",
    "csso": "~1.2.14",
    "uglify-js": "~1.3.0",
    "dom-js": "*"
  },
  "devDependencies": {
    "mocha-coverjs": "*",
    "mocha": "~1.3.0",
    "chai": "~1.0.3",
    "coverjs": ">= 0.0.7-alpha"
  },
  "scripts": {
    "test": "make test",
    "test-cover": "make test-cover"
  },
  "engines": {
    "node": ">= 0.6.0"
  },
  "npm2debian": {
    "bash-completion": {
      "bem": {
        "script": "./bin/bem completion"
      }
    }
  },
  "licenses": [
    {
      "type": "AS IS"
    }
  ],
  "preferGlobal": true,
  "publishConfig": {
    "tag": "unstable"
  },
  "optionalDependencies": {}
}
@isaacs
npm member

Now that npmconf has been abstracted out, this should be a lot easier to do.

Notes for the implementer:

Make npm-registry-client use a npmconf object instead of having all its configs rolled out. Then, just make a child obj with the publishConfig data.

@isaacs isaacs added a commit that closed this issue Aug 17, 2012
@isaacs isaacs Fix #2653 Respect publishConfig 6c00079
@isaacs isaacs closed this in 6c00079 Aug 17, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment