Skip to content

Commit c964472

Browse files
committed
Oppgrader pakker i decorator
1 parent e1a98cc commit c964472

File tree

6 files changed

+1043
-78
lines changed

6 files changed

+1043
-78
lines changed

bun.lock

+955
Large diffs are not rendered by default.

package.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
"format": "prettier . --write"
1313
},
1414
"devDependencies": {
15-
"@eslint/js": "^9.10.0",
16-
"eslint": "^9.10.0",
17-
"eslint-config-prettier": "^9.1.0",
18-
"eslint-plugin-prettier": "^5.1.3",
19-
"eslint-plugin-react-hooks": "^4.6.2",
20-
"eslint-plugin-react-refresh": "^0.4.12",
21-
"prettier": "^3.2.5",
22-
"typescript-eslint": "^8.6.0"
15+
"@eslint/js": "^9.18.0",
16+
"eslint": "^9.18.0",
17+
"eslint-config-prettier": "^10.0.1",
18+
"eslint-plugin-prettier": "^5.2.2",
19+
"eslint-plugin-react-hooks": "^5.1.0",
20+
"eslint-plugin-react-refresh": "^0.4.18",
21+
"prettier": "^3.4.2",
22+
"typescript-eslint": "^8.20.0"
2323
}
2424
}
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,64 @@
11
{
2-
"name": "internarbeidsflate-decorator-v3",
3-
"private": true,
4-
"version": "0.0.0",
5-
"types": "./dist/index.d.ts",
6-
"exports": {
7-
".": {
8-
"import": {
9-
"types": "./dist/index.d.ts",
10-
"default": "./dist/internarbeidsflate-decorator-v3.es.js"
11-
},
12-
"require": {
13-
"types": "./dist/index.d.ts",
14-
"default": "./dist/internarbeidsflate-decorator-v3.umd.js"
15-
}
16-
}
17-
},
18-
"scripts": {
19-
"dev": "bunx --bun vite",
20-
"dev:fullscreen": "VITE_DECORATOR_MODE=fullscreen bunx --bun vite",
21-
"build": "vite build",
22-
"build:watch": "bunx --bun vite build --watch",
23-
"build-and-preview": "bunx --bun vite build && bunx --bun vite preview",
24-
"preview": "bunx --bun vite preview",
25-
"build:preview": "bunx --bun vite build --config preview.vite.config.ts",
26-
"test": "vitest"
27-
},
28-
"devDependencies": {
29-
"@types/react": "^18.3.12",
30-
"@types/react-dom": "^18.3.1",
31-
"@vitejs/plugin-react": "^4.3.4",
32-
"autoprefixer": "^10.4.20",
33-
"concurrently": "^9.1.0",
34-
"msw": "^2.6.6",
35-
"postcss": "^8.4.49",
36-
"postcss-import": "^16.1.0",
37-
"react": "^18.3.1",
38-
"react-dom": "^18.3.1",
39-
"tailwindcss": "^3.4.15",
40-
"typescript": "^5.7.2",
41-
"vite": "^6.0.1",
42-
"vitest": "^3.0.1",
43-
"vitest-websocket-mock": "^0.4.0"
44-
},
45-
"peerDependencies": {
46-
"react": "^18.2.0",
47-
"react-dom": "^18.2.0"
48-
},
49-
"dependencies": {
50-
"@navikt/aksel-icons": "^7.5.3",
51-
"@navikt/ds-css": "^7.5.3",
52-
"@navikt/ds-react": "^7.5.3",
53-
"@navikt/ds-tailwind": "^7.5.3",
54-
"@navikt/ds-tokens": "^7.5.3",
55-
"@navikt/navspa": "^6.2.0",
56-
"@tanstack/query-core": "^5.61.5",
57-
"classnames": "^2.5.1",
58-
"use-sync-external-store": "^1.2.2",
59-
"zustand": "^5.0.1"
60-
},
61-
"msw": {
62-
"workerDirectory": [
63-
"public"
64-
]
65-
}
66-
}
2+
"name": "internarbeidsflate-decorator-v3",
3+
"private": true,
4+
"version": "0.0.0",
5+
"types": "./dist/index.d.ts",
6+
"exports": {
7+
".": {
8+
"import": {
9+
"types": "./dist/index.d.ts",
10+
"default": "./dist/internarbeidsflate-decorator-v3.es.js"
11+
},
12+
"require": {
13+
"types": "./dist/index.d.ts",
14+
"default": "./dist/internarbeidsflate-decorator-v3.umd.js"
15+
}
16+
}
17+
},
18+
"scripts": {
19+
"dev": "bunx --bun vite",
20+
"dev:fullscreen": "VITE_DECORATOR_MODE=fullscreen bunx --bun vite",
21+
"build": "vite build",
22+
"build:watch": "bunx --bun vite build --watch",
23+
"build-and-preview": "bunx --bun vite build && bunx --bun vite preview",
24+
"preview": "bunx --bun vite preview",
25+
"build:preview": "bunx --bun vite build --config preview.vite.config.ts",
26+
"test": "vitest"
27+
},
28+
"devDependencies": {
29+
"@types/react": "^19.0.7",
30+
"@types/react-dom": "^19.0.3",
31+
"@vitejs/plugin-react": "^4.3.4",
32+
"autoprefixer": "^10.4.20",
33+
"concurrently": "^9.1.2",
34+
"msw": "^2.7.0",
35+
"postcss": "^8.5.1",
36+
"postcss-import": "^16.1.0",
37+
"react": "^19.0.0",
38+
"react-dom": "^19.0.0",
39+
"tailwindcss": "^3.4.17",
40+
"typescript": "^5.7.3",
41+
"vite": "^6.0.7",
42+
"vitest": "^3.0.1",
43+
"vitest-websocket-mock": "^0.4.0"
44+
},
45+
"peerDependencies": {
46+
"react": "^18.2.0",
47+
"react-dom": "^18.2.0"
48+
},
49+
"dependencies": {
50+
"@navikt/aksel-icons": "^7.9.2",
51+
"@navikt/ds-css": "^7.9.2",
52+
"@navikt/ds-react": "^7.9.2",
53+
"@navikt/ds-tailwind": "^7.9.2",
54+
"@navikt/ds-tokens": "^7.9.2",
55+
"@navikt/navspa": "^7.0.0",
56+
"@tanstack/query-core": "^5.64.1",
57+
"classnames": "^2.5.1",
58+
"use-sync-external-store": "^1.4.0",
59+
"zustand": "^5.0.3"
60+
},
61+
"msw": {
62+
"workerDirectory": ["public"]
63+
}
64+
}

