Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Development Environment - Support Node v14 #190

Closed
wants to merge 41 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
f162730
update node package esm from ~3.0.0 to ^3.2.25
astridx Jun 29, 2021
600f691
wip - npm run test is fine, npm run watch-query fail - the way to loa…
astridx Jul 1, 2021
9ead547
change rollup so that build is no fine too, we need to remove and add…
astridx Jul 2, 2021
b89e0ad
correction: File extension removed for uniformity
astridx Jul 2, 2021
9ac9bb5
correction: add forgotton git last line
astridx Jul 2, 2021
7127436
Merge branch 'main' of https://github.com/maplibre/maplibre-gl-js int…
astridx Jul 2, 2021
02bcca7
add .nvmrc
astridx Jul 2, 2021
9ebf635
change version number in package.json
astridx Jul 2, 2021
9e1dddf
change node version number in circleci/config.yml
astridx Jul 2, 2021
e161125
revert circleci/config.yml
astridx Jul 2, 2021
15859a4
circle yml again
astridx Jul 2, 2021
3b0f293
revert changes in yarn.lock
astridx Jul 2, 2021
7b34fa7
revert version change in package.json because of ci build error
astridx Jul 2, 2021
29a3dc6
revert version change in circle yml because of ci build error
astridx Jul 2, 2021
323131e
yarn.lock
astridx Jul 2, 2021
e57395a
Merge branch 'main' of https://github.com/maplibre/maplibre-gl-js int…
astridx Jul 3, 2021
8893548
update node dependencies
astridx Jul 4, 2021
596b6f3
wip
astridx Jul 5, 2021
31e9571
wip
astridx Jul 6, 2021
5c7622a
wip work on dependencies
astridx Jul 7, 2021
cd55f17
wip
astridx Jul 7, 2021
8fd3376
i think esm-package is not good, we should use type=modul in package.…
astridx Jul 7, 2021
25b91fb
git workflow changes for node 14
astridx Jul 7, 2021
d043ace
yarn lock
astridx Jul 7, 2021
d1e49b9
Merge branch 'main' of https://github.com/maplibre/maplibre-gl-js int…
astridx Jul 7, 2021
768ca44
build should be fine, assert is removed from min
astridx Jul 7, 2021
12311f2
make lint green
astridx Jul 7, 2021
fd61026
Merge branch 'main' of https://github.com/maplibre/maplibre-gl-js int…
astridx Jul 7, 2021
f1fc42d
eslintignore correction and gitignore add
astridx Jul 7, 2021
035cf50
wip lint
astridx Jul 7, 2021
33b192c
hopefully fix test-unit
astridx Jul 7, 2021
4a295c0
Merge branch 'main' of https://github.com/maplibre/maplibre-gl-js int…
astridx Jul 7, 2021
e08e672
work on flow
astridx Jul 8, 2021
c58e915
mainly work on test-query
astridx Jul 8, 2021
f115143
corrections
astridx Jul 8, 2021
9009da5
mainly run codegen
astridx Jul 8, 2021
8db968e
print release url
astridx Jul 8, 2021
213629d
show no warnings and on missing file extension
astridx Jul 8, 2021
45344fe
add coss-env again
astridx Jul 8, 2021
fe9f5a4
changelog
astridx Jul 8, 2021
cf8db0b
use cjs instead of extra path for test-query
astridx Jul 9, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ workflows:

defaults: &defaults
docker:
- image: circleci/node:10.16-browsers
- image: circleci/node:14.16-browsers
working_directory: ~/mapbox-gl-js

jobs:
Expand All @@ -85,10 +85,10 @@ jobs:
- checkout
- restore_cache:
keys:
- v3-yarn-{{ checksum "yarn.lock" }}
- v4-yarn-{{ checksum "yarn.lock" }}
- run: yarn
- save_cache:
key: v3-yarn-{{ checksum "yarn.lock" }}
key: v4-yarn-{{ checksum "yarn.lock" }}
paths:
- '~/.yarn'
- 'node_modules'
Expand Down
33 changes: 33 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
rollup/build/
dist/*
*.es.js
*.js.map
node_modules
package-lock.json
*.sublime-*
coverage
flow-coverage
.DS_Store
.nyc_output
*_generated.js
*_generated.js.map
test/integration/**/index*.html
test/integration/**/actual.png
test/integration/**/actual.json
test/integration/**/diff.png
test/integration/**/test-results.xml
test/integration/dist/**/*.js
test/integration/dist/**/*.json
.eslintcache
src/style-spec/dist/index.js
_batfish_site
_batfish_tmp
_site
yarn-error.log
yarn-debug.log
npm-debug.log
.idea
*.iml

