Skip to content

Commit

Permalink
Pakkeoppdateringer060125 vol1 (#3595)
Browse files Browse the repository at this point in the history
* minor & patch

* allow any

* nodejs22 & webpack-cli

* uuid

* stylelint

* remove stylelint

* remove stylelint

* react-dom

* node22

* resolutions på react

* yarn install

* ny yarn.lock for å se om det hjelper

* Revert "ny yarn.lock for å se om det hjelper"

This reverts commit 0ebd1f8.

* Reapply "ny yarn.lock for å se om det hjelper"

This reverts commit 2f79847.

* Revert "ny yarn.lock for å se om det hjelper"

This reverts commit 0ebd1f8.

* Revert "yarn install"

This reverts commit 40f5400.

* Revert "resolutions på react"

This reverts commit ccde07b.

* Revert "node22"

This reverts commit 3bcf2d9.

* Reapply "node22"

This reverts commit c77acbc.

* Revert "react-dom"

This reverts commit ff11fb1.

* react 18.3.1

* Revert "allow any"

This reverts commit 4f2571c.

* Reapply "allow any"

This reverts commit 5dfbbd7.

* ft-plattform-komponenter breaking i 5.3.1

* nå også med oppdatert lockfile

* major updates

* fjerne resolution

* fiks chai issues

* fjerner stylelint-greier

* rydder

* bump minor/patch igjen

* endringslogg major bomp

* Revert "endringslogg major bomp"

This reverts commit 4ee5dca.
  • Loading branch information
vebnor authored Jan 8, 2025
1 parent 7311cfe commit edc9127
Show file tree
Hide file tree
Showing 24 changed files with 553 additions and 1,389 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,10 @@ jobs:
- name: Sette opp Node
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 22.x
cache: yarn
- name: Installere dependencies
run: yarn workspaces focus k9-los-web
- name: CSS lint
run: yarn css:lint
- name: Tester
run: yarn test --maxWorkers=2
- name: Bygge kode
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/valid-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@ jobs:
- name: Sette opp Node
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 22.x
cache: yarn
- name: Installere dependencies
run: yarn install
- name: CSS lint
run: yarn css:lint
- name: Tester
run: yarn test --maxWorkers=2
- name: Bygge
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM gcr.io/distroless/nodejs18-debian12:nonroot
FROM gcr.io/distroless/nodejs22-debian12:nonroot

ENV TZ="Europe/Oslo"
ENV NODE_ENV production

Check warning on line 4 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build docker image and create issue

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
Expand Down
2 changes: 1 addition & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"license": "ISC",
"devDependencies": {
"@playwright/test": "1.49.1",
"@types/node": "22.10.3"
"@types/node": "22.10.5"
}
}
14 changes: 0 additions & 14 deletions jest-runner-eslint.config.mjs

This file was deleted.

2 changes: 1 addition & 1 deletion jest.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default {
"^.+\\.(ts|tsx|js|jsx)?$": "babel-jest",
"^.+.(css|less)$": "jest-transform-stub",
},
transformIgnorePatterns: ["<rootDir>.*(node_modules)(?!.*(nav|uuid).*).*$"],
transformIgnorePatterns: ["<rootDir>.*(node_modules)(?!.*(nav|uuid|chai).*).*$"],
// ignore tests in tests folder
moduleDirectories: ["node_modules", "src/client", "src/client/app"],