packages/internarbeidsflate-decorator-v3/public/mockServiceWorker.js

+15-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
* - Please do NOT serve this file on production.
99
*/
1010

11-
const PACKAGE_VERSION = '2.6.6'
12-
const INTEGRITY_CHECKSUM = 'ca7800994cc8bfb5eb961e037c877074'
11+
const PACKAGE_VERSION = '2.7.0'
12+
const INTEGRITY_CHECKSUM = '00729d72e3b82faf54ca8b9621dbb96f'
1313
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
1414
const activeClientIds = new Set()
1515

@@ -199,7 +199,19 @@ async function getResponse(event, client, requestId) {
199199
// Remove the "accept" header value that marked this request as passthrough.
200200
// This prevents request alteration and also keeps it compliant with the
201201
// user-defined CORS policies.
202-
headers.delete('accept', 'msw/passthrough')
202+
const acceptHeader = headers.get('accept')
203+
if (acceptHeader) {
204+
const values = acceptHeader.split(',').map((value) => value.trim())
205+
const filteredValues = values.filter(
206+
(value) => value !== 'msw/passthrough',
207+
)
208+
209+
if (filteredValues.length > 0) {
210+
headers.set('accept', filteredValues.join(', '))
211+
} else {
212+
headers.delete('accept')
213+
}
214+
}
203215

204216
return fetch(requestClone, { headers })
205217
}

packages/internarbeidsflate-decorator-v3/vite.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default defineConfig({
1010
rollupOptions: {
1111
input: 'src/index.ts',
1212
preserveEntrySignatures: 'exports-only',
13-
// external: ["react", "react-dom"],
13+
external: ["react", "react-dom"],
1414
output: {
1515
entryFileNames: 'bundle.js',
1616
// format: "iife",

tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"resolveJsonModule": true,
1313
"isolatedModules": true,
1414
"emitDeclarationOnly": true,
15-
"jsx": "react",
15+
"jsx": "react-jsx",
1616
"strict": true,
1717
"noUnusedLocals": true,
1818
"noUnusedParameters": true,

0 commit comments

Comments
 (0)