Drop suppor for Node.js 6, npm 3, yarn and redis 3

remotes/origin/fix-typo-patch-1
Daniel García Aubert 6 years ago
parent e93dd982b9
commit 85e19bf16c

@ -5,86 +5,4 @@ jobs:
- docker
language: generic
before_install: docker pull carto/nodejs-xenial-pg101:latest
script: npm run docker-test -- 6.9.2
- sudo: required
services:
- docker
language: generic
before_install: docker pull carto/nodejs-xenial-pg101:latest
script: npm run docker-test -- 10.15.1
- dist: precise
addons:
postgresql: "9.5"
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- pkg-config
- libcairo2-dev
- libjpeg8-dev
- libgif-dev
- libpango1.0-dev
- g++-4.9
- wget
before_install:
# Add custom PPAs from cartodb
- sudo add-apt-repository -y ppa:cartodb/postgresql-9.5
- sudo add-apt-repository -y ppa:cartodb/gis
- sudo add-apt-repository -y ppa:cartodb/gis-testing
- sudo apt-get update
# Force instalation of libgeos-3.5.0 (presumably needed because of existing version of postgis)
- sudo apt-get -y install libgeos-3.5.0=3.5.0-1cdb2
# Install postgres db and build deps
- sudo /etc/init.d/postgresql stop # stop travis default instance
- sudo apt-get -y remove --purge postgresql-9.1
- sudo apt-get -y remove --purge postgresql-9.2
- sudo apt-get -y remove --purge postgresql-9.3
- sudo apt-get -y remove --purge postgresql-9.4
- sudo apt-get -y remove --purge postgresql-9.5
- sudo apt-get -y remove --purge postgresql-9.6
- sudo rm -rf /var/lib/postgresql/
- sudo rm -rf /var/log/postgresql/
- sudo rm -rf /etc/postgresql/
- sudo apt-get -y remove --purge postgis-2.2
- sudo apt-get -y autoremove
- sudo apt-get -y install postgresql-9.5=9.5.2-3cdb3
- sudo apt-get -y install postgresql-server-dev-9.5=9.5.2-3cdb3
- sudo apt-get -y install postgresql-plpython-9.5=9.5.2-3cdb3
- sudo apt-get -y install postgresql-9.5-postgis-scripts=2.2.2.0-cdb2
- sudo apt-get -y install postgresql-9.5-postgis-2.2=2.2.2.0-cdb2
# configure it to accept local connections from postgres
- echo -e "# TYPE DATABASE USER ADDRESS METHOD \nlocal all postgres trust\nlocal all all trust\nhost all all 127.0.0.1/32 trust" \
| sudo tee /etc/postgresql/9.5/main/pg_hba.conf
- sudo /etc/init.d/postgresql restart 9.5
- createdb template_postgis
- createuser publicuser
- psql -c "CREATE EXTENSION postgis" template_postgis
- psql -c "select version();" template_postgis
- psql -c "select postgis_version();" template_postgis
# install yarn 0.27.5
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 0.27.5
- export PATH="$HOME/.yarn/bin:$PATH"
# instal redis 4
- wget http://download.redis.io/releases/redis-4.0.8.tar.gz
- tar xvzf redis-4.0.8.tar.gz
- cd redis-4.0.8
- make
- sudo make install
- cd ..
- rm redis-4.0.8.tar.gz
env:
- NPROCS=1 JOBS=1 PGUSER=postgres CXX=g++-4.9
language: node_js
node_js:
- "6"
script: npm run docker-test -- 10.15.1 # Node.js version

@ -2,7 +2,7 @@
2. Ensure proper version in package.json and package-lock.json
3. Ensure NEWS section exists for the new version, review it, add release date
4. If there are modified dependencies in package.json, update them with `npm upgrade {{package_name}}@{{version}}`
5. Commit package.json, package-lock.json (or yarn.lock), NEWS
5. Commit package.json, package-lock.json, NEWS
6. git tag -a Major.Minor.Patch # use NEWS section as content
7. Stub NEWS/package for next version

