Skip to content

Commit

Permalink
[chore] Normalize engines and author fields
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars authored and bjoerge committed Feb 16, 2018
1 parent 166f061 commit 7e3ceb1
Show file tree
Hide file tree
Showing 16 changed files with 75 additions and 14 deletions.
5 changes: 4 additions & 1 deletion packages/@sanity/check/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
"bin": {
"sanity-check": "./src/bin.js"
},
"author": "Espen Hovlandsdal <espen@hovlandsdal.com>",
"author": "Sanity.io <hello@sanity.io>",
"engines": {
"node": ">=6.0.0"
},
"license": "MIT",
"scripts": {
"prepublish": "in-publish && ./src/bin.js || not-in-publish"
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/document-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"content",
"document-store"
],
"author": "",
"author": "Sanity.io <hello@sanity.io>",
"license": "MIT",
"dependencies": {
"@sanity/mutator": "^0.125.8",
Expand Down
12 changes: 10 additions & 2 deletions packages/@sanity/import/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,23 @@
"description": "Import documents to a Sanity dataset",
"main": "lib/import.js",
"engines": {
"node": ">=4.0.0"
"node": ">=6.0.0"
},
"author": "Sanity.io <hello@sanity.io>",
"license": "MIT",
"scripts": {
"clean": "rimraf lib",
"test": "jest"
},
"keywords": ["sanity", "cms", "headless", "realtime", "content", "import", "ndjson"],
"keywords": [
"sanity",
"cms",
"headless",
"realtime",
"content",
"import",
"ndjson"
],
"dependencies": {
"@rexxars/get-uri": "^2.0.2",
"@sanity/mutator": "^0.125.8",
Expand Down
3 changes: 3 additions & 0 deletions packages/@sanity/plugin-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"test": "ava",
"coverage": "nyc --reporter=html ava"
},
"engines": {
"node": ">=6.0.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/sanity-io/sanity.git"
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/preview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"content",
"preview"
],
"author": "",
"author": "Sanity.io <hello@sanity.io>",
"license": "MIT",
"bugs": {
"url": "https://github.com/sanity-io/sanity/issues"
Expand Down
1 change: 1 addition & 0 deletions packages/@sanity/production-preview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"headless",
"realtime",
"content",
"production-preview",
"color-input",
"sanity-plugin"
],
Expand Down
3 changes: 3 additions & 0 deletions packages/@sanity/resolver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"coverage": "nyc --report=lcov --report=text _mocha -- test/**/*.test.js",
"test": "mocha test/**/*.test.js"
},
"engines": {
"node": ">=6.0.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/sanity-io/sanity.git"
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"content",
"schema"
],
"author": "",
"author": "Sanity.io <hello@sanity.io>",
"license": "MIT",
"dependencies": {
"@sanity/generate-help-url": "^0.125.8",
Expand Down
3 changes: 3 additions & 0 deletions packages/@sanity/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"bin": {
"sanity-server": "./bin/sanity-server.js"
},
"engines": {
"node": ">=6.0.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/sanity-io/sanity.git"
Expand Down
3 changes: 3 additions & 0 deletions packages/@sanity/util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"clean": "rimraf lib",
"test": "mocha test/**/*.test.js"
},
"engines": {
"node": ">=6.0.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/sanity-io/sanity.git"
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/uuid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"content",
"uuid"
],
"author": "",
"author": "Sanity.io <hello@sanity.io>",
"license": "MIT",
"dependencies": {
"uuid": "3.1.0"
Expand Down
3 changes: 3 additions & 0 deletions packages/@sanity/webpack-integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
"webpack-integration",
"webpack"
],
"engines": {
"node": ">=6.0.0"
},
"author": "Sanity.io <hello@sanity.io>",
"license": "MIT",
"bugs": {
Expand Down
3 changes: 3 additions & 0 deletions packages/@sanity/webpack-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"scripts": {
"clean": "rimraf lib"
},
"engines": {
"node": ">=6.0.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/sanity-io/sanity.git"
Expand Down
15 changes: 14 additions & 1 deletion packages/blog-studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
"test": "sanity check"
},
"keywords": [
"sanity"
"sanity",
"cms",
"headless",
"realtime",
"content",
"blog-studio"
],
"dependencies": {
"@sanity/base": "^0.125.8",
Expand All @@ -25,5 +30,13 @@
"@sanity/vision": "^0.125.9",
"react": "^15.4.2",
"react-dom": "^15.4.2"
},
"bugs": {
"url": "https://github.com/sanity-io/sanity/issues"
},
"homepage": "https://www.sanity.io/",
"repository": {
"type": "git",
"url": "git+https://github.com/sanity-io/sanity.git"
}
}
15 changes: 14 additions & 1 deletion packages/movies-studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
"test": "sanity check"
},
"keywords": [
"sanity"
"sanity",
"cms",
"headless",
"realtime",
"content",
"movies-studio"
],
"dependencies": {
"@sanity/base": "^0.125.8",
Expand All @@ -27,5 +32,13 @@
"react": "^15.4.2",
"react-dom": "^15.4.2",
"react-icons": "^2.2.5"
},
"bugs": {
"url": "https://github.com/sanity-io/sanity/issues"
},
"homepage": "https://www.sanity.io/",
"repository": {
"type": "git",
"url": "git+https://github.com/sanity-io/sanity.git"
}
}
15 changes: 10 additions & 5 deletions scripts/normalizePackageFields.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,23 @@ const uniq = require('lodash/uniq')
const transformPkgs = require('./transformPkgs')

const COMMON_KEYWORDS = ['sanity', 'cms', 'headless', 'realtime', 'content']
const supportedNodeVersionRange = '>=6.0.0'

transformPkgs(pkgManifest => {
const name = pkgManifest.name.split('/').slice(-1)[0]

const engines = pkgManifest.engines
if (engines && engines.node) {
engines.node = supportedNodeVersionRange
}

return Object.assign({}, pkgManifest, {
engines,
author: 'Sanity.io <hello@sanity.io>',
bugs: {
url: 'https://github.com/sanity-io/sanity/issues'
},
keywords: uniq(
COMMON_KEYWORDS
.concat(name)
.concat(pkgManifest.keywords || [])
),
keywords: uniq(COMMON_KEYWORDS.concat(name).concat(pkgManifest.keywords || [])),
homepage: 'https://www.sanity.io/',
license: 'MIT',
repository: {
Expand Down

0 comments on commit 7e3ceb1

Please sign in to comment.