Skip to content

Commit

Permalink
Merge pull request #289 from capralifecycle/cals-927/migrate-to-esm
Browse files Browse the repository at this point in the history
cals 927/migrate to esm
  • Loading branch information
joakimen authored Dec 16, 2024
2 parents d3ce1d8 + 3424814 commit c74097a
Show file tree
Hide file tree
Showing 34 changed files with 1,231 additions and 2,551 deletions.
19 changes: 14 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
.PHONY: all build clean

.PHONY: all
all: build
build:
npm install

.PHONY: build
build: clean

# don't trigger prepare on install
npm install --ignore-scripts
npm run lint
npm run build
npm run snapshots
npm run test

.PHONY: clean
clean:
rm -rf node_modules
rm -rf lib/
rm -rf cdk.out/

.PHONY: clean-all
clean-all: clean
rm -rf node_modules/
1 change: 1 addition & 0 deletions __snapshots__/app/cdk-pipeline-cdk-source.template.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions __snapshots__/app/manifest.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cdk.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"app": "ts-node examples/app.ts",
"app": "tsx examples/app.ts",
"context": {
"@aws-cdk/customresources:installLatestAwsSdkDefault": false
}
Expand Down
2 changes: 1 addition & 1 deletion commitlint.config.js → commitlint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
export default {
extends: ["@commitlint/config-conventional"],
}
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default [{
"plugin:prettier/recommended",
), {
languageOptions: {
ecmaVersion: 2018,
ecmaVersion: 2022,
sourceType: "module",

parserOptions: {
Expand Down
12 changes: 0 additions & 12 deletions jest.config.js

This file was deleted.

17 changes: 17 additions & 0 deletions jest.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export default {
testEnvironment: 'node',
extensionsToTreatAsEsm: ['.ts'],
testMatch: ["**/*.test.ts"],
transform: {
"^.+\\.tsx?$": [
"ts-jest",
{
useESM: true,
},
],
},
snapshotFormat: {
printBasicPrototype: true,
escapeString: true,
},
}
Loading

0 comments on commit c74097a

Please sign in to comment.