Skip to content

Commit 38730ad

Browse files
authored
feat!: update to Node.js 24 and modernize tooling (MAPCO-9810) (#54)
* feat!: update to Node.js 24 and modernize tooling BREAKING CHANGE: Minimum Node.js version updated from v20 to v24 - Migrate to ESLint 9 flat config with @map-colonies/eslint-config v6 - Update TypeScript to 5.8, Jest to 30, and other dependencies - Modernize CI/CD to use MapColonies/shared-workflows - Add release-please for automated releases - Add dependabot for automated dependency updates - Fix all linting errors and improve type imports - Add local BBox2d type to avoid internal turf imports * chore: add Jira integration workflow and update package-lock.json dependencies * chore: fix formatting of engines section in package.json * chore: update imports to use 'import type' for geojson types * chore: enhance countVertices function to handle GeometryCollection type * chore: improve error handling for unsupported geometry types in countVertices function * chore: update coverage thresholds and add tests for GeometryCollection in countVertices function
1 parent 81dcda3 commit 38730ad

44 files changed

Lines changed: 10285 additions & 24215 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/actions/init-npm/action.yaml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/dependabot.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/dependabot-2.0.json
2+
version: 2
3+
updates:
4+
# npm dependencies
5+
- package-ecosystem: npm
6+
target-branch: 'master'
7+
schedule:
8+
interval: weekly
9+
allow:
10+
- dependency-type: production
11+
directory: /
12+
commit-message:
13+
prefix: 'deps'
14+
groups:
15+
map-colonies:
16+
patterns:
17+
- '@map-colonies/*'
18+
opentelemetry:
19+
patterns:
20+
- '@opentelemetry/*'
21+
patch:
22+
update-types:
23+
- patch
24+
25+
# npm dev dependencies
26+
- package-ecosystem: npm
27+
schedule:
28+
interval: weekly
29+
allow:
30+
- dependency-type: development
31+
directory: /
32+
commit-message:
33+
prefix: 'devdeps'
34+
groups:
35+
map-colonies:
36+
patterns:
37+
- '@map-colonies/*'
38+
opentelemetry:
39+
patterns:
40+
- '@opentelemetry/*'
41+
types:
42+
patterns:
43+
- '@types/*'
44+
dev-patch:
45+
update-types:
46+
- patch
47+
48+
# GitHub Actions
49+
- package-ecosystem: github-actions
50+
schedule:
51+
interval: weekly
52+
commit-message:
53+
prefix: 'ci'
54+
directory: '/'
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Jira Integration
2+
on:
3+
pull_request:
4+
types: [opened, edited, synchronize]
5+
6+
permissions:
7+
statuses: write
8+
pull-requests: write
9+
10+
jobs:
11+
jira-validation:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: mapcolonies/javascript-github-actions/actions/jira-integration@jira-integration-v1

.github/workflows/publish.yaml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,25 @@ name: publish
22

33
on:
44
workflow_dispatch:
5-
release:
5+
release:
66
types: [published]
77

8+
permissions:
9+
id-token: write
10+
contents: read
11+
812
jobs:
913
publish:
1014
runs-on: ubuntu-latest
11-
permissions:
12-
contents: read
13-
packages: write # allow GITHUB_TOKEN to publish packages
1415
steps:
1516
- uses: actions/checkout@v4
16-
- name: Init nodejs
17-
uses: ./.github/actions/init-npm
17+
18+
- name: Init Nodejs
19+
uses: MapColonies/shared-workflows/actions/init-npm@init-npm-v1
1820
with:
19-
node-version: 20.x
21+
node-version: 24.x
22+
2023
- uses: JS-DevTools/npm-publish@v3
2124
with:
2225
token: ${{ secrets.NPM_TOKEN }}
26+
provenance: true

.github/workflows/publish_package.yaml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/pull_request.yml

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,43 @@ jobs:
44
tests:
55
name: Run Tests
66
runs-on: ubuntu-latest
7+
78
strategy:
89
matrix:
9-
node: [ 20.x, 22.x]
10+
node: [24.x]
11+
1012
steps:
11-
- name: Check out Git repository
13+
- name: Check out TS Project Git repository
1214
uses: actions/checkout@v4
15+
1316
- name: Install GDAL
1417
run: |
1518
sudo apt-get update
1619
sudo apt-get install -y gdal-bin
17-
- name: Set up Node.js
18-
uses: actions/setup-node@v4
20+
21+
- name: Init Nodejs
22+
uses: MapColonies/shared-workflows/actions/init-npm@init-npm-v1
1923
with:
2024
node-version: ${{ matrix.node }}
21-
- name: Install Node.js dependencies
22-
run: npm ci
25+
2326
- name: Run tests
2427
run: npm run test
28+
2529
- uses: actions/upload-artifact@v4
2630
with:
27-
name: Test Reporters-${{ matrix.node }}
28-
path: reports/**
31+
name: Test Reporters ${{ matrix.node }}
32+
path: ./reports/**
33+
2934
eslint:
3035
name: Run TS Project eslint
3136
runs-on: ubuntu-latest
37+
38+
strategy:
39+
matrix:
40+
node: [24.x]
41+
3242
steps:
33-
- name: Check out TS Project Git repository
34-
uses: actions/checkout@v4
35-
- name: Set up Node.js
36-
uses: actions/setup-node@v4
37-
with:
38-
node-version: 20
39-
- name: Install TS Project dependencies
40-
run: npm install
4143
- name: Run TS Project linters
42-
uses: wearerequired/lint-action@v2
44+
uses: MapColonies/shared-workflows/actions/eslint@eslint-v1.0.1
4345
with:
44-
github_token: ${{ secrets.github_token }}
45-
# Enable linters
46-
eslint: true
47-
prettier: true
48-
eslint_extensions: ts
46+
node_version: ${{ matrix.node }}

.github/workflows/release-on-tag-push.yaml

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
10+
name: release-please
11+
12+
jobs:
13+
release-please:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: googleapis/release-please-action@v4
17+
with:
18+
token: ${{ secrets.GH_PAT }}

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx commitlint --edit ${1}

0 commit comments

Comments
 (0)