@ -4,32 +4,21 @@
Make sure that you have the requirements needed. These are
- Core
- Node >= 10.14.2 or 6.9.2
- npm >= 6.4.1 or yarn >= 0.27.5
- PostgreSQL >8.3.x, PostGIS >1.5.x
- Redis >2.4.0 (http://www.redis.io)
- Mapnik >3.x. See [Installing Mapnik](https://github.com/CartoDB/Windshaft#installing-mapnik).
- Node >= 10
- npm >= 6
- gcc == 4.9
- PostgreSQL >= 9.5
- PostGIS >= 2.2
- CartoDB Postgres Extension == 0.24.1
- Redis >= 4
- Mapnik == 3.0.15.9. See [Installing Mapnik](https://github.com/CartoDB/Windshaft#installing-mapnik).
- Windshaft: check [Windshaft dependencies and installation notes](https://github.com/CartoDB/Windshaft#dependencies)
- libcairo2-dev, libpango1.0-dev, libjpeg8-dev and libgif-dev for server side canvas support
- For cache control (optional)
- CartoDB 0.9.5+ (for `CDB_QueryTables`)
- For cache control
- Varnish (http://www.varnish-cache.org)
On Ubuntu 14.04 the dependencies can be installed with
```shell
sudo apt-get update
sudo apt-get install -y make g++ pkg-config git-core \
libgif-dev libjpeg-dev libcairo2-dev \
libhiredis-dev redis-server \
nodejs nodejs-legacy npm \
postgresql-9.3-postgis-2.1 postgresql-plpython-9.3 postgresql-server-dev-9.3
```
On Ubuntu 12.04 the [cartodb/cairo PPA](https://launchpad.net/~cartodb/+archive/ubuntu/cairo) may be useful.
## PostGIS setup ##
## PostGIS setup
A `template_postgis` database is expected. One can be set up with
@ -38,21 +27,15 @@ createdb --owner postgres --template template0 template_postgis
psql -d template_postgis -c 'CREATE EXTENSION postgis;'
```
## Build/install ##
## Build/install
To fetch and build all node-based dependencies, run:
- Node.js >= 10.14.2:
```shell
npm ci
```
- Node.js 6.9.2:
```shell
yarn
npm install
```
Note that the ```npm``` (or ```yarn```) step will populate the node_modules/
Note that the ```npm``` step will populate the node_modules/
directory with modules, some of which being compiled on demand. If you
happen to have startup errors you may need to force rebuilding those
modules. At any time just wipe out the node_modules/ directory and run

@ -1,9 +1,13 @@
# Changelog
**Deprecation warning**: Next major release will drop support for `Node.js 6 LTS`, `npm 3.x` and `yarn`. You'll be able to use the latest ES features as soon as we release 7.0.0. In the meantime, as a developer, you should keep compatibility with Node.js 6 LTS and keep updated both `package-lock.json` and `yarn.lock` files.
## 6.6.0
Released 2019-mm-dd
## 7.0.0
Released 2018-mm-dd
Breaking changes:
- Drop support for Postgres 9.5
- Drop support for Node.js 6
- Drop support for npm 3
- Stop supporting `yarn.lock`
Announcements:
- Update docs: compatible Node.js and npm versions

@ -31,21 +31,11 @@ Upgrading
Checkout your commit/branch. If you need to reinstall dependencies (you can check [NEWS](NEWS.md)) do the following:
- Node.js >= 10.14.2:
```sh
$ rm -rf node_modules
$ npm install
```
- Node.js 6.9.2:
```
$ rm -rf node_modules
$ yarn
```
Run
---
```
node app.js <env>
```
@ -79,20 +69,12 @@ See [CONTRIBUTING.md](CONTRIBUTING.md).
### Developing with a custom windshaft version
If you plan or want to use a custom / not released yet version of windshaft (or any other dependency) the best option is
to use `yarn link`. You can read more about it at [yarn-link: Symlink a package folder](https://yarnpkg.com/en/docs/cli/link).
to use `npm link`. You can read more about it at [npm-link: Symlink a package folder](https://docs.npmjs.com/cli/link.html).
**Quick start**:
- Node.js >= 10.14.2:
```shell
~/windshaft-directory $ npm ci
~/windshaft-directory $ npm install
~/windshaft-directory $ npm link
~/windshaft-cartodb-directory $ npm link windshaft
```
- Node.js 6.9.2:
```shell
~/windshaft-directory $ yarn
~/windshaft-directory $ yarn link
~/windshaft-cartodb-directory $ yarn link windshaft
```

@ -2,13 +2,12 @@
"name": "carto_windshaft",
"current_version": {
"requires": {
"node": ">=6.9.2 <11.0.0",
"yarn": ">=0.27.5 <1.0.0",
"node": ">=10.15.1",
"mapnik": "==3.0.15.9",
"crankshaft": "~0.8.1"
},
"works_with": {
"redis": ">=3.0.0",
"redis": ">=4.0.0",
"postgresql": ">=9.5.0",
"postgis": ">=2.2.0.0",
"carto_postgresql_ext": ">=0.19.0"

2
package-lock.json generated

@ -1,6 +1,6 @@
{
"name": "windshaft-cartodb",
"version": "6.6.0",
"version": "7.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

@ -1,7 +1,7 @@
{
"private": true,
"name": "windshaft-cartodb",
"version": "6.6.0",
"version": "7.0.0",
"description": "A map tile server for CartoDB",
"keywords": [
"cartodb"
@ -66,13 +66,12 @@
"lint": "jshint lib test app.js",
"preinstall": "make pre-install",
"test": "make test-all",
"update-internal-deps": "rm -rf node_modules && rm -f yarn.lock && yarn",
"update-internal-deps": "rm -rf node_modules && npm install",
"docker-test": "./docker-test.sh",
"docker-bash": "./docker-bash.sh"
},
"engines": {
"node": "^6.9.2 || ^10.12.0",
"npm": "^3.10.9 || ^6.4.1",
"yarn": "0.27.5"
"node": "^10.15.1",
"npm": "^6.4.1"
}
}

@ -7,19 +7,12 @@ source /src/nodejs-install.sh
echo "Node.js version: "
node -v
# install dependencies
if [ "$NODEJS_VERSION" = "6.9.2" ];
then
npm install -g yarn@0.27.5
echo "yarn version on install:"
yarn --version
yarn
else
echo "npm version:"
npm -v
npm ci
npm ls
fi
echo "npm version: "
npm -v
echo "Clean install: "
npm ci
npm ls
# run tests
npm test

@ -4,4 +4,4 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig
fi
yarn
npm install

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save