Skip to content

Commit

Permalink
Maj deps (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
mquandalle authored Dec 25, 2023
1 parent 0ccd3d9 commit 4e68989
Show file tree
Hide file tree
Showing 37 changed files with 1,779 additions and 4,454 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-links-validity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
submodules: 'true'
- uses: actions/setup-node@v2
with:
node-version: '18'
node-version: '20'
- run: npm ci
- id: invalid_links
run: node ./src/scripts/check-links-validity.js --ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
submodules: 'true'
- uses: actions/setup-node@v2
with:
node-version: '18'
node-version: '20'
- run: npm ci
- name: Run linter
run: npm run lint
2 changes: 1 addition & 1 deletion .github/workflows/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
submodules: 'true'
- uses: actions/setup-node@v2
with:
node-version: '18'
node-version: '20'
- run: npm ci
- name: Build and Test
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/playwright-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
submodules: 'true'
- uses: actions/setup-node@v2
with:
node-version: '18'
node-version: '20'
- run: npm ci
- name: Install Playwright
run: npx playwright install --with-deps
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
20
4 changes: 2 additions & 2 deletions data-fetch/entreprises/download-gsheet-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import wget from 'wget-improved';
wget.download(
`https://sheets.googleapis.com/v4/spreadsheets/13h-hrwrnrDLVGSnrzvDyn8zy0UkocOoTZmcu7B1v3S0/values/Aide%20par%20entreprise!A2:E?key=${process.env.GOOGLE_API_KEY}`,
'data-fetch/entreprises/data/gsheet-forfaits.json'
'data-fetch/entreprises/data/gsheet-forfaits.json',
);
wget.download(
`https://sheets.googleapis.com/v4/spreadsheets/13h-hrwrnrDLVGSnrzvDyn8zy0UkocOoTZmcu7B1v3S0/values/Liste%20noire!A2:A?key=${process.env.GOOGLE_API_KEY}`,
'data-fetch/entreprises/data/gsheet-blacklist.json'
'data-fetch/entreprises/data/gsheet-blacklist.json',
);
2 changes: 1 addition & 1 deletion data-fetch/miniatures/extract-from-aides-jeunes.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const imagesFromAidesJeunes = Object.fromEntries([
fileContent
.split('\n')
.map((line) => line.split(':').map((field) => field.trim()))
.filter(([key]) => fieldsToRetrieve.includes(key))
.filter(([key]) => fieldsToRetrieve.includes(key)),
);

return [imgKey(data), data];
Expand Down
14 changes: 7 additions & 7 deletions package-aides-velo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function aidesVelo(situation: InputParameters = {}): Array<Aide>
return Object.entries(aidesAndCollectivities)
.filter(
([, { country: aideCountry }]) =>
!situation['localisation . pays'] || aideCountry === situation['localisation . pays']
!situation['localisation . pays'] || aideCountry === situation['localisation . pays'],
)
.flatMap(([ruleName]) => {
const rule = engine.getRule(ruleName);
Expand Down Expand Up @@ -95,11 +95,11 @@ const formatInput = (input: InputParameters) =>
? 'oui'
: 'non'
: key === 'localisation . epci'
? `'${epciSirenToName[val]}'`
: typeof val === 'string'
? `'${val}'`
: val,
])
? `'${epciSirenToName[val]}'`
: typeof val === 'string'
? `'${val}'`
: val,
]),
);

const epciSirenToName = Object.fromEntries(
Expand All @@ -108,5 +108,5 @@ const epciSirenToName = Object.fromEntries(
return [];
}
return [[(collectivity as any).code, collectivity.value]];
})
}),
);
14 changes: 7 additions & 7 deletions package-aides-velo/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ test('liste des aides en France', (t) => {
t.assert(list.length > 50, 'au moins 50 aides en France');
t.false(
list.some(({ id: aideId }) => aideId.includes('. monaco') || aideId.includes('. luxembourg')),
"pas d'aides de Monaco ou du Luxembourg"
"pas d'aides de Monaco ou du Luxembourg",
);
});

Expand All @@ -28,7 +28,7 @@ test('aides électrique colmar', (t) => {
t.is(colmarElectrique.length, 3, '3 aides');
t.truthy(
colmarElectrique.find(({ title }) => title.toLowerCase().includes('colmar')),
'Dont une de la ville'
'Dont une de la ville',
);
});

Expand All @@ -45,7 +45,7 @@ test('motorisation vélo bordeaux', (t) => {
t.deepEqual(
bordeauxMotorisation[0].collectivity,
{ kind: 'epci', value: 'Bordeaux Métropole', code: '243300316' },
"Associée à l'EPCI de Bordeaux"
"Associée à l'EPCI de Bordeaux",
);
});

Expand All @@ -59,7 +59,7 @@ test('prise en compte du revenu fiscal de référence', (t) => {
t.is(
aidesCharenton.reduce((sum, { amount }) => sum + amount, 0),
600,
"jusqu'à 600 euros d'aides"
"jusqu'à 600 euros d'aides",
);
const aidesCharentonRevenuElevé = aidesVelo({
...situationCharenton,
Expand All @@ -68,7 +68,7 @@ test('prise en compte du revenu fiscal de référence', (t) => {
t.is(
aidesCharentonRevenuElevé.reduce((sum, { amount }) => sum + amount, 0),
0,
"pas d'aides pour un RFR à 5000 €/mois/part"
"pas d'aides pour un RFR à 5000 €/mois/part",
);
});

Expand All @@ -84,7 +84,7 @@ test('interpolation des variables $vélo et $plafond', (t) => {
t.notRegex(
description,
/\$(vélo|plafond|ville)/,
`variables interpolées dans la description de ${id}`
)
`variables interpolées dans la description de ${id}`,
),
);
});
2 changes: 1 addition & 1 deletion package-aides-velo/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es6",
"target": "es2020",
"moduleResolution": "node",
"declaration": true,
"esModuleInterop": true,
Expand Down
Loading

0 comments on commit 4e68989

Please sign in to comment.