Skip to content

Commit ddcb86e

Browse files
authored
Merge branch 'main' into scala_update
2 parents e6be3bf + c569cb9 commit ddcb86e

File tree

10 files changed

+526
-476
lines changed

10 files changed

+526
-476
lines changed

.github/workflows/ratCheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030

3131
steps:
3232
- name: Setup Java ☕
33-
uses: actions/setup-java@v4.4.0
33+
uses: actions/setup-java@v4.5.0
3434
with:
3535
distribution: temurin
3636
java-version: 8

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ jobs:
190190
echo "UPLOAD_URL=$UPLOAD_URL" >> $GITHUB_ENV
191191
192192
- name: Setup Java ☕
193-
uses: actions/setup-java@v4.4.0
193+
uses: actions/setup-java@v4.5.0
194194
with:
195195
distribution: temurin
196196
java-version: 8
@@ -200,7 +200,7 @@ jobs:
200200
run: mkdir -p _install
201201

202202
- name: Download linux x86 library file 🔻
203-
uses: dawidd6/action-download-artifact@v3
203+
uses: dawidd6/action-download-artifact@v6
204204
with:
205205
workflow: tests.yml
206206
branch: main
@@ -209,7 +209,7 @@ jobs:
209209
path: _install/libomega_edit_linux_amd64.so
210210

211211
- name: Download linux arm64 library file 🔻
212-
uses: dawidd6/action-download-artifact@v3
212+
uses: dawidd6/action-download-artifact@v6
213213
with:
214214
workflow: tests.yml
215215
branch: main
@@ -218,7 +218,7 @@ jobs:
218218
path: _install/libomega_edit_linux_aarch64.so
219219

220220
- name: Download macos-12 library file 🔻
221-
uses: dawidd6/action-download-artifact@v3
221+
uses: dawidd6/action-download-artifact@v6
222222
with:
223223
workflow: tests.yml
224224
branch: main
@@ -227,7 +227,7 @@ jobs:
227227
path: _install/libomega_edit_macos_aarch64.dylib
228228

229229
- name: Download macos-14 library file 🔻
230-
uses: dawidd6/action-download-artifact@v3
230+
uses: dawidd6/action-download-artifact@v6
231231
with:
232232
workflow: tests.yml
233233
branch: main
@@ -236,7 +236,7 @@ jobs:
236236
path: _install/libomega_edit_macos_x86_64.dylib
237237

238238
- name: Download windows library file 🔻
239-
uses: dawidd6/action-download-artifact@v3
239+
uses: dawidd6/action-download-artifact@v6
240240
with:
241241
workflow: tests.yml
242242
branch: main

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ cmake_minimum_required(VERSION 3.13)
1313

1414
# Project information
1515
project(omega_edit
16-
VERSION 0.9.82
16+
VERSION 0.9.83
1717
DESCRIPTION "Apache open source library for building editors"
1818
HOMEPAGE_URL "https://github.com/ctc-oss/omega-edit"
1919
LANGUAGES C CXX)

Makefile

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,22 @@ lib/$(LIBNAME): CMakeLists.txt core/CMakeLists.txt
3434
cp _install/lib/$(LIBNAME) $@
3535

3636
update-version:
37-
sed -i '' -e 's|"version": .*|"version": "$(version)",|' package.json packages/server/package.json packages/client/package.json
38-
sed -i '' -e 's|"\@omega-edit\/server": .*|"\@omega-edit\/server": "$(version)",|' packages/client/package.json
39-
sed -i '' -e '/project(omega_edit/{N;s|.* VERSION .*|project(omega_edit\n VERSION $(version)|;}' CMakeLists.txt
37+
# Make sure version is set for this target
38+
@if [ -z "$(version)" ]; then \
39+
echo "version is not set, please run \`make update-version version=1.2.3\` where 1.2.3 is the new version"; \
40+
exit 1; \
41+
fi
42+
@sed -i '' -e 's|"version": .*|"version": "$(version)",|' package.json packages/server/package.json packages/client/package.json
43+
@sed -i '' -e 's|"\@omega-edit\/server": .*|"\@omega-edit\/server": "$(version)",|' packages/client/package.json
44+
@sed -i '' -e '/project(omega_edit/{N;s|.* VERSION .*|project(omega_edit\n VERSION $(version)|;}' CMakeLists.txt
45+
@echo "------------------------------------------------------------------------"
46+
@echo "Updated version to v$(version), next steps:"
47+
@echo " git commit -am \"v$(version) [node_publish]\""
48+
@echo " git push origin main"
49+
@echo "Wait for CI to pass, then tag the release to publish the artifacts:"
50+
@echo " git tag -a v$(version) -m \"v$(version)\""
51+
@echo " git push origin v$(version)"
52+
@echo "------------------------------------------------------------------------"
4053

4154
clean:
4255
rm -rf _build _install lib/$(LIBNAME)
@@ -45,3 +58,4 @@ all: lib/$(LIBNAME)
4558
@echo $<
4659

4760
.default: all
61+
.phony: all clean update-version

