zemirco / json2csv

Convert json to csv with column titles
http://zemirco.github.io/json2csv
MIT License
2.71k stars 365 forks source link

'yarn add json2csv' installs 3.9.1 #185

Closed smcguinness closed 7 years ago

smcguinness commented 7 years ago

Include the command or code you used.

yarn add json2csv

or

yarn add json2csv@3.9.0 -E

Include your output/error.

Yarn installed package.json in node_modules

{
  "name": "json2csv",
  "preferGlobal": "true",
  "version": "3.9.1",
  "description": "Convert JSON to CSV",
  "keywords": [
    "json",
    "to",
    "csv",
    "export",
    "convert",
    "parse"
  ],
  "author": {
    "name": "Mirco Zeiss",
    "email": "mirco.zeiss@gmail.com",
    "twitter": "zeMirco"
  },
  "license": "MIT",
  "bin": {
    "json2csv": "./bin/json2csv.js"
  },
  "main": "./lib/json2csv.js",
  "repository": {
    "type": "git",
    "url": "https://github.com/zemirco/json2csv"
  },
  "scripts": {
    "build": "webpack",
    "test": "node test | tap-spec",
    "test-coverage": "istanbul cover test/index.js --report lcovonly | tap-spec",
    "deploy:docs": "docpress b && git-update-ghpages zemirco/json2csv _docpress",
    "prepublish": "in-publish && npm run before:publish || not-in-publish",
    "before:publish": "npm test && npm run build && npm run deploy:docs && npm run release",
    "release": "standard-version"
  },
  "dependencies": {
    "cli-table": "^0.3.1",
    "commander": "^2.8.1",
    "debug": "^2.2.0",
    "flat": "^2.0.0",
    "lodash.flatten": "^4.4.0",
    "lodash.get": "^4.4.0",
    "lodash.set": "^4.3.0",
    "lodash.uniq": "^4.5.0",
    "lodash.clonedeep": "^4.5.0",
    "path-is-absolute": "^1.0.0"
  },
  "devDependencies": {
    "async": "^2.0.1",
    "docpress": "^0.7.0",
    "eslint": "^3.3.1",
    "git-update-ghpages": "^1.3.0",
    "in-publish": "^2.0.0",
    "istanbul": "^0.4.3",
    "standard-version": "^4.0.0",
    "tap-spec": "^4.1.0",
    "tape": "^4.0.0",
    "webpack": "^1.13.1"
  }
}

NPM installed package.json in node_modules

{
  "_args": [
    [
      {
        "raw": "json2csv@3.9.0",
        "scope": null,
        "escapedName": "json2csv",
        "name": "json2csv",
        "rawSpec": "3.9.0",
        "spec": "3.9.0",
        "type": "version"
      },
      "/Users/Seth/Sandbox/blackbird"
    ]
  ],
  "_from": "json2csv@3.9.0",
  "_id": "json2csv@3.9.0",
  "_inCache": true,
  "_location": "/json2csv",
  "_nodeVersion": "6.9.4",
  "_npmOperationalInternal": {
    "host": "s3://npm-registry-packages",
    "tmp": "tmp/json2csv-3.9.0.tgz_1499777296364_0.43090387410484254"
  },
  "_npmUser": {
    "name": "knownasilya",
    "email": "ilya@burstcreations.com"
  },
  "_npmVersion": "4.6.1",
  "_phantomChildren": {},
  "_requested": {
    "raw": "json2csv@3.9.0",
    "scope": null,
    "escapedName": "json2csv",
    "name": "json2csv",
    "rawSpec": "3.9.0",
    "spec": "3.9.0",
    "type": "version"
  },
  "_requiredBy": [
    "#USER",
    "/"
  ],
  "_resolved": "https://registry.npmjs.org/json2csv/-/json2csv-3.9.0.tgz",
  "_shasum": "4cd460f31b47817e1732268e21082fc37b1483da",
  "_shrinkwrap": null,
  "_spec": "json2csv@3.9.0",
  "_where": "/Users/Seth/Sandbox/blackbird",
  "author": {
    "name": "Mirco Zeiss",
    "email": "mirco.zeiss@gmail.com"
  },
  "bin": {
    "json2csv": "./bin/json2csv.js"
  },
  "bugs": {
    "url": "https://github.com/zemirco/json2csv/issues"
  },
  "dependencies": {
    "cli-table": "^0.3.1",
    "commander": "^2.8.1",
    "debug": "^2.2.0",
    "flat": "^2.0.0",
    "lodash.clonedeep": "^4.5.0",
    "lodash.flatten": "^4.4.0",
    "lodash.get": "^4.4.0",
    "lodash.set": "^4.3.0",
    "lodash.uniq": "^4.5.0",
    "path-is-absolute": "^1.0.0"
  },
  "description": "Convert JSON to CSV",
  "devDependencies": {
    "async": "^2.0.1",
    "docpress": "^0.7.0",
    "eslint": "^3.3.1",
    "git-update-ghpages": "^1.3.0",
    "in-publish": "^2.0.0",
    "istanbul": "^0.4.3",
    "standard-version": "^4.0.0",
    "tap-spec": "^4.1.0",
    "tape": "^4.0.0",
    "webpack": "^1.13.1"
  },
  "directories": {},
  "dist": {
    "shasum": "4cd460f31b47817e1732268e21082fc37b1483da",
    "tarball": "https://registry.npmjs.org/json2csv/-/json2csv-3.9.0.tgz"
  },
  "gitHead": "cff9da79ef5a77deaf736555b59ad82b73a1dbbe",
  "homepage": "https://github.com/zemirco/json2csv#readme",
  "keywords": [
    "json",
    "to",
    "csv",
    "export",
    "convert",
    "parse"
  ],
  "license": "MIT",
  "main": "./lib/json2csv.js",
  "maintainers": [
    {
      "name": "azhang",
      "email": "azhang@bottlenose.com"
    },
    {
      "name": "knownasilya",
      "email": "ilya@burstcreations.com"
    },
    {
      "name": "zemirco",
      "email": "mirco.zeiss@gmail.com"
    }
  ],
  "name": "json2csv",
  "optionalDependencies": {},
  "preferGlobal": "true",
  "readme": "ERROR: No README data found!",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/zemirco/json2csv.git"
  },
  "scripts": {
    "before:publish": "npm test && npm run build && npm run deploy:docs && npm run release",
    "build": "webpack",
    "deploy:docs": "docpress b && git-update-ghpages zemirco/json2csv _docpress",
    "prepublish": "in-publish && npm run before:publish || not-in-publish",
    "release": "standard-version",
    "test": "node test | tap-spec",
    "test-coverage": "istanbul cover test/index.js --report lcovonly | tap-spec"
  },
  "version": "3.9.0"
}
knownasilya commented 7 years ago

Sounds like a big in yarn..

smcguinness commented 7 years ago

I posted the issue to Yarn https://github.com/yarnpkg/yarn/issues/3935 and they pointed out that the package in Yarn actually references 3.9.1 in the published package.json.

I'm not sure how Yarn got that, whether it was a bug in them grabbing the NPM package, or with this package being published to Yarn having that reference.

I'd like to help resolve if I can, though I'm not sure what I can do, other than raise the issue as I have done here and with Yarn.

knownasilya commented 7 years ago

Looks like something happened in the prepublish script, and npm didn't catch it as a bug. I published an actual 3.9.1.