Skip to content

Commit f6be873

Browse files
authored
release of v10.95.0 (#6347)
2 parents f2cdb9b + 18454a7 commit f6be873

503 files changed

Lines changed: 7327 additions & 2554 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/verify.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,22 @@ jobs:
6565
run: yarn workspace @dnb/eufemia audit:ci
6666

6767
- name: Run lint
68-
run: yarn workspace @dnb/eufemia lint:ci && yarn workspace dnb-design-system-portal lint:ci
68+
run: |
69+
yarn workspace @dnb/eufemia lint:ci
70+
yarn workspace dnb-design-system-portal lint:ci
6971
7072
- name: Run type checks
71-
run: yarn workspace @dnb/eufemia test:types && yarn workspace dnb-design-system-portal test:types
73+
run: |
74+
yarn workspace @dnb/eufemia test:types
75+
yarn workspace dnb-design-system-portal test:types
76+
yarn workspace eufemia-llm-metadata test:types
7277
7378
- name: Run tests
74-
run: yarn workspace @dnb/eufemia test:ci && yarn workspace dnb-design-system-portal test:ci
79+
run: |
80+
yarn workspace @dnb/eufemia test:ci
81+
yarn workspace dnb-design-system-portal test:ci
82+
yarn workspace markdown-tables-utils test
83+
yarn workspace eufemia-llm-metadata test
7584
7685
- name: Run dependency checks
7786
run: yarn workspace @dnb/eufemia test:deps

.vscode/mcp.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"servers": {
3+
"eufemia": {
4+
"command": "bash",
5+
"args": [
6+
"${workspaceFolder}/packages/dnb-eufemia/src/mcp/run-mcp-server.sh"
7+
],
8+
"env": {
9+
"EUFEMIA_DOCS_ROOT": "${workspaceFolder}/packages/dnb-eufemia/build/docs"
10+
}
11+
}
12+
}
13+
}

.yarn/patches/eslint-plugin-compat-npm-6.0.2-187c42861e.patch

Lines changed: 0 additions & 30 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"version": "1.0.0",
1212
"workspaces": [
1313
"packages/*",
14+
"packages/**/plugins/*",
1415
"tools/*"
1516
],
1617
"main": "./packages/eufemia/index.js",

packages/dnb-design-system-portal/.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
"useTabs": false,
77
"semi": false,
88
"bracketSameLine": false,
9-
"trailingComma": "all"
9+
"trailingComma": "es5"
1010
}

packages/dnb-design-system-portal/eslint.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export default [
1414
'**/reports/**',
1515
'**/node_modules/**',
1616
'*not_in_use*',
17+
'**/plugins/gatsby-plugin-eufemia-llm-metadata/**',
1718
],
1819
},
1920
...eufemiaConfig,

packages/dnb-design-system-portal/gatsby-config.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ const {
1313
} = require('@dnb/eufemia/src/plugins/postcss-isolated-style-scope/config')
1414

1515
const pathPrefix = '/'
16+
const isMini = process.env.BUILD_MINI === '1'
17+
const skipImageProcessing =
18+
process.env.SKIP_IMAGE_PROCESSING === '1' || isMini
1619

