Skip to content

Commit 0576d43

Browse files
Merge pull request #146 from ember-cli/nvp/properImportMetaDirname
Test against our supported node versions (and fix the babel config for the maintenance-node version (20))
2 parents da3f082 + 11bda68 commit 0576d43

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,17 @@ jobs:
3030
os:
3131
- ubuntu-latest
3232
- windows-latest
33+
node:
34+
- 20
35+
- 22
36+
- 24
3337

3438
steps:
3539
- uses: actions/checkout@v4
3640
- uses: pnpm/action-setup@v4
3741
- uses: actions/setup-node@v4
3842
with:
39-
node-version: 20
43+
node-version: ${{ matrix.node }}
4044
cache: pnpm
4145
- name: Set TEMP to D:/Temp on windows
4246
if: ${{matrix.os}} == windows-latest

files/_js_babel.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { dirname } from 'node:path';
2+
import { fileURLToPath } from 'node:url';
13
import {
24
babelCompatSupport,
35
templateCompatSupport,
@@ -28,7 +30,7 @@ export default {
2830
[
2931
'@babel/plugin-transform-runtime',
3032
{
31-
absoluteRuntime: import.meta.dirname,
33+
absoluteRuntime: dirname(fileURLToPath(import.meta.url)),
3234
useESModules: true,
3335
regenerator: false,
3436
},

files/_ts_babel.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { dirname } from 'node:path';
2+
import { fileURLToPath } from 'node:url';
13
import {
24
babelCompatSupport,
35
templateCompatSupport,
@@ -36,7 +38,7 @@ export default {
3638
[
3739
'@babel/plugin-transform-runtime',
3840
{
39-
absoluteRuntime: import.meta.dirname,
41+
absoluteRuntime: dirname(fileURLToPath(import.meta.url)),
4042
useESModules: true,
4143
regenerator: false,
4244
},

0 commit comments

Comments
 (0)