Skip to content

Commit c71204a

Browse files
chore: update project to use ES modules and add Rollup configuration
- Changed import statements to use .js extensions for module compatibility - Added Rollup configuration for building the project - Updated package.json scripts to use Rollup instead of ncc - Bumped dependencies related to Rollup and added new plugins - Modified tsconfig.json for ES module support and adjusted compiler options
1 parent 9cb60b2 commit c71204a

18 files changed

Lines changed: 28293 additions & 31692 deletions

.github/linters/eslint.config.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ export default [
2828
'coverage/**',
2929
'test/**',
3030
'**/.github/linters/**',
31-
'vitest.config.mts'
31+
'vitest.config.mts',
32+
'rollup.config.ts'
3233
]
3334
},
3435
...compat.extends(

__tests__/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Unit tests for the action's entrypoint (src/index.ts)
33
*/
44

5-
import * as main from '../src/main'
5+
import * as main from '../src/main.js'
66
import { vi, describe, it, expect } from 'vitest'
77

88
/**

__tests__/main.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as core from '@actions/core'
22
import * as fs from 'fs'
3-
import { run } from '../src/main'
3+
import { run } from '../src/main.js'
44
import {
55
vi,
66
describe,

__tests__/test-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { DevcontainerContent } from '../src/types'
1+
import { DevcontainerContent } from '../src/types.js'
22

33
/**
44
* Creates a mock devcontainer configuration for testing purposes.

__tests__/utils.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, test, expect } from 'vitest'
2-
import { isDevcontainerContent, stripJsonComments } from '../src/utils'
2+
import { isDevcontainerContent, stripJsonComments } from '../src/utils.js'
33

44
/**
55
* Test suite for utility functions used in devcontainer validation.

__tests__/validators.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import {
33
validateExtensions,
44
validateTasks,
55
validateFeatures
6-
} from '../src/validators'
7-
import { DevcontainerContent } from '../src/types'
6+
} from '../src/validators.js'
7+
import { DevcontainerContent } from '../src/types.js'
88

99
/**
1010
* Test suite for devcontainer.json validation functions.

0 commit comments

Comments
 (0)