bench/benchmarks_view.js
test/build/style-spec.test.js
21 changes: 16 additions & 5 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
"plugin:flowtype/recommended",
"plugin:import/recommended"
],
"parser": "babel-eslint",
"parser": "@babel/eslint-parser",
"parserOptions": {
"sourceType": "module"
"sourceType": "module",
"requireConfigFile": false,
"babelOptions": {
"presets": ["@babel/preset-flow"]
}
},
"plugins": [
"flowtype",
Expand All @@ -22,14 +26,21 @@
"no-duplicate-imports": "off",
"import/no-duplicates": "error",

// temporarily disabled for easier upgrading of dependencies
// compatibility with native ESM
"import/extensions": ["error", {
"js": "always",
"json": "always"
}],

"implicit-arrow-linebreak": "off",
"arrow-parens": "off",
"arrow-body-style": "off",
"no-confusing-arrow": "off",
"no-control-regex": "off",
"no-invalid-this": "off",
"no-buffer-constructor": "off",
"no-prototype-builtins": "off",
"accessor-pairs": "off",
"require-atomic-updates": "off",

"array-bracket-spacing": "off",
"consistent-return": "off",
Expand Down Expand Up @@ -72,7 +83,7 @@
"parameters": "off"
}
}],
"no-multiple-empty-lines": [ "error", {
"no-multiple-empty-lines": [ "error", {
"max": 1
}],
"jsdoc/check-param-names": "warn",
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
# report status back to pull request
- uses: haya14busa/action-workflow_run-status@v1
- uses: actions/checkout@v2
- name: Use Node.js 10 x64
- name: Use Node.js 14 x64
uses: actions/setup-node@v2-beta
with:
node-version: 10
node-version: 14
architecture: x64
- run: yarn install --frozen-lockfile
- name: Download branch artifact
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- name: Use Node.js 10 x64
- name: Use Node.js 14 x64
uses: actions/setup-node@v2-beta
with:
node-version: 10
node-version: 14
architecture: x64
- run: yarn install --frozen-lockfile
- run: yarn run build-prod-min
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- macos-latest
- windows-latest
node_version:
- 10
- 14
architecture:
- x64

Expand All @@ -42,10 +42,10 @@ jobs:
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- name: Use Node.js 10 x64
- name: Use Node.js 14 x64
uses: actions/setup-node@v2-beta
with:
node-version: 10
node-version: 14
architecture: x64
- run: yarn install --frozen-lockfile
- run: yarn run lint
Expand All @@ -57,10 +57,10 @@ jobs:
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- name: Use Node.js 10 x64
- name: Use Node.js 14 x64
uses: actions/setup-node@v2-beta
with:
node-version: 10
node-version: 14
architecture: x64
- run: yarn install --frozen-lockfile
- run: yarn run test-flow
Expand All @@ -70,10 +70,10 @@ jobs:
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- name: Use Node.js 10 x64
- name: Use Node.js 14 x64
uses: actions/setup-node@v2-beta
with:
node-version: 10
node-version: 14
architecture: x64
- run: yarn install --frozen-lockfile
# see: https://github.com/stackgl/headless-gl#how-can-headless-gl-be-used-on-a-headless-linux-machine
Expand All @@ -84,10 +84,10 @@ jobs:
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- name: Use Node.js 10 x64
- name: Use Node.js 14 x64
uses: actions/setup-node@v2-beta
with:
node-version: 10
node-version: 14
architecture: x64
- run: yarn install --frozen-lockfile
- run: yarn run test-query
Expand All @@ -105,10 +105,10 @@ jobs:
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- name: Use Node.js 10 x64
- name: Use Node.js 14 x64
uses: actions/setup-node@v2-beta
with:
node-version: 10
node-version: 14
architecture: x64
- run: yarn install --frozen-lockfile
- run: yarn run test-expressions
Expand All @@ -120,10 +120,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 10 x64
- name: Use Node.js 14 x64
uses: actions/setup-node@v2-beta
with:
node-version: 10
node-version: 14
architecture: x64
- run: yarn install --frozen-lockfile
- run: yarn run build-dev
Expand All @@ -146,10 +146,10 @@ jobs:
# needs: [build]
# steps:
# - uses: actions/checkout@v2
# - name: Use Node.js 10 x64
# - name: Use Node.js 14 x64
# uses: actions/setup-node@v2-beta
# with:
# node-version: 10
# node-version: 14
# architecture: x64
# - run: yarn install --frozen-lockfile
# - uses: actions/download-artifact@v2
Expand All @@ -166,10 +166,10 @@ jobs:
# test-render:
# runs-on: ubuntu-latest
# steps:
# - name: Use Node.js 10 x64
# - name: Use Node.js 14 x64
# uses: actions/setup-node@v2-beta
# with:
# node-version: 10
# node-version: 14
# architecture: x64
# - run: yarn install --frozen-lockfile
# - run: yarn run test-render
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
with:
fetch-depth: 0

- name: Use Node.js 10 x64
- name: Use Node.js 14 x64
uses: actions/setup-node@v2
with:
node-version: 10
node-version: 14
architecture: x64
registry-url: 'https://registry.npmjs.org'

Expand Down Expand Up @@ -70,10 +70,10 @@ jobs:
with:
fetch-depth: 0

- name: Use Node.js 10 x64
- name: Use Node.js 14 x64
uses: actions/setup-node@v2
with:
node-version: 10
node-version: 14
architecture: x64
registry-url: 'https://registry.npmjs.org'

Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14.16
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### Features and improvements

- *...Add new stuff here...*
- Update development environment to support Node 14 (#190)

### 🐞 Bug fixes

Expand Down
18 changes: 9 additions & 9 deletions bench/benchmarks/expressions.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// @flow

import Benchmark from '../lib/benchmark';
import Benchmark from '../lib/benchmark.js';

import spec from '../../src/style-spec/reference/latest';
import convertFunction from '../../src/style-spec/function/convert';
import {isFunction, createFunction} from '../../src/style-spec/function';
import {createPropertyExpression} from '../../src/style-spec/expression';
import fetchStyle from '../lib/fetch_style';
import spec from '../../src/style-spec/reference/latest.js';
import convertFunction from '../../src/style-spec/function/convert.js';
import {isFunction, createFunction} from '../../src/style-spec/function/index.js';
import {createPropertyExpression} from '../../src/style-spec/expression/index.js';
import fetchStyle from '../lib/fetch_style.js';

import type {StyleSpecification} from '../../src/style-spec/types';
import type {StylePropertySpecification} from '../../src/style-spec/style-spec';
import type {StylePropertyExpression} from '../../src/style-spec/expression';
import type {StyleSpecification} from '../../src/style-spec/types.js';
import type {StylePropertySpecification} from '../../src/style-spec/style-spec.js';
import type {StylePropertyExpression} from '../../src/style-spec/expression/index.js';

class ExpressionBenchmark extends Benchmark {
data: Array<{
Expand Down
4 changes: 2 additions & 2 deletions bench/benchmarks/filter_create.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// @flow

import Benchmark from '../lib/benchmark';
import Benchmark from '../lib/benchmark.js';

import createFilter from '../../src/style-spec/feature_filter';
import createFilter from '../../src/style-spec/feature_filter/index.js';
import filters from '../data/filters.json';

export default class FilterCreate extends Benchmark {
Expand Down
5 changes: 2 additions & 3 deletions bench/benchmarks/filter_evaluate.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@

import Benchmark from '../lib/benchmark';
import Benchmark from '../lib/benchmark.js';
import {VectorTile} from '@mapbox/vector-tile';
import Pbf from 'pbf';
import createFilter from '../../src/style-spec/feature_filter';
import createFilter from '../../src/style-spec/feature_filter/index.js';
import filters from '../data/filters.json';
import assert from 'assert';

Expand Down
6 changes: 3 additions & 3 deletions bench/benchmarks/hillshade_load.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// @flow

import Benchmark from '../lib/benchmark';
import createMap from '../lib/create_map';
import type {StyleSpecification} from '../../src/style-spec/types';
import Benchmark from '../lib/benchmark.js';
import createMap from '../lib/create_map.js';
import type {StyleSpecification} from '../../src/style-spec/types.js';

export default class HillshadeLoad extends Benchmark {
style: StyleSpecification;
Expand Down
4 changes: 2 additions & 2 deletions bench/benchmarks/layers.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import Benchmark from '../lib/benchmark';
import createMap from '../lib/create_map';
import Benchmark from '../lib/benchmark.js';
import createMap from '../lib/create_map.js';
import style from '../data/empty.json';

const width = 1024;
Expand Down
10 changes: 5 additions & 5 deletions bench/benchmarks/layout.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// @flow

import type {StyleSpecification} from '../../src/style-spec/types';
import Benchmark from '../lib/benchmark';
import fetchStyle from '../lib/fetch_style';
import TileParser from '../lib/tile_parser';
import {OverscaledTileID} from '../../src/source/tile_id';
import type {StyleSpecification} from '../../src/style-spec/types.js';
import Benchmark from '../lib/benchmark.js';
import fetchStyle from '../lib/fetch_style.js';
import TileParser from '../lib/tile_parser.js';
import {OverscaledTileID} from '../../src/source/tile_id.js';

export default class Layout extends Benchmark {
tiles: Array<{tileID: OverscaledTileID, buffer: ArrayBuffer}>;
Expand Down
6 changes: 3 additions & 3 deletions bench/benchmarks/layout_dds.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// @flow

import Benchmark from '../lib/benchmark';
import TileParser from '../lib/tile_parser';
import {OverscaledTileID} from '../../src/source/tile_id';
import Benchmark from '../lib/benchmark.js';
import TileParser from '../lib/tile_parser.js';
import {OverscaledTileID} from '../../src/source/tile_id.js';

const LAYER_COUNT = 2;

Expand Down
4 changes: 2 additions & 2 deletions bench/benchmarks/map_load.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import Benchmark from '../lib/benchmark';
import createMap from '../lib/create_map';
import Benchmark from '../lib/benchmark.js';
import createMap from '../lib/create_map.js';

export default class MapLoad extends Benchmark {
bench() {
Expand Down
6 changes: 3 additions & 3 deletions bench/benchmarks/paint.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// @flow

import Benchmark from '../lib/benchmark';
import createMap from '../lib/create_map';
import type Map from '../../src/ui/map';
import Benchmark from '../lib/benchmark.js';
import createMap from '../lib/create_map.js';
import type Map from '../../src/ui/map.js';

const width = 1024;
const height = 768;
Expand Down
Loading