Skip to content

Commit b40ada9

Browse files
authored
Merge pull request #731 from Kipper-Lang/721-bug-internal-references-to-class-properties-without-this-are-allowed-but-throw-runtime-error
Fixed internal references to class properties without `this` being allowed and throwing runtime errors
2 parents 6fb333c + 6da48fb commit b40ada9

24 files changed

Lines changed: 255 additions & 169 deletions

.github/workflows/cov-badge.yml

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

1515
strategy:
1616
matrix:
17-
node-version: [16.x]
17+
node-version: [22.19.x]
1818

1919
steps:
2020
- name: Checkout repository

.github/workflows/nodejs-cli-run.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
node-version: [16.x, 18.x, 20.x, 22.x]
15+
node-version: [16.x, 18.x, 20.x, 22.x, 24.x]
1616

1717
steps:
1818
- uses: actions/checkout@v4
@@ -34,7 +34,7 @@ jobs:
3434

3535
strategy:
3636
matrix:
37-
node-version: [16.x, 18.x, 20.x, 22.x]
37+
node-version: [16.x, 18.x, 20.x, 22.x, 24.x]
3838

3939
steps:
4040
- uses: actions/checkout@v4
@@ -56,7 +56,7 @@ jobs:
5656

5757
strategy:
5858
matrix:
59-
node-version: [16.x, 18.x, 20.x, 22.x]
59+
node-version: [16.x, 18.x, 20.x, 22.x, 24.x]
6060

6161
steps:
6262
- uses: actions/checkout@v4

.github/workflows/nodejs-test.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99

1010
strategy:
1111
matrix:
12-
node-version: [16.x, 18.x, 20.x, 22.x]
12+
node-version: [16.x, 18.x, 20.x, 22.19.x, 24.x]
1313

1414
steps:
1515
- uses: actions/checkout@v4
@@ -22,6 +22,11 @@ jobs:
2222
version: 8.x.x
2323
run_install: false
2424
- run: pnpm install --frozen-lockfile
25+
# Restore old config for Node 16, 18 & 20
26+
- run: |
27+
if [[ $(node -v | grep -E '^v(16|18|20)\.') ]]; then
28+
cp .mocharc.old.json .mocharc.json
29+
fi
2530
- run: pnpm test
2631

2732
# Run tests with 'pnpm i' dependencies
@@ -30,7 +35,7 @@ jobs:
3035

3136
strategy:
3237
matrix:
33-
node-version: [16.x, 18.x, 20.x, 22.x]
38+
node-version: [16.x, 18.x, 20.x, 22.19.x, 24.x]
3439

3540
steps:
3641
- uses: actions/checkout@v4
@@ -43,4 +48,9 @@ jobs:
4348
version: 8.x.x
4449
run_install: false
4550
- run: pnpm i
51+
# Restore old config for Node 16, 18 & 20
52+
- run: |
53+
if [[ $(node -v | grep -E '^v(16|18|20)\.') ]]; then
54+
cp .mocharc.old.json .mocharc.json
55+
fi
4656
- run: pnpm test

.mocharc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,8 @@
1515
],
1616
"spec": [
1717
"**/*.test.ts"
18+
],
19+
"node-option": [
20+
"no-experimental-strip-types"
1821
]
1922
}

.mocharc.old.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"extension": ["ts"],
3+
"timeout": 15000,
4+
"exit": true,
5+
"recursive": true,
6+
"watch": false,
7+
"watch-files": [
8+
"./kipper/core/src/",
9+
"./kipper/cli/src/",
10+
"./node_modules/@kipper/"
11+
],
12+
"reporter": "spec",
13+
"require": [
14+
"ts-node/register"
15+
],
16+
"spec": [
17+
"**/*.test.ts"
18+
]
19+
}

.run/kipper compile (DEBUG).run.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<component name="ProjectRunConfigurationManager">
2-
<configuration default="false" name="kipper compile (DEBUG)" type="NodeJSConfigurationType" application-parameters="compile -s &quot;&quot;" path-to-js-file="./kipper/cli/bin/run" working-dir="$PROJECT_DIR$/">
2+
<configuration default="false" name="kipper compile (DEBUG)" type="NodeJSConfigurationType" application-parameters="compile -s &quot;&quot;" node-parameters="--no-experimental-strip-types" path-to-js-file="./kipper/cli/bin/run" working-dir="$PROJECT_DIR$/">
33
<envs>
44
<env name="DEBUG" value="*" />
55
</envs>

.run/kipper compile (js).run.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<component name="ProjectRunConfigurationManager">
2-
<configuration default="false" name="kipper compile (js)" type="NodeJSConfigurationType" application-parameters="compile -s &quot;&quot; -t js" path-to-js-file="./kipper/cli/bin/run" working-dir="$PROJECT_DIR$/">
2+
<configuration default="false" name="kipper compile (js)" type="NodeJSConfigurationType" application-parameters="compile -s &quot;&quot; -t js" node-parameters="--no-experimental-strip-types" path-to-js-file="./kipper/cli/bin/run" working-dir="$PROJECT_DIR$/">
33
<method v="2" />
44
</configuration>
55
</component>

.run/kipper compile (ts).run.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<component name="ProjectRunConfigurationManager">
2-
<configuration default="false" name="kipper compile (ts)" type="NodeJSConfigurationType" application-parameters="compile -s &quot;&quot; -t ts" path-to-js-file="./kipper/cli/bin/run" working-dir="$PROJECT_DIR$/">
2+
<configuration default="false" name="kipper compile (ts)" type="NodeJSConfigurationType" application-parameters="compile -s &quot;&quot; -t ts" node-parameters="--no-experimental-strip-types" path-to-js-file="./kipper/cli/bin/run" working-dir="$PROJECT_DIR$/">
33
<method v="2" />
44
</configuration>
55
</component>

.run/kipper help (DEBUG).run.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<component name="ProjectRunConfigurationManager">
2-
<configuration default="false" name="kipper help (DEBUG)" type="NodeJSConfigurationType" application-parameters="help" path-to-js-file="./kipper/cli/bin/run" working-dir="$PROJECT_DIR$/">
2+
<configuration default="false" name="kipper help (DEBUG)" type="NodeJSConfigurationType" application-parameters="help" node-parameters="--no-experimental-strip-types" path-to-js-file="./kipper/cli/bin/run" working-dir="$PROJECT_DIR$/">
33
<envs>
44
<env name="DEBUG" value="*" />
55
</envs>

.run/kipper help.run.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<component name="ProjectRunConfigurationManager">
2-
<configuration default="false" name="kipper help" type="NodeJSConfigurationType" application-parameters="help" path-to-js-file="./kipper/cli/bin/run" working-dir="$PROJECT_DIR$/">
2+
<configuration default="false" name="kipper help" type="NodeJSConfigurationType" application-parameters="help" node-parameters="--no-experimental-strip-types" path-to-js-file="./kipper/cli/bin/run" working-dir="$PROJECT_DIR$/">
33
<method v="2" />
44
</configuration>
55
</component>

0 commit comments

Comments
 (0)