1720
const siteMetadata = {
1821
title: 'DNB Design System',
@@ -36,11 +39,7 @@ const ignoreAsPage = [
3639
]
3740

3841
const plugins = [
39-
process.env.GATSBY_CLOUD === 'true' && {
40-
resolve: 'gatsby-plugin-gatsby-cloud',
41-
options: {},
42-
},
43-
{
42+
!isMini && {
4443
resolve: 'gatsby-plugin-manifest',
4544
options: {
4645
name: 'Eufemia - DNB Design System',
@@ -64,10 +63,10 @@ const plugins = [
6463
display: 'standalone',
6564
},
6665
},
67-
'gatsby-plugin-meta-redirect',
66+
!isMini && 'gatsby-plugin-meta-redirect',
6867
'gatsby-plugin-catch-links',
69-
process.env.SKIP_IMAGE_PROCESSING !== '1' && 'gatsby-plugin-sharp', // is used by gatsby-remark-images
70-
process.env.SKIP_IMAGE_PROCESSING !== '1' && 'gatsby-remark-images',
68+
!skipImageProcessing && 'gatsby-plugin-sharp', // is used by gatsby-remark-images
69+
!skipImageProcessing && 'gatsby-remark-images',
7170
{
7271
resolve: 'gatsby-plugin-mdx',
7372
options: {
@@ -79,7 +78,7 @@ const plugins = [
7978
],
8079
},
8180
gatsbyRemarkPlugins: [
82-
process.env.SKIP_IMAGE_PROCESSING !== '1' && {
81+
!skipImageProcessing && {
8382
resolve: 'gatsby-remark-images',
8483
options: {
8584
maxWidth: 1024,
@@ -176,10 +175,10 @@ const plugins = [
176175
omitScrollBehavior: true, // Ensure smooth scrolling with CSS `scroll-behavior: smooth;` is working
177176
},
178177
},
179-
'gatsby-plugin-eufemia-llm-metadata',
178+
process.env.BUILD_MINI ? null : 'gatsby-plugin-eufemia-llm-metadata',
180179
].filter(Boolean)
181180

182-
if (currentBranch === 'release') {
181+
if (currentBranch === 'release' && !isMini) {
183182
plugins.push({
184183
// This (optional) plugin enables Progressive Web App + Offline functionality
185184
// To learn more, visit: https://gatsby.app/offline
@@ -195,6 +194,7 @@ if (currentBranch === 'release') {
195194

196195
// Algolia search
197196
if (
197+
!isMini &&
198198
process.env.IS_VISUAL_TEST !== '1' &&
199199
!global.pagesPath.includes('_dummy')
200200
) {

packages/dnb-design-system-portal/gatsby-node.js

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const {
1515
} = require('@dnb/eufemia/src/plugins/postcss-isolated-style-scope/config')
1616

1717
const PREBUILD_EXISTS = shouldUsePrebuild()
18+
const isMini = process.env.BUILD_MINI === '1'
1819

1920
// Used for heading
2021
const {
@@ -120,17 +121,23 @@ exports.createResolvers = ({ createResolvers }) => {
120121
}
121122

122123
exports.createPages = async (params) => {
124+
if (isMini) {
125+
return
126+
}
123127
await createRedirects(params)
124128
}
125129

126130
exports.onPostBuild = async (params) => {
131+
if (isMini) {
132+
return
133+
}
127134
await createRedirects(params)
128135

129136
if (deletedPages.length) {
130137
params.reporter.warn(
131138
`❗️ These pages were deleted:\n${deletedPages
132139
.map((page) => `├ ${page}`)
133-
.join('\n')}\n\n`,
140+
.join('\n')}\n\n`
134141
)
135142
}
136143

@@ -277,20 +284,20 @@ exports.onCreateWebpackConfig = ({
277284
// Algolia info
278285
plugins.define({
279286
'process.env.ALGOLIA_INDEX_NAME': JSON.stringify(
280-
process.env.ALGOLIA_INDEX_NAME || 'dev_eufemia_docs',
287+
process.env.ALGOLIA_INDEX_NAME || 'dev_eufemia_docs'
281288
),
282289
'process.env.ALGOLIA_APP_ID': JSON.stringify(
283-
process.env.ALGOLIA_APP_ID || 'SLD6KEYMQ9',
290+
process.env.ALGOLIA_APP_ID || 'SLD6KEYMQ9'
284291
),
285292
'process.env.ALGOLIA_SEARCH_KEY': JSON.stringify(
286293
process.env.ALGOLIA_SEARCH_KEY ||
287-
'6cf238b7456ffd9f7a400d8de37318a3',
294+
'6cf238b7456ffd9f7a400d8de37318a3'
288295
),
289296
'process.env.ENABLE_BUILD_STYLE_SCOPE': JSON.stringify(
290-
enableBuildStyleScope(),
297+
enableBuildStyleScope()
291298
),
292299
'process.env.ENABLE_PORTAL_STYLE_SCOPE': JSON.stringify(
293-
enablePortalStyleScope(),
300+
enablePortalStyleScope()
294301
),
295302
}),
296303
],
@@ -299,25 +306,25 @@ exports.onCreateWebpackConfig = ({
299306
if (PREBUILD_EXISTS && stage === 'build-javascript') {
300307
if (PREBUILD_EXISTS && !isCI) {
301308
reporter.warn(
302-
'😱 There is a "dnb-eufemia/build" in your local repo. It is used during your local Portal build! \nKeep in mind, the code from "dnb-eufemia/build" may be outdated. \n\n👉 You can remove the build with: "yarn build:clean"\n\n',
309+
'😱 There is a "dnb-eufemia/build" in your local repo. It is used during your local Portal build! \nKeep in mind, the code from "dnb-eufemia/build" may be outdated. \n\n👉 You can remove the build with: "yarn build:clean"\n\n'
303310
)
304311
}
305312

306313
config.plugins.push(
307314
plugins.normalModuleReplacement(/@dnb\/eufemia\/src/, (resource) => {
308315
resource.request = resource.request.replace(
309316
/@dnb\/eufemia\/src(.*)/,
310-
'@dnb/eufemia/build$1',
317+
'@dnb/eufemia/build$1'
311318
)
312-
}),
319+
})
313320
)
314321
}
315322

316323
// Suppress mini-css-extract-plugin "Conflicting order" warnings
317324
if (stage === 'build-javascript' || stage === 'develop') {
318325
const webpackConfig = getConfig()
319326
const miniCssExtractPlugin = webpackConfig.plugins.find(
320-
(plugin) => plugin.constructor.name === 'MiniCssExtractPlugin',
327+
(plugin) => plugin.constructor.name === 'MiniCssExtractPlugin'
321328
)
322329
if (miniCssExtractPlugin) {
323330
miniCssExtractPlugin.options.ignoreOrder = true
@@ -340,7 +347,7 @@ exports.onCreateDevServer = (params) => {
340347
params.reporter.info(
341348
`🚀 You can only visit these pages:\n\n${createdPages
342349
.map((page) => `├ http://localhost:8000${page}`)
343-
.join('\n')}\n`,
350+
.join('\n')}\n`
344351
)
345352
}
346353
}

packages/dnb-design-system-portal/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"scripts": {
1010
"build": "cross-env NODE_OPTIONS=--max-old-space-size=16384 gatsby build",
1111
"build:ci": "yarn build:version && gatsby build --prefix-paths",
12+
"build:mini": "BUILD_MINI=1 gatsby build --prefix-paths",
1213
"build:version": "node ./scripts/version.js --new-version",
1314
"build:visual-test": "SKIP_IMAGE_PROCESSING=1 IS_VISUAL_TEST=1 NODE_OPTIONS=--max-old-space-size=16384 gatsby build --no-uglify",
1415
"clean": "gatsby clean",
@@ -71,16 +72,15 @@
7172
"eslint-plugin-react": "7.37.5",
7273
"eslint-plugin-react-hooks": "7.0.1",
7374
"eslint-plugin-workspaces": "0.11.1",
75+
"eufemia-llm-metadata": "workspace:*",
7476
"front-matter": "4.0.2",
7577
"fs-extra": "10.0.0",
7678
"gatsby": "5.14.3",
7779
"gatsby-plugin-algolia": "1.0.3",
78-
"gatsby-plugin-babel-react-live": "1.4.4",
80+
"gatsby-plugin-babel-react-live": "1.4.5",
7981
"gatsby-plugin-catch-links": "5.14.0",
8082
"gatsby-plugin-emotion": "8.14.0",
81-
"gatsby-plugin-eufemia-llm-metadata": "workspace:*",
8283
"gatsby-plugin-eufemia-theme-handler": "1.8.0",
83-
"gatsby-plugin-gatsby-cloud": "5.14.0",
8484
"gatsby-plugin-manifest": "5.14.0",
8585
"gatsby-plugin-mdx": "5.14.1",
8686
"gatsby-plugin-meta-redirect": "1.1.1",
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Eufemia LLM Metadata Gatsby Plugin
2+
3+
Generates Markdown copies with JSON blocks for documentation pages to aid LLMs.
4+
5+
## How it works
6+
7+
- Uses `eufemia-llm-metadata` to collect documentation and creates relevant files.
8+
- Files are referenced in the head as alternate markdown links for properties/events by the portal.
9+
- Gatsby portal build: writes to `packages/dnb-design-system-portal/public` and includes `llms.txt`.

0 commit comments

Comments
 (0)