Skip to content

Commit

Permalink
[chore] Require node >= 8 for all packages (#1112)
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars authored and bjoerge committed Dec 17, 2018
1 parent 92d41c5 commit 863e23a
Show file tree
Hide file tree
Showing 34 changed files with 55 additions and 48 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
language: node_js
node_js:
- '6'
- '8'
- '10'

cache:
directories:
- "$HOME/.npm"
- '$HOME/.npm'

install:
# todo: remove the `|| npm install` part below when we no run CI with node 6
Expand Down
5 changes: 2 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
environment:
matrix:
- nodejs_version: "10"
- nodejs_version: "8"
- nodejs_version: "6"
- nodejs_version: '10'
- nodejs_version: '8'

install:
- ps: Install-Product node $env:nodejs_version
Expand Down
4 changes: 2 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable import/no-commonjs, import/no-unassigned-import */
// Note: Node 6 compat, please!
// Note: Node 8 compat, please!
require('hard-rejection/register')

const path = require('path')
Expand All @@ -11,7 +11,7 @@ const watch = require('gulp-watch')
const gutil = require('gulp-util')
const filter = require('gulp-filter')
const plumber = require('gulp-plumber')
const ts = require('@rexxars/gulp-typescript')
const ts = require('gulp-typescript')
const sourcemaps = require('gulp-sourcemaps')
const through = require('through2')
const chalk = require('chalk')
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"@babel/preset-flow": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@babel/register": "^7.0.0",
"@rexxars/gulp-typescript": "^5.0.0-alpha.3",
"babel-eslint": "^9.0.0",
"babel-jest": "^23.6.0",
"babel-loader": "^8.0.0",
Expand Down Expand Up @@ -76,6 +75,7 @@
"gulp-newer": "^1.4.0",
"gulp-plumber": "^1.2.0",
"gulp-sourcemaps": "^2.6.4",
"gulp-typescript": "^5.0.0",
"gulp-util": "^3.0.8",
"gulp-watch": "^5.0.1",
"hard-rejection": "^1.0.0",
Expand All @@ -92,7 +92,7 @@
"stylelint-config-css-modules": "^1.1.0",
"stylelint-config-standard": "^18.0.0",
"through2": "^2.0.3",
"typescript": "^2.9.2",
"typescript": "^3.2.2",
"yarn": "^1.3.2"
}
}
2 changes: 1 addition & 1 deletion packages/@sanity/check/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"author": "Sanity.io <hello@sanity.io>",
"engines": {
"node": ">=6.0.0"
"node": ">=8.0.0"
},
"license": "MIT",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/cli/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"@babel/preset-env",
{
"targets": {
"node": "6"
"node": "8"
}
}
]
Expand Down
4 changes: 2 additions & 2 deletions packages/@sanity/cli/bin/sanity.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
*/

