Skip to content

Commit c8e9c6e

Browse files
committed
modernize
1 parent 343f273 commit c8e9c6e

File tree

6 files changed

+1138
-7820
lines changed

6 files changed

+1138
-7820
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ jobs:
88
name: build for node.js
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: mymindstorm/setup-emsdk@v7
12-
- uses: actions/checkout@v2
11+
- uses: mymindstorm/setup-emsdk@v13
12+
- uses: actions/checkout@v4
1313
- run: cmake -E make_directory build
1414
- run: emcmake cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Release
1515
working-directory: build
1616
- run: cmake --build . && cmake --build . --target install
1717
working-directory: build
1818
- name: Archive build result for js
19-
uses: actions/upload-artifact@v2
19+
uses: actions/upload-artifact@v4
2020
with:
2121
name: node_lua_with_lrdb
2222
path: node/bin/node_lua_with_lrdb.*
@@ -26,26 +26,26 @@ jobs:
2626
runs-on: ubuntu-latest
2727
steps:
2828
- name: Checkout
29-
uses: actions/checkout@v2
29+
uses: actions/checkout@v4
3030
with:
3131
fetch-depth: 0
3232
persist-credentials: false
3333
- name: Setup Node.js
34-
uses: actions/setup-node@v1
34+
uses: actions/setup-node@v4
3535
with:
36-
node-version: 12
36+
node-version: 20
3737
- name: Download a node_lua_with_lrdb
38-
uses: actions/download-artifact@v2
38+
uses: actions/download-artifact@v4
3939
with:
4040
name: node_lua_with_lrdb
4141
path: node/bin/
42-
- run: yarn
42+
- run: npm ci
4343
working-directory: node
44-
- run: yarn bundle
44+
- run: npm run bundle
4545
working-directory: node
4646
- name: Release
4747
env:
4848
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
4949
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
50-
run: yarn semantic-release
50+
run: npx semantic-release
5151
working-directory: node

.github/workflows/test.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
os: macos-latest,
4040
}
4141
steps:
42-
- uses: actions/checkout@v2
42+
- uses: actions/checkout@v4
4343

4444
- name: Create Build Environment
4545
# Some projects don't allow in-source building, so create a separate build directory
@@ -73,7 +73,7 @@ jobs:
7373
name: coverage
7474
runs-on: ubuntu-latest
7575
steps:
76-
- uses: actions/checkout@v2
76+
- uses: actions/checkout@v4
7777
- name: Install lcov
7878
run: git clone https://github.com/linux-test-project/lcov.git && cd lcov && sudo make install
7979

@@ -109,15 +109,15 @@ jobs:
109109
name: build for node.js
110110
runs-on: ubuntu-latest
111111
steps:
112-
- uses: mymindstorm/setup-emsdk@v7
113-
- uses: actions/checkout@v2
112+
- uses: mymindstorm/setup-emsdk@v11
113+
- uses: actions/checkout@v4
114114
- run: cmake -E make_directory build
115115
- run: emcmake cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Release
116116
working-directory: build
117117
- run: cmake --build . && cmake --build . --target install
118118
working-directory: build
119119
- name: Archive build result for js
120-
uses: actions/upload-artifact@v2
120+
uses: actions/upload-artifact@v4
121121
with:
122122
name: node_lua_with_lrdb
123123
path: node/bin/node_lua_with_lrdb.*
@@ -128,25 +128,25 @@ jobs:
128128
runs-on: ubuntu-latest
129129
strategy:
130130
matrix:
131-
node-version: [10.x, 12.x, 14.x]
131+
node-version: [18.x, 20.x]
132132
steps:
133-
- uses: actions/checkout@v2
133+
- uses: actions/checkout@v4
134134
- name: Use Node.js ${{ matrix.node-version }}
135-
uses: actions/setup-node@v1
135+
uses: actions/setup-node@v4
136136
with:
137137
node-version: ${{ matrix.node-version }}
138138
- name: Download a node_lua_with_lrdb
139-
uses: actions/download-artifact@v2
139+
uses: actions/download-artifact@v4
140140
with:
141141
name: node_lua_with_lrdb
142142
path: node/bin/
143-
- run: yarn
143+
- run: npm ci
144144
working-directory: node
145-
- run: yarn build
145+
- run: npm run build
146146
working-directory: node
147-
- run: yarn lint
147+
- run: npm run lint
148148
working-directory: node
149-
- run: yarn test
149+
- run: npm run test
150150
working-directory: node
151151
env:
152152
CI: true

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
set(CMAKE_LEGACY_CYGWIN_WIN32 0)
2-
cmake_minimum_required(VERSION 2.6)
2+
cmake_minimum_required(VERSION 3.16)
33
project(LRDB)
44