Expand Down
53 changes: 22 additions & 31 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,25 @@
"repository": "https://github.com/navikt/k9-los-web",
"license": "MIT",
"dependencies": {
"@formatjs/intl-datetimeformat": "6.17.1",
"@formatjs/intl-numberformat": "8.15.1",
"@formatjs/intl-datetimeformat": "6.17.2",
"@formatjs/intl-numberformat": "8.15.2",
"@grafana/faro-web-sdk": "1.12.2",
"@grafana/faro-web-tracing": "1.12.2",
"@navikt/aksel-icons": "7.9.0",
"@navikt/ds-css": "7.9.0",
"@navikt/ds-react": "7.9.0",
"@navikt/ds-tailwind": "7.9.0",
"@navikt/ds-tokens": "7.9.0",
"@navikt/familie-endringslogg": "13.1.4",
"@navikt/aksel-icons": "7.9.1",
"@navikt/ds-css": "7.9.1",
"@navikt/ds-react": "7.9.1",
"@navikt/ds-tailwind": "7.9.1",
"@navikt/ds-tokens": "7.9.1",
"@navikt/familie-endringslogg": "13.1.5",
"@navikt/fnrvalidator": "2.1.5",
"@navikt/ft-form-hooks": "5.2.9",
"@navikt/ft-form-validators": "2.5.7",
"@navikt/ft-plattform-komponenter": "5.3.0",
"@popperjs/core": "2.11.8",
"@reach/combobox": "0.18.0",
"@sentry/browser": "8.47.0",
"@sentry/cli": "2.39.1",
"@sentry/react": "8.47.0",
"@sentry/browser": "8.48.0",
"@sentry/cli": "2.40.0",
"@sentry/react": "8.48.0",
"axios": "1.7.9",
"classnames": "2.5.1",
"dayjs": "1.11.13",
Expand Down Expand Up @@ -88,7 +88,7 @@
"react-router": "6.26.2",
"react-router-dom": "6.26.2",
"tailwindcss": "3.4.17",
"uuid": "10.0.0"
"uuid": "11.0.4"
},
"devDependencies": {
"@babel/core": "7.26.0",
Expand All @@ -99,15 +99,14 @@
"@babel/preset-react": "7.26.3",
"@babel/preset-typescript": "7.26.0",
"@babel/register": "7.25.9",
"@chromatic-com/storybook": "2.0.2",
"@navikt/aksel-stylelint": "7.9.0",
"@chromatic-com/storybook": "3.2.3",
"@playwright/test": "1.49.1",
"@storybook/addon-essentials": "8.4.7",
"@storybook/addon-interactions": "8.4.7",
"@storybook/addon-links": "8.4.7",
"@storybook/addon-onboarding": "8.4.7",
"@storybook/addon-styling-webpack": "1.0.1",
"@storybook/addon-webpack5-compiler-swc": "1.0.6",
"@storybook/addon-webpack5-compiler-swc": "2.0.0",
"@storybook/blocks": "8.4.7",
"@storybook/react": "8.4.7",
"@storybook/react-webpack5": "8.4.7",
Expand All @@ -116,8 +115,8 @@
"@testing-library/jest-dom": "6.6.3",
"@testing-library/react": "16.1.0",
"@testing-library/user-event": "14.5.2",
"@trivago/prettier-plugin-sort-imports": "4.3.0",
"@types/chai": "4.3.20",
"@trivago/prettier-plugin-sort-imports": "5.2.1",
"@types/chai": "5.0.1",
"@types/history": "5.0.0",
"@types/jest": "29.5.14",
"@types/react": "18.3.18",
Expand All @@ -126,14 +125,14 @@
"@types/react-intl": "3.0.0",
"@types/react-redux": "7.1.34",
"@types/react-router-dom": "5.3.3",
"@typescript-eslint/eslint-plugin": "8.19.0",
"@typescript-eslint/parser": "8.19.0",
"@typescript-eslint/eslint-plugin": "8.19.1",
"@typescript-eslint/parser": "8.19.1",
"autoprefixer": "10.4.20",
"babel-eslint": "10.1.0",
"babel-jest": "29.7.0",
"babel-loader": "9.2.1",
"babel-runtime": "6.26.0",
"chai": "4.5.0",
"chai": "5.1.2",
"circular-dependency-plugin": "5.2.2",
"copy-webpack-plugin": "12.0.2",
"cross-env": "7.0.3",
Expand All @@ -151,8 +150,8 @@
"eslint-plugin-jest-dom": "5.5.0",
"eslint-plugin-jsx-a11y": "6.10.2",
"eslint-plugin-react": "7.37.3",
"eslint-plugin-react-hooks": "4.6.2",
"eslint-plugin-storybook": "0.11.1",
"eslint-plugin-react-hooks": "5.1.0",
"eslint-plugin-storybook": "0.11.2",
"html-webpack-plugin": "5.6.3",
"husky": "9.1.7",
"identity-obj-proxy": "3.0.0",
Expand All @@ -171,28 +170,21 @@
"prettier": "3.4.2",
"prop-types": "15.8.1",
"storybook": "8.4.7",
"stylelint": "15.11.0",
"stylelint-config-prettier": "9.0.5",
"stylelint-order": "6.0.4",
"terser-webpack-plugin": "5.3.11",
"thread-loader": "4.0.4",
"typescript": "5.7.2",
"webpack": "5.97.1",
"webpack-cli": "5.1.4",
"webpack-cli": "6.0.1",
"webpack-dev-server": "5.2.0",
"webpack-merge": "6.0.1"
},
"resolutions": {
"postcss": "8.4.31"
},
"scripts": {
"test": "jest --colors",
"dev-env-variables": "cross-env SOKEBOKS_NYE_KOER=enabled SAKSBEHANDLER_KAN_VELGE_NYE_KOER=enabled AVDELINGSLEDER_TILGANG_TIL_NYE_KOER=enabled K9_LOS_API_URL=http://localhost:8020/api",
"dev": "yarn dev-env-variables cross-env node webpack/webpack.dev.server.mjs --config webpack/webpack.dev.mjs",
"build": "cross-env NODE_ENV=production SENTRY_RELEASE=$(git rev-parse --short HEAD) webpack --config webpack/webpack.prod.mjs",
"ts-check": "tsc --pretty",
"lint": "eslint --cache --fix \"src/**/*.ts?(x)\"",
"css:lint": "stylelint \"src/**/*.css\"",
"up": "docker-compose up -d --remove-orphans --build",
"down": "docker-compose down",
"sentry-release": "(SENTRY_RELEASE=$(git rev-parse --short HEAD); node ./setup/sentry-release.cjs)",
Expand All @@ -205,7 +197,6 @@
},
"lint-staged": {
"src/client/**/*.ts?(x)": "eslint --fix",
"src/**/*.(le|c)ss": "stylelint --fix",
"src/client/**/*.{ts,tsx,js,jsx,css,less}": "prettier --write"
},
"eslintConfig": {
Expand Down
11 changes: 3 additions & 8 deletions src/client/app/admin/components/AdminDashboard.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import React from 'react';
import PropTypes from 'prop-types';
import * as styles from './adminDashboard.css';

type TsProps = Readonly<{
interface AdminDashboardProps {
children: React.ReactNode;
}>;
}

/**
* AvdelingslederDashboard
*/
const AdminDashboard = ({ children }: TsProps) => (
const AdminDashboard = ({ children }: AdminDashboardProps) => (
<div>
<div className={styles.oppgaveContainer}>
<div className={styles.gridContainer}>
Expand All @@ -21,8 +20,4 @@ const AdminDashboard = ({ children }: TsProps) => (
</div>
);

AdminDashboard.propTypes = {
children: PropTypes.node.isRequired,
};

export default AdminDashboard;
92 changes: 0 additions & 92 deletions src/client/app/form/finalFields/CustomNavSelect.tsx

This file was deleted.

21 changes: 10 additions & 11 deletions src/client/app/form/finalFields/OptionGrid.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
import React from 'react';
import PropTypes from 'prop-types';
import { PersonPencilIcon } from '@navikt/aksel-icons';
import { FlexColumn, FlexContainer, FlexRow } from 'sharedComponents/flexGrid';
import { range } from 'utils/arrayUtils';
import * as styles from './optionGrid.css';

export const OptionGrid = ({ columns, rows, options, spaceBetween, isEdited, direction }) => {
interface OptionGridProps {
columns?: number;
options: React.ReactElement[];
spaceBetween?: boolean;
isEdited?: boolean;
direction?: string;
rows?: number;
}

export const OptionGrid = ({ columns, rows, options, spaceBetween, isEdited, direction }: OptionGridProps) => {
if (direction === 'vertical') {
const numRows = rows || options.length;
return (
Expand Down Expand Up @@ -36,15 +44,6 @@ export const OptionGrid = ({ columns, rows, options, spaceBetween, isEdited, dir
);
};

OptionGrid.propTypes = {
columns: PropTypes.number,
options: PropTypes.arrayOf(PropTypes.element).isRequired,
spaceBetween: PropTypes.bool,
isEdited: PropTypes.bool,
direction: PropTypes.string,
rows: PropTypes.number,
};

OptionGrid.defaultProps = {
columns: 0,
rows: 0,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Detail } from '@navikt/ds-react';
import * as styles from './menuButton.css';

type TsProps = Readonly<{
onClick: () => void;
children: JSX.Element;
}>;
interface MenuButtonProps {
onClick(...args: unknown[]): unknown;
children: React.ReactElement;
}

/**
* MenuButton
*
* Presentasjonskomponent. Lager lenker i behandlingsmeny
*/
const MenuButton = React.forwardRef(({ onClick, children }: TsProps, ref) => (
const MenuButton = React.forwardRef<HTMLElement, MenuButtonProps>(({ onClick, children }: TsProps, ref) => (
<button ref={ref} className={styles.button} onClick={onClick} type="button">
<Detail>{children}</Detail>
</button>
));

MenuButton.propTypes = {
onClick: PropTypes.func.isRequired,
children: PropTypes.element.isRequired,
};

export default MenuButton;
Loading

0 comments on commit edc9127

Please sign in to comment.