Drop support for Node.js 6, npm 3, Postgres 9.5, PostGIS 2.2, and Redis 3

This commit is contained in:
Daniel García Aubert 2019-02-21 18:55:27 +01:00
parent 0af92c4299
commit 26f8ccc3cf
8 changed files with 32 additions and 1726 deletions

View File

@ -1,79 +1,8 @@
jobs:
include:
- sudo: required
services:
- 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:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
postgresql: 9.5
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-postgis-scripts=2.2.2.0-cdb2
- sudo apt-get -y install postgresql-9.5=9.5.2-3cdb3 --allow-downgrades
- 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 --allow-downgrades
- sudo apt-get -y install postgresql-9.5-postgis-2.2=2.2.2.0-cdb2
- sudo apt-get install -q gdal-bin
- sudo apt-get install -q ogr2ogr2-static-bin
- sudo apt-get install -y libc6
- 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
# 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
- psql -c 'create database template_postgis;' -U postgres
- psql -c 'CREATE EXTENSION postgis;' -U postgres -d template_postgis
- ./configure
env:
- PGUSER=postgres CXX=g++-4.8
language: node_js
node_js:
- "6"

11
NEWS.md
View File

@ -1,10 +1,15 @@
# Changelog
**Deprecation warning**: Next major release will drop support for `Node.js 6 LTS` and `npm 3.x`. You'll be able to use the latest ES features as soon as we release 3.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 `npm-shrinkwrap.json` files.
## 2.4.1
## 3.0.0
Released 2019-mm-dd
Breaking changes:
* Drop support for Node.js 6
* Drop support for npm 3
* Drop support for Postgres 9.5
* Drop support for PosGIS 2.2
* Drop support for Redis 3
Announcements:
* Deps:
* Upgrade `debug` to version 4.1.1

View File

@ -9,36 +9,27 @@ Provides a node.js based API for running SQL queries against CartoDB.
* Authenticated requests to this API should always be made over SSL.
core requirements
-----------------
* Node >= 10.14.2 or 6.9.2
* npm >= 6.4.1 || 3.10.9 || 3.10.10
* Postgres `9.3+`.
* Postgis `2.2`.
* [CartoDB Postgres Extension](https://github.com/CartoDB/cartodb-postgresql/blob/0.19.2/README.md) `0.19+`.
## Requirements
* Node 10.x
* npm 6.x
* gcc 4.9
* PostgreSQL >= 10.0
* PostGIS >= 2.4
* CARTO Postgres Extension >= 0.24.1
* Redis >= 4
* GDAL `1.11.0` (bin utils). See [installing GDAL](http://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries)
* zip commandline tool.
* Redis `3`, recommended reversion `3.0.2`.
Install dependencies
--------------------
## Install dependencies
- Node.js >= 10.14.2:
```
$ mv npm-shrinkwrap.json npm-shrinkwrap.json.backup
$ npm ci
$ mv npm-shrinkwrap.json.backup npm-shrinkwrap.json
```
- Node.js 6.9.2:
```sh
npm install
$ npm install
```
## Usage
usage
-----
Create and edit config/environments/<environment>.js from .js.example files.
You may find the ./configure script useful to make an edited copy for you,
@ -62,13 +53,12 @@ See doc/API.md for API documentation.
For examples of use, see under test/.
tests
-----
## Tests
Run with:
```sh
npm test
$ npm test
```
If any issue arise see test/README.md

View File

@ -2,15 +2,15 @@
"name": "carto_sql_api",
"current_version": {
"requires": {
"node": ">=6.9.2 <11.0.0",
"npm": ">=3.10.9",
"node": "^10.15.1",
"npm": "^6.4.1",
"gdal":">=1.11.0"
},
"works_with": {
"redis": ">=3.0.0",
"postgresql": ">=9.5.0",
"postgis": ">=2.2.0.0",
"carto_postgresql_ext": ">=0.19.0"
"redis": ">=4.0.0",
"postgresql": ">=10.0.0",
"postgis": ">=2.4.4.5",
"carto_postgresql_ext": ">=0.24.1"
}
}
}

1608
npm-shrinkwrap.json generated

File diff suppressed because it is too large Load Diff

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "cartodb_sql_api",
"version": "2.4.1",
"version": "3.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -5,7 +5,7 @@
"keywords": [
"cartodb"
],
"version": "2.4.1",
"version": "3.0.0",
"repository": {
"type": "git",
"url": "git://github.com/CartoDB/CartoDB-SQL-API.git"

View File

@ -14,17 +14,7 @@ echo "npm version:"
npm -v
# install dependencies
if [ "$NODEJS_VERSION" = "6.9.2" ];
then
mv package-lock.json package-lock.json.backup
npm i
npm ls
mv package-lock.json.backup package-lock.json
else
mv npm-shrinkwrap.json npm-shrinkwrap.json.backup
npm ci
npm ls
mv npm-shrinkwrap.json.backup npm-shrinkwrap.json
fi
npm ci
npm ls
npm test