const nodeVersion = Number(process.version.replace(/^v/i, '').split('.', 2)[0])
if (nodeVersion < 6) {
console.error('ERROR: Node.js version 6 or higher required. You are running ' + process.version)
if (nodeVersion < 8) {
console.error('ERROR: Node.js version 8 or higher required. You are running ' + process.version)
process.exit(1)
}

Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"prepublishOnly": "npm run build"
},
"engines": {
"node": ">=6.0.0"
"node": ">=8.0.0"
},
"repository": {
"type": "git",
Expand Down
3 changes: 2 additions & 1 deletion packages/@sanity/code-input/.babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
presets: ['@babel/react']
"extends": "../../../.babelrc.js",
"presets": ["@babel/react"]
}
3 changes: 2 additions & 1 deletion packages/@sanity/color-input/.babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
presets: ['@babel/react']
"extends": "../../../.babelrc.js",
"presets": ["@babel/react"]
}
3 changes: 2 additions & 1 deletion packages/@sanity/components/.babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
presets: ['@babel/react', '@babel/flow']
"extends": "../../../.babelrc.js",
"presets": ["@babel/react", "@babel/flow"]
}
2 changes: 1 addition & 1 deletion packages/@sanity/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"clean": "rimraf lib"
},
"engines": {
"node": ">=6.0.0"
"node": ">=8.0.0"
},
"keywords": [
"sanity",
Expand Down
3 changes: 2 additions & 1 deletion packages/@sanity/default-layout/.babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
presets: ['@babel/react']
"extends": "../../../.babelrc.js",
"presets": ["@babel/react"]
}
3 changes: 2 additions & 1 deletion packages/@sanity/default-login/.babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
presets: ['@babel/react']
"extends": "../../../.babelrc.js",
"presets": ["@babel/react"]
}
4 changes: 2 additions & 2 deletions packages/@sanity/desk-tool/.babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"presets": ["@babel/react"],
"extends": "../../../.babelrc.js"
"extends": "../../../.babelrc.js",
"presets": ["@babel/react"]
}
2 changes: 1 addition & 1 deletion packages/@sanity/export/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Export Sanity documents and assets",
"main": "lib/export.js",
"engines": {
"node": ">=6.0.0"
"node": ">=8.0.0"
},
"author": "Sanity.io <hello@sanity.io>",
"license": "MIT",
Expand Down
3 changes: 2 additions & 1 deletion packages/@sanity/google-maps-input/.babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
presets: ['@babel/react']
"extends": "../../../.babelrc.js",
"presets": ["@babel/react"]
}
17 changes: 10 additions & 7 deletions packages/@sanity/imagetool/.babelrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{
presets: [
'@babel/preset-flow',
'@babel/preset-react',
['@babel/preset-env', {
targets: {
ie: '9'
"presets": [
"@babel/preset-flow",
"@babel/preset-react",
[
"@babel/preset-env",
{
"targets": {
"ie": "9"
}
}]
}
]
]
}
2 changes: 1 addition & 1 deletion packages/@sanity/import-cli/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"@babel/preset-env",
{
"targets": {
"node": "6"
"node": "8"
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/import-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"sanity-import": "./lib/sanity-import.js"
},
"engines": {
"node": ">=6.0.0"
"node": ">=8.0.0"
},
"author": "Sanity.io <hello@sanity.io>",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/import/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"@babel/preset-env",
{
"targets": {
"node": "6"
"node": "8"
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/import/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Import documents to a Sanity dataset",
"main": "lib/import.js",
"engines": {
"node": ">=6.0.0"
"node": ">=8.0.0"
},
"author": "Sanity.io <hello@sanity.io>",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/plugin-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"coverage": "nyc --reporter=html ava"
},
"engines": {
"node": ">=6.0.0"
"node": ">=8.0.0"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/resolver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"test": "#todo: mocha test/**/*.test.js"
},
"engines": {
"node": ">=6.0.0"
"node": ">=8.0.0"
},
"repository": {
"type": "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 @@ -31,7 +31,7 @@
"object-inspect": "^1.3.0"
},
"devDependencies": {
"@types/node": "6.0.52",
"@types/node": "^8.0.0",
"empty": "^0.10.1",
"flow-typed": "^2.2.3",
"jest": "^23.6.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"sanity-server": "./bin/sanity-server.js"
},
"engines": {
"node": ">=6.0.0"
"node": ">=8.0.0"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/server/src/configs/babel-env-config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
targets: {
node: '6',
node: '8',
chrome: '59',
safari: '10',
firefox: '56',
Expand Down
4 changes: 2 additions & 2 deletions packages/@sanity/structure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"types": "./lib/index.d.ts",
"author": "Sanity.io <hello@sanity.io>",
"engines": {
"node": ">=6.0.0"
"node": ">=8.0.0"
},
"license": "MIT",
"scripts": {
Expand Down Expand Up @@ -39,7 +39,7 @@
"rimraf": "^2.6.2",
"rxjs": "^6.1.0",
"ts-jest": "^22.4.3",
"typescript": "^2.9.2"
"typescript": "^3.2.2"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"test": "jest test/**.test.js"
},
"engines": {
"node": ">=6.0.0"
"node": ">=8.0.0"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/webpack-integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"webpack"
],
"engines": {
"node": ">=6.0.0"
"node": ">=8.0.0"
},
"author": "Sanity.io <hello@sanity.io>",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/webpack-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"clean": "rimraf lib"
},
"engines": {
"node": ">=6.0.0"
"node": ">=8.0.0"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-sanity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Initialize a new Sanity project",
"bin": "index.js",
"engines": {
"node": ">=6.0.0"
"node": ">=8.0.0"
},
"keywords": [
"sanity",
Expand Down
2 changes: 1 addition & 1 deletion packages/sanity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"content"
],
"engines": {
"node": ">=6.0.0"
"node": ">=8.0.0"
},
"homepage": "https://www.sanity.io/",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion scripts/normalizePackageFields.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const uniq = require('lodash/uniq')
const transformPkgs = require('./transformPkgs')

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

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

0 comments on commit 863e23a

Please sign in to comment.