Skip to content

Commit

Permalink
The ESM problem - executing the controller itself as an ESM module (#…
Browse files Browse the repository at this point in the history
…2681)

* ts port of cliMessage

* port cliPlugin to ts

* port cli process

* improve arr filter typing

* for reinstall remove the package manually first

- closes #2667

* started working on the notorious ESM problem

* further work on porting to esm

* more work towards full esm

* fix lint

* make build work

* rm ts-expect-error

* fix types in tests

* fix adapter and add nvmrc, fix tests not starting

* own implementation of get-spdx-license-ids to get rid of request module

* log the stack on installation broken as these are often deeper issues

* added missing file extension

* get rid of requires in hasServer functions

* fix parsing cli args in adapter

- e.g. mocha passes arguments to the process, we now parsing them more accurate

* update testing

* optimize things found during own review

* try to increase timeout for file like done for redis in past

* update mocha

* register tests in nona sync fashion (try to fix problem that states jsonl tests not run on ci)
  • Loading branch information
foxriver76 authored Apr 18, 2024
1 parent 79fe972 commit 165fc4c
Show file tree
Hide file tree
Showing 149 changed files with 4,525 additions and 12,449 deletions.
13 changes: 10 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"eslint:recommended",
"plugin:prettier/recommended"
],
"plugins": [],
"plugins": [
"unicorn"
],
"ignorePatterns": [
"**/doc",
"**/build"
Expand Down Expand Up @@ -72,10 +74,13 @@
"no-trailing-spaces": "error",
"prettier/prettier": "error",
"no-nested-ternary": "off",
"no-unneeded-ternary": "error"
"no-unneeded-ternary": "error",
"unicorn/prefer-module": "error",
"unicorn/prefer-node-protocol": "error"
},
"parserOptions": {
"ecmaVersion": 2021
"sourceType": "module",
"ecmaVersion": 2022
},
"overrides": [
{
Expand All @@ -87,6 +92,8 @@
},
"files": [
"**/*.ts",
"**/*.cts",
"**/*.mts",
"**/*.tsx"
],
"extends": [
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Use Node.js 16
- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18

- name: NPM install
run: npm i --ignore-scripts # install typescript and @types do not `setup first`
Expand All @@ -43,7 +43,7 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-20.04, macos-latest]
node: [16, 18, 20]
node: [18, 20]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -124,11 +124,11 @@ jobs:
if: steps.automerge.outputs.mergeResult == 'merged'
uses: actions/checkout@v4

- name: Use Node.js 16
- name: Use Node.js 18
if: steps.automerge.outputs.mergeResult == 'merged'
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18

- name: Determine version
if: steps.automerge.outputs.mergeResult == 'merged'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-dev-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

strategy:
matrix:
node: [16.x] # This should be LTS
node: [18.x] # This should be LTS

steps:
- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/official-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

strategy:
matrix:
node: [16.x] # This should be LTS
node: [18.x] # This should be LTS

steps:
- name: Checkout code
Expand Down
3 changes: 3 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"loader": "ts-node/esm"
}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
292 changes: 0 additions & 292 deletions gulpfile.js

This file was deleted.

Loading

0 comments on commit 165fc4c

Please sign in to comment.