55
include(cmake/ReduceDependencies.cmake)
@@ -48,7 +48,7 @@ if(NOT MSVC)#-Wall nonsense on MSVC
4848
add_definitions(-Wno-variadic-macros)
4949
add_definitions ("-Wno-unused-local-typedefs")
5050
add_definitions ("-Wno-unknown-warning-option")
51-
add_definitions("-std=c++11")
51+
add_definitions("-std=c++17")
5252
endif(NOT MSVC)
5353

5454

node/package.json

Lines changed: 18 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,34 @@
55
"license": "MIT",
66
"scripts": {
77
"build": "tsc",
8-
"bundle": "yarn ncc build -m src/index.ts -o dist",
8+
"bundle": "npx ncc build -m src/index.ts -o dist",
99
"test": "jest",
1010
"lint:eslint": "eslint . --cache --ext ts",
1111
"lint:prettier": "prettier . --check",
1212
"lint": "run-s lint:eslint lint:prettier",
1313
"fix": "run-s fix:eslint fix:prettier",
14-
"fix:eslint": "yarn lint:eslint --fix",
15-
"fix:prettier": "yarn lint:prettier --write",
14+
"fix:eslint": "npm run lint:eslint -- --fix",
15+
"fix:prettier": "npm run lint:prettier -- --write",
1616
"test-ci": "jest --coverage",
1717
"clean": "rm -Rf ./dist",
1818
"prepack": "run-s clean bundle"
1919
},
2020
"devDependencies": {
21-
"@semantic-release/git": "^9.0.0",
22-
"@types/jest": "^26.0.19",
23-
"@types/node": "^14.14.16",
24-
"@typescript-eslint/eslint-plugin": "^4.9.1",
25-
"@typescript-eslint/parser": "^4.9.1",
26-
"@vercel/ncc": "^0.26.1",
27-
"eslint": "^7.15.0",
28-
"eslint-config-prettier": "^7.0.0",
29-
"eslint-plugin-jest": "^24.1.3",
30-
"jest": "^26.6.3",
21+
"@types/jest": "^29.5.12",
22+
"@types/node": "^20.11.30",
23+
"@typescript-eslint/eslint-plugin": "^7.3.1",
24+
"@typescript-eslint/parser": "^7.3.1",
25+
"@vercel/ncc": "^0.38.1",
26+
"eslint": "^8.57.0",
27+
"eslint-config-prettier": "^9.1.0",
28+
"eslint-plugin-jest": "^27.9.0",
29+
"jest": "^29.7.0",
3130
"npm-run-all": "^4.1.5",
32-
"prettier": "^2.2.1",
33-
"semantic-release": "^17.3.1",
34-
"ts-jest": "^26.4.4",
35-
"ts-node": "^9.1.1",
36-
"typescript": "^4.1.3"
31+
"prettier": "^3.2.5",
32+
"semantic-release": "^23.0.2",
33+
"ts-jest": "^29.1.2",
34+
"ts-node": "^10.9.2",
35+
"typescript": "^5.4.3"
3736
},
3837
"release": {
3938
"branches": [
@@ -42,17 +41,7 @@
4241
"plugins": [
4342
"@semantic-release/commit-analyzer",
4443
"@semantic-release/release-notes-generator",
45-
"@semantic-release/npm",
46-
[
47-
"@semantic-release/git",
48-
{
49-
"assets": [
50-
"docs",
51-
"package.json"
52-
],
53-
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
54-
}
55-
]
44+
"@semantic-release/npm"
5645
]
5746
}
5847
}

0 commit comments

Comments
 (0)