Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade node: 20.9.0 -> 22.12.0 #1391

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.9.0'
node-version: '22.12.0'
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'
registry-url: https://npm.pkg.github.com/
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.9.0'
node-version: '22.12.0'
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'
registry-url: https://npm.pkg.github.com/
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.9.0'
node-version: '22.12.0'
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'
registry-url: https://npm.pkg.github.com/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cypress-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.9.0'
node-version: '22.12.0'
registry-url: https://npm.pkg.github.com/
scope: '@navikt'
- name: 'Install dependencies'
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.9.0'
node-version: '22.12.0'
registry-url: https://npm.pkg.github.com/
scope: '@navikt'
- name: 'Install dependencies'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jest-coverage-report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.9.0'
node-version: '22.12.0'
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'
registry-url: https://npm.pkg.github.com/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/manual-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.9.0'
node-version: '22.12.0'
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'
registry-url: https://npm.pkg.github.com/
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.9.0'
node-version: '22.12.0'
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'
registry-url: https://npm.pkg.github.com/
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.9.0
v22.12.0
2 changes: 1 addition & 1 deletion docker/Dockerfile.bygger
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20.9.0-alpine
FROM node:22.12.0-alpine
ENV NODE_ENV=production
ARG git_sha

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.fyllut-base
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20.9.0-alpine
FROM node:22.12.0-alpine
ENV NODE_ENV=production
ARG git_sha

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"vitest-fetch-mock": "^0.3.0"
},
"engines": {
"node": ">=20.9.0"
"node": ">=22.12.0"
},
"lint-staged": {
"*.{js,jsx,ts,tsx,mjs}": [
Expand Down
4 changes: 2 additions & 2 deletions packages/shared-domain/src/summary/formSummaryUtil.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ describe('form summary', () => {
'',
mockedTranslate,
);
expect(actual[0].value).toEqual('kr 2 512,39'.replaceAll(' ', '\u00A0'));
expect(actual[0].value).toEqual('2 512,39 kr'.replaceAll(' ', '\u00A0'));
});
});

Expand All @@ -534,7 +534,7 @@ describe('form summary', () => {
'',
mockedTranslate,
);
expect(actual[0].value).toEqual('NOK 2 512,39'.replaceAll(' ', '\u00A0'));
expect(actual[0].value).toEqual('2 512,39 NOK'.replaceAll(' ', '\u00A0'));
});

it("should not add anything if belop isn't filled", () => {
Expand Down
26 changes: 13 additions & 13 deletions packages/shared-domain/src/utils/currencyUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ import { currencyUtils } from '../index';
describe('currencyValidators', () => {
describe('toLocaleString', () => {
it('decimal', () => {
expect(currencyUtils.toLocaleString(10)).toBe('kr\u00A010,00');
expect(currencyUtils.toLocaleString('10')).toBe('kr\u00A010,00');
expect(currencyUtils.toLocaleString('10.5')).toBe('kr\u00A010,50');
expect(currencyUtils.toLocaleString('10.500000')).toBe('kr\u00A010,50');
expect(currencyUtils.toLocaleString('10.504')).toBe('kr\u00A010,50');
expect(currencyUtils.toLocaleString(10)).toBe('10,00\u00A0kr');
expect(currencyUtils.toLocaleString('10')).toBe('10,00\u00A0kr');
expect(currencyUtils.toLocaleString('10.5')).toBe('10,50\u00A0kr');
expect(currencyUtils.toLocaleString('10.500000')).toBe('10,50\u00A0kr');
expect(currencyUtils.toLocaleString('10.504')).toBe('10,50\u00A0kr');
});

it('integer', () => {
expect(currencyUtils.toLocaleString(10, { integer: true })).toBe('kr\u00A010');
expect(currencyUtils.toLocaleString(10.4, { integer: true })).toBe('kr\u00A010');
expect(currencyUtils.toLocaleString(10.5, { integer: true })).toBe('kr\u00A011');
expect(currencyUtils.toLocaleString('10', { integer: true })).toBe('kr\u00A010');
expect(currencyUtils.toLocaleString('10.5', { integer: true })).toBe('kr\u00A011');
expect(currencyUtils.toLocaleString('10.500000', { integer: true })).toBe('kr\u00A011');
expect(currencyUtils.toLocaleString('10.504', { integer: true })).toBe('kr\u00A011');
expect(currencyUtils.toLocaleString('1000', { integer: true })).toBe('kr\u00A01\u00A0000');
expect(currencyUtils.toLocaleString(10, { integer: true })).toBe('10\u00A0kr');
expect(currencyUtils.toLocaleString(10.4, { integer: true })).toBe('10\u00A0kr');
expect(currencyUtils.toLocaleString(10.5, { integer: true })).toBe('11\u00A0kr');
expect(currencyUtils.toLocaleString('10', { integer: true })).toBe('10\u00A0kr');
expect(currencyUtils.toLocaleString('10.5', { integer: true })).toBe('11\u00A0kr');
expect(currencyUtils.toLocaleString('10.500000', { integer: true })).toBe('11\u00A0kr');
expect(currencyUtils.toLocaleString('10.504', { integer: true })).toBe('11\u00A0kr');
expect(currencyUtils.toLocaleString('1000', { integer: true })).toBe('1\u00A0000\u00A0kr');
});

it('invalid currency', () => {
Expand Down
Loading