core/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ if (BUILD_TESTS)
7979
Catch2
8080
GIT_SHALLOW TRUE
8181
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
82-
GIT_TAG v3.5.4
82+
GIT_TAG v3.7.0
8383
)
8484
FetchContent_MakeAvailable(Catch2)
8585
list(APPEND CMAKE_MODULE_PATH "${Catch2_SOURCE_DIR}/extras")

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@omega-edit/core",
3-
"version": "0.9.82",
3+
"version": "0.9.83",
44
"private": "true",
55
"description": "OmegaEdit Client and Server",
66
"publisher": "CTC-OSS",
@@ -24,18 +24,18 @@
2424
},
2525
"devDependencies": {
2626
"@types/chai": "^4.3.12",
27-
"@types/mocha": "^10.0.6",
28-
"@types/node": "^20.12.11",
27+
"@types/mocha": "^10.0.9",
28+
"@types/node": "^22.8.1",
2929
"chai": "^4.3.10",
3030
"copy-webpack-plugin": "^11.0.0",
3131
"eslint": "^8.57.0",
3232
"eslint-config-prettier": "^9.1.0",
33-
"eslint-plugin-prettier": "^5.1.3",
34-
"mocha": "^10.4.0",
35-
"prettier": "^3.2.5",
33+
"eslint-plugin-prettier": "^5.2.1",
34+
"mocha": "^10.7.3",
35+
"prettier": "^3.3.3",
3636
"run-script-os": "^1.1.6",
3737
"ts-loader": "^9.5.1",
38-
"typedoc": "^0.25.13",
38+
"typedoc": "^0.26.10",
3939
"typescript": "^5.4.5",
4040
"unzip-stream": "^0.3.4",
4141
"webpack": "^5.95.0",

packages/client/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@omega-edit/client",
3-
"version": "0.9.82",
3+
"version": "0.9.83",
44
"description": "OmegaEdit gRPC Client",
55
"publisher": "ctc-oss",
66
"main": "./main.js",
@@ -44,7 +44,7 @@
4444
},
4545
"dependencies": {
4646
"@grpc/grpc-js": "1.12.2",
47-
"@omega-edit/server": "0.9.82",
47+
"@omega-edit/server": "0.9.83",
4848
"@types/google-protobuf": "3.15.12",
4949
"google-protobuf": "3.21.4",
5050
"pid-port": "1.0.0",

packages/server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@omega-edit/server",
3-
"version": "0.9.82",
3+
"version": "0.9.83",
44
"description": "OmegaEdit gRPC Server",
55
"publisher": "ctc-oss",
66
"main": "./out/index.js",

packages/server/src/index.ts

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import * as path from 'path'
3737
* OR
3838
* - calls the getBinFolderPath going back a directory
3939
*/
40-
const checkForBinPath = (baseDir: string) => {
40+
const checkForBinPath = (baseDir: string): string => {
4141
const serverbasePath = 'node_modules/@omega-edit/server'
4242

4343
// These two are checked as when testing locally it will want to use out/bin
@@ -46,26 +46,28 @@ const checkForBinPath = (baseDir: string) => {
4646
path.join(baseDir, serverbasePath, 'out', 'bin'),
4747
]
4848

49-
for (let i = 0; i < pathsToCheck.length; i++) {
50-
if (fs.existsSync(pathsToCheck[i])) return path.resolve(pathsToCheck[i])
49+
for (const p of pathsToCheck) {
50+
if (fs.existsSync(p)) return path.resolve(p)
5151
}
5252

5353
return getBinFolderPath(path.join(baseDir, '..'))
5454
}
5555

5656
/**
57-
*
57+
* Recursively finds the bin folder path
5858
* @param baseDir the base path to the directory to check against
5959
* @returns
6060
* - path to bin directory
6161
* OR
6262
* - recursively calls itself till path is found
6363
*/
64-
const getBinFolderPath = (baseDir: string) => {
64+
const getBinFolderPath = (baseDir: string): string => {
6565
if (!baseDir.endsWith('node_modules')) {
66-
if (fs.readdirSync(baseDir).includes('node_modules'))
66+
if (fs.readdirSync(baseDir).includes('node_modules')) {
6767
return checkForBinPath(baseDir)
68-
else return getBinFolderPath(path.join(baseDir, '..'))
68+
} else {
69+
return getBinFolderPath(path.join(baseDir, '..'))
70+
}
6971
} else {
7072
return checkForBinPath(baseDir.replace('node_modules', ''))
7173
}
@@ -74,7 +76,7 @@ const getBinFolderPath = (baseDir: string) => {
7476
/**
7577
* Execute the server
7678
* @param args arguments to pass to the server
77-
* @returns {ChildProcess} server process
79+
* @returns {Promise<ChildProcess>} server process
7880
*/
7981
async function executeServer(args: string[]): Promise<ChildProcess> {
8082
const serverScript = path.join(
@@ -88,9 +90,10 @@ async function executeServer(args: string[]): Promise<ChildProcess> {
8890

8991
const serverProcess: ChildProcess = spawn(serverScript, args, {
9092
cwd: path.dirname(serverScript),
91-
stdio: 'ignore',
9293
detached: true,
9394
shell: os.platform().startsWith('win'), // use shell on Windows because it can't execute scripts directly
95+
stdio: ['ignore', 'ignore', 'ignore'],
96+
windowsHide: true, // avoid showing a console window
9497
})
9598

9699
serverProcess.on('error', (err: Error) => {
@@ -107,7 +110,7 @@ async function executeServer(args: string[]): Promise<ChildProcess> {
107110
* @param host hostname or IP address (default: 127.0.0.1)
108111
* @param pidfile resolved path to the PID file
109112
* @param logConf resolved path to a logback configuration file
110-
* @returns {ChildProcess} server process
113+
* @returns {Promise<ChildProcess>} server process
111114
*/
112115
export async function runServer(
113116
port: number,

0 commit comments

Comments
 (0)