Skip to content

Commit

Permalink
fix(core): force node next module compatibility (#879)
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasduteil authored Dec 12, 2024
1 parent 9390adf commit 7a1aca3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .changeset/selfish-apes-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@gouvfr-lasuite/proconnect.core": patch
---

:recycle: force la compatibilité avec Node.js
2 changes: 1 addition & 1 deletion packages/core/src/services/suggestion/did-you-mean.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assert } from "chai";
import { getDidYouMeanSuggestion } from "./did-you-mean";
import { getDidYouMeanSuggestion } from "./did-you-mean.js";

describe("getDidYouMeanSuggestion", () => {
const emailAddresses = [
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/services/suggestion/did-you-mean.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import gouvfrDomains from "#src/data/gouvfr-domains";
import gouvfrDomains from "#src/data/gouvfr-domains.js";
import mostUsedFreeEmailDomains from "#src/data/most-used-free-email-domains.js";
import otherGouvDomains from "#src/data/other-gouv-domains";
import otherGouvDomains from "#src/data/other-gouv-domains.js";
import { run as spellCheckEmail } from "@zootools/email-spell-checker";

// Display an email suggestion for most used public domains
Expand Down
12 changes: 4 additions & 8 deletions packages/core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@
"declarationMap": true,
"outDir": "./dist",
"rootDir": "src",
"types": [
"./types"
],
"module": "Preserve",
"moduleResolution": "Bundler",
"types": ["./types"],
"module": "NodeNext",
"moduleResolution": "nodenext",
"verbatimModuleSyntax": true,
"paths": {
"#src/*": [
"./src/*"
]
"#src/*": ["./src/*"]
}
},
"extends": "@tsconfig/node22/tsconfig.json",
Expand Down

0 comments on commit 7a1aca3

Please sign in to comment.