Skip to content

Commit

Permalink
Merge branch 'master' into certification-dirigeant-step1
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasduteil authored Feb 6, 2025
2 parents aad8a75 + eb63af3 commit f890c06
Show file tree
Hide file tree
Showing 21 changed files with 114 additions and 89 deletions.
12 changes: 12 additions & 0 deletions .changeset/happy-years-care.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@gouvfr-lasuite/proconnect.debounce": patch
"@gouvfr-lasuite/proconnect.identite": patch
"@gouvfr-lasuite/proconnect.crisp": patch
"@gouvfr-lasuite/proconnect.email": patch
"@gouvfr-lasuite/proconnect.insee": patch
"@gouvfr-lasuite/proconnect.core": patch
---

🧑‍💻 Ajout du package @gouvfr-lasuite/proconnect.devtools.typescript

Partage de la configuration de TypeScript entre les packages.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ RUN --mount=type=bind,source=package.json,target=package.json \
--mount=type=bind,source=packages/core/package.json,target=packages/core/package.json \
--mount=type=bind,source=packages/crisp/package.json,target=packages/crisp/package.json \
--mount=type=bind,source=packages/debounce/package.json,target=packages/debounce/package.json \
--mount=type=bind,source=packages/devtools/typescript/package.json,target=packages/devtools/typescript/package.json \
--mount=type=bind,source=packages/email/package.json,target=packages/email/package.json \
--mount=type=bind,source=packages/identite/package.json,target=packages/identite/package.json \
--mount=type=bind,source=packages/insee/package.json,target=packages/insee/package.json \
Expand All @@ -25,6 +26,7 @@ RUN --mount=type=bind,source=package.json,target=package.json \
--mount=type=bind,source=packages/core/package.json,target=packages/core/package.json \
--mount=type=bind,source=packages/crisp/package.json,target=packages/crisp/package.json \
--mount=type=bind,source=packages/debounce/package.json,target=packages/debounce/package.json \
--mount=type=bind,source=packages/devtools/typescript/package.json,target=packages/devtools/typescript/package.json \
--mount=type=bind,source=packages/email/package.json,target=packages/email/package.json \
--mount=type=bind,source=packages/identite/package.json,target=packages/identite/package.json \
--mount=type=bind,source=packages/insee/package.json,target=packages/insee/package.json \
Expand Down
43 changes: 31 additions & 12 deletions package-lock.json

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

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
},
"main": "src/index.js",
"workspaces": [
"packages/devtools/typescript",
"packages/core",
"packages/crisp",
"packages/debounce",
Expand Down Expand Up @@ -54,8 +55,8 @@
},
"dependencies": {
"@gouvfr-lasuite/proconnect.core": "workspace:*",
"@gouvfr-lasuite/proconnect.debounce": "workspace:*",
"@gouvfr-lasuite/proconnect.crisp": "workspace:*",
"@gouvfr-lasuite/proconnect.debounce": "workspace:*",
"@gouvfr-lasuite/proconnect.email": "workspace:*",
"@gouvfr-lasuite/proconnect.identite": "workspace:*",
"@gouvfr-lasuite/proconnect.insee": "workspace:*",
Expand Down Expand Up @@ -97,14 +98,14 @@
"@changesets/cli": "^2.27.10",
"@dotenvx/dotenvx": "^1.19.2",
"@fullhuman/postcss-purgecss": "^6.0.0",
"@gouvfr-lasuite/proconnect.devtools.typescript": "workspace:*",
"@gouvfr/dsfr": "^1.13.0",
"@kitajs/html": "^4.2.4",
"@kitajs/ts-html-plugin": "^4.1.0",
"@panva/jose": "^1.9.3",
"@simplewebauthn/types": "^10.0.0",
"@simplewebauthn/typescript-types": "^8.3.4",
"@sinonjs/fake-timers": "^11.2.2",
"@tsconfig/node22": "^22.0.0",
"@types/chai": "^5.0.1",
"@types/chai-as-promised": "^7.1.8",
"@types/console-log-level": "^1.4.5",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
"spec": "src/**/*.test.ts"
},
"dependencies": {
"@types/lodash-es": "^4.17.12",
"@types/bcryptjs": "^2.4.6",
"@types/lodash-es": "^4.17.12",
"@zootools/email-spell-checker": "^1.12.0",
"bcryptjs": "^2.4.3",
"is-disposable-email-domain": "^1.0.7",
Expand All @@ -70,7 +70,7 @@
"tld-extract": "^2.1.0"
},
"devDependencies": {
"@tsconfig/node22": "^22.0.0",
"@gouvfr-lasuite/proconnect.devtools.typescript": "0.0.0",
"@types/mocha": "^10.0.10",
"@types/node": "^22.10.2",
"chai": "^5.1.2",
Expand Down
11 changes: 2 additions & 9 deletions packages/core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
{
"compilerOptions": {
"composite": true,
"declaration": true,
"declarationMap": true,
"outDir": "./dist",
"rootDir": "src",
"types": ["node", "./types"],
"module": "NodeNext",
"moduleResolution": "nodenext",
"verbatimModuleSyntax": true,
"paths": {
"#src/*": ["./src/*"]
}
"types": ["node", "./types"]
},
"extends": "@tsconfig/node22/tsconfig.json",
"extends": "@gouvfr-lasuite/proconnect.devtools.typescript/base/tsconfig.json",
"references": []
}
2 changes: 1 addition & 1 deletion packages/crisp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"spec": "src/**/*.test.ts"
},
"devDependencies": {
"@tsconfig/node22": "^22.0.0",
"@gouvfr-lasuite/proconnect.devtools.typescript": "0.0.0",
"@vitest/expect": "^2.1.8",
"chai": "^5.1.2",
"dotenv": "^16.4.5",
Expand Down
6 changes: 1 addition & 5 deletions packages/crisp/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
{
"compilerOptions": {
"composite": true,
"declaration": true,
"declarationMap": true,
"outDir": "./dist",
"types": ["node"],
"module": "NodeNext",
"moduleResolution": "nodenext",
"verbatimModuleSyntax": true,
"paths": {
"#src/*": ["./src/*"]
}
},
"extends": "@tsconfig/node22/tsconfig.json",
"extends": "@gouvfr-lasuite/proconnect.devtools.typescript/base/tsconfig.json",
"include": ["src", "test"],
"references": []
}
6 changes: 4 additions & 2 deletions packages/debounce/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"license": "MIT",
"sideEffects": false,
"type": "module",
"imports": {},
"imports": {
"#src/types": "./src/types/index.ts"
},
"exports": {
"./api": {
"require": "./dist/api/index.cjs",
Expand Down Expand Up @@ -44,7 +46,7 @@
"zod": "^3.24.1"
},
"devDependencies": {
"@tsconfig/node22": "^22.0.0",
"@gouvfr-lasuite/proconnect.devtools.typescript": "0.0.0",
"@types/mocha": "^10.0.10",
"@types/node": "^22.10.2",
"chai": "^5.1.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/debounce/src/api/single-validation.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//

import type { DebounceSuccessResponse } from "#src/types/index.js";
import type { DebounceSuccessResponse } from "#src/types";
import axios, { type AxiosRequestConfig, type AxiosResponse } from "axios";

//
Expand Down
11 changes: 2 additions & 9 deletions packages/debounce/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
{
"compilerOptions": {
"composite": true,
"declaration": true,
"declarationMap": true,
"outDir": "./dist",
"rootDir": "src",
"types": ["node"],
"module": "NodeNext",
"moduleResolution": "nodenext",
"verbatimModuleSyntax": true,
"paths": {
"#src/*": ["./src/*"]
}
"types": ["node"]
},
"extends": "@tsconfig/node22/tsconfig.json",
"extends": "@gouvfr-lasuite/proconnect.devtools.typescript/base/tsconfig.json",
"references": []
}
26 changes: 26 additions & 0 deletions packages/devtools/typescript/base/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "ProConnect Base",
"extends": "@tsconfig/strictest/tsconfig.json",
"compilerOptions": {
"checkJs": false,
"composite": true,
"esModuleInterop": true,
// TODO(douglasduteil): remove this line
// We might want to acticate exactOptionalPropertyTypes
"exactOptionalPropertyTypes": false,
"ignoreDeprecations": "5.0",
"isolatedModules": true,
"lib": ["ESNext"],
"module": "NodeNext",
"moduleResolution": "nodenext",
"noImplicitReturns": false,
// TODO(douglasduteil): remove this line
// We might want to acticate noUncheckedIndexedAccess
"noUncheckedIndexedAccess": false,
"preserveWatchOutput": true,
"target": "ESNext",
"types": [],
"verbatimModuleSyntax": true,
}
}
10 changes: 10 additions & 0 deletions packages/devtools/typescript/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "@gouvfr-lasuite/proconnect.devtools.typescript",
"version": "0.0.0",
"private": true,
"type": "module",
"files": [],
"dependencies": {
"@tsconfig/strictest": "2.0.5"
}
}
2 changes: 1 addition & 1 deletion packages/email/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@kitajs/ts-html-plugin": "^4.1.0"
},
"devDependencies": {
"@tsconfig/node22": "^22.0.0",
"@gouvfr-lasuite/proconnect.devtools.typescript": "0.0.0",
"@storybook/csf": "^0.1.11",
"vite": "^5.4.12"
},
Expand Down
13 changes: 2 additions & 11 deletions packages/email/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "@tsconfig/node22/tsconfig.json",
"compilerOptions": {
"composite": true,
"esModuleInterop": true,
Expand All @@ -11,21 +10,13 @@
"module": "Preserve",
"moduleResolution": "Bundler",
"noEmitOnError": true,
"noFallthroughCasesInSwitch": true,
"noPropertyAccessFromIndexSignature": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"plugins": [{ "name": "@kitajs/ts-html-plugin" }],
"preserveSymlinks": true,
"preserveWatchOutput": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"strictNullChecks": true,
"target": "ESNext",
"types": ["vite/client"],
"verbatimModuleSyntax": true
"types": ["vite/client"]
},
"extends": "@gouvfr-lasuite/proconnect.devtools.typescript/base/tsconfig.json",
"files": [],
"include": ["src/**/*.ts", "src/**/*.tsx", ".storybook/**/*.tsx"],
"references": []
Expand Down
Loading

0 comments on commit f890c06

Please sign in to comment.