web-documentation 1.0.42 → 1.0.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-documentation",
3
- "version": "1.0.42",
3
+ "version": "1.0.43",
4
4
  "description": "Declarative multilanguage documentation website generator",
5
5
  "keywords": [
6
6
  "documentation",
@@ -26,6 +26,7 @@
26
26
  ],
27
27
  "main": "source/index.html.ejs",
28
28
  "bin": "build/deploy.js",
29
+ "type": "module",
29
30
  "repository": {
30
31
  "type": "git",
31
32
  "url": "https://github.com/thaibault/web-documentation"
@@ -51,9 +52,9 @@
51
52
  "watch": "weboptimizer build --watch"
52
53
  },
53
54
  "devDependencies": {
54
- "@aws-sdk/client-s3": "^3.1068.0",
55
- "@babel/eslint-parser": "^7.29.7",
56
- "@babel/runtime": "^7.29.7",
55
+ "@aws-sdk/client-s3": "^3.1095.0",
56
+ "@babel/eslint-parser": "^8.0.1",
57
+ "@babel/runtime": "^8.0.0",
57
58
  "@eslint/js": "^10.0.1",
58
59
  "@stylistic/eslint-plugin": "^5.10.0",
59
60
  "@types/archiver": "^8.0.0",
@@ -61,55 +62,55 @@
61
62
  "@types/html-minifier": "^4.0.6",
62
63
  "@types/jsdom": "^28.0.3",
63
64
  "@types/marked": "^6.0.0",
64
- "@types/node": "^25.9.3",
65
+ "@types/node": "^26.1.1",
65
66
  "@types/unzipper": "^0.10.11",
66
67
  "@types/webpack-env": "^1.18.8",
67
- "@typescript-eslint/eslint-plugin": "^8.61.0",
68
- "@typescript-eslint/parser": "^8.61.0",
68
+ "@typescript-eslint/eslint-plugin": "^8.65.0",
69
+ "@typescript-eslint/parser": "^8.65.0",
69
70
  "@webcomponents/webcomponentsjs": "^2.8.0",
70
71
  "archiver": "^8.0.0",
71
72
  "bootstrap-icons": "^1.13.1",
72
- "clientnode": "^4.0.1423",
73
+ "clientnode": "^4.0.1472",
73
74
  "css-loader": "^7.1.4",
74
75
  "cssnano": "^8.0.2",
75
76
  "default-gateway": "^7.2.2",
76
- "errorreporter": "^1.0.349",
77
- "eslint": "^10.5.0",
77
+ "errorreporter": "^1.0.355",
78
+ "eslint": "^10.8.0",
78
79
  "eslint-config-google": "^0.14.0",
79
- "eslint-plugin-jsdoc": "^63.0.2",
80
- "favicons": "^7.3.0",
80
+ "eslint-plugin-jsdoc": "^63.3.0",
81
+ "favicons": "^7.3.1",
81
82
  "favicons-webpack-plugin": "^6.0.1",
82
83
  "highlight.js": "^11.11.1",
83
84
  "jest": "30.4.2",
84
85
  "jsdoc": "^4.0.5",
85
86
  "legal-notes": "^1.0.29",
86
- "marked": "^18.0.5",
87
+ "marked": "^18.0.7",
87
88
  "marked-gfm-heading-id": "^4.1.4",
88
89
  "marked-highlight": "^2.2.4",
89
90
  "marked-xhtml": "^1.0.15",
90
91
  "mini-css-extract-plugin": "^2.10.2",
91
- "postcss": "^8.5.15",
92
+ "postcss": "^8.5.23",
92
93
  "postcss-fontpath": "^1.0.0",
93
94
  "postcss-import": "^16.1.1",
94
95
  "postcss-loader": "^8.2.1",
95
96
  "postcss-mixins": "^12.1.2",
96
97
  "postcss-nested": "^7.0.2",
97
- "postcss-preset-env": "^11.3.1",
98
+ "postcss-preset-env": "^11.3.2",
98
99
  "postcss-scss": "^4.0.9",
99
100
  "postcss-sprites": "^4.2.1",
100
101
  "postcss-url": "^10.1.4",
101
102
  "prop-types": "^15.8.1",
102
103
  "style-loader": "^4.0.0",
103
- "stylelint": "^17.13.0",
104
+ "stylelint": "^17.14.1",
104
105
  "stylelint-config-standard": "^40.0.0",
105
- "typescript-eslint": "^8.61.0",
106
+ "typescript-eslint": "^8.65.0",
106
107
  "ua-parser-js": "^2.0.10",
107
- "unzipper": "^0.12.3",
108
- "web-component-wrapper": "^0.0.602",
109
- "web-internationalization": "^2.0.42",
110
- "weboptimizer": "^3.0.24",
111
- "webpack-dev-server": "^5.2.5",
112
- "website-utilities": "^1.0.443"
108
+ "unzipper": "^0.12.5",
109
+ "web-component-wrapper": "^0.0.607",
110
+ "web-internationalization": "^2.0.45",
111
+ "weboptimizer": "^4.0.40",
112
+ "webpack-dev-server": "^6.0.0",
113
+ "website-utilities": "^1.0.458"
113
114
  },
114
115
  "engines": {
115
116
  "node": ">=24",
@@ -146,6 +147,16 @@
146
147
  "entry": {
147
148
  "#": "errorreporter\": [\"ua-parser-js\", \"errorreporter\"]",
148
149
  "__evaluate__": "2 < self.givenCommandLineArguments.length && self.givenCommandLineArguments[2].startsWith('test') ? {testBundle: './test.ts'} : {index: ['./index.css', '@webcomponents/webcomponentsjs/webcomponents-bundle.js', '@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js', './index']}"
150
+ },
151
+ "external": {
152
+ "#": "Externalize other's pre-build libraries for the test target so jest resolves the published bundles at runtime instead of re-bundling them.",
153
+ "implicit": {
154
+ "pattern": {
155
+ "include": {
156
+ "__evaluate__": "['@jest/globals'].concat(2 < self.givenCommandLineArguments.length && self.givenCommandLineArguments[2].startsWith('test') ? /^(?:clientnode|web-component-wrapper|website-utilities|web-internationalization|errorreporter)(?:$|\\/)/ : [])"
157
+ }
158
+ }
159
+ }
149
160
  }
150
161
  },
151
162
  "library": false,
@@ -165,19 +176,9 @@
165
176
  }
166
177
  },
167
178
  "optimizer": {
168
- "babelMinify": {
169
- "#": "To provide a logging output we need to exclude this feature.",
170
- "bundle": {
171
- "transform": {
172
- "removeConsole": false
173
- }
174
- },
175
- "#1": "Avoids wrong this binding in some callbacks with class bound closure (e.g. in \"performStartUpEffects -> animate -> always\".",
176
- "module": null
177
- },
178
179
  "#": "We have to add disable \"mergeRules\" since it removes header link color over writing.",
179
180
  "cssnano": {
180
- "__evaluate__": "self.debug ? null : {preset: [optionalRequire('cssnano-preset-default'), {autoprefixer: false, discardUnused: !self.library, mergeRules: false}]}"
181
+ "__await_evaluate__": "module.optionalImport('cssnano-preset-default').then((module) => self.debug ? null : {preset: [module?.default, {autoprefixer: false, discardUnused: !self.library, mergeRules: false}]})"
181
182
  },
182
183
  "htmlMinifier": {
183
184
  "ignoreCustomComments": [
@@ -191,6 +192,19 @@
191
192
  "__evaluate__": "/^showExample(?::[a-zA-Z]+)?$/"
192
193
  }
193
194
  ]
195
+ },
196
+ "terser": {
197
+ "terserOptions": {
198
+ "compress": {
199
+ "#": "To provide a logging output we need to exclude this feature.",
200
+ "drop_console": {
201
+ "__evaluate__": "false"
202
+ },
203
+ "drop_debugger": {
204
+ "__evaluate__": "false"
205
+ }
206
+ }
207
+ }
194
208
  }
195
209
  },
196
210
  "preprocessor": {
@@ -199,8 +213,8 @@
199
213
  "plugins": {
200
214
  "pre": {
201
215
  "__append__": [
202
- "require('postcss-mixins')",
203
- "require('postcss-nested')"
216
+ "module.optionalImport('postcss-mixins').then((module) => module?.default)",
217
+ "module.optionalImport('postcss-nested').then((module) => module?.default)"
204
218
  ]
205
219
  }
206
220
  }
@@ -217,6 +231,7 @@
217
231
  "__evaluate__": "self.module.preprocessor.html.options.locals.NAME === 'web-documentation' ? ['enUS', 'deDE', 'frFR'] : ['enUS']"
218
232
  },
219
233
  "MARKED_OPTIONS": {
234
+ "async": true,
220
235
  "#": "If true, add <br> on a single line break (copies GitHub behavior on comments, but not on rendered markdown files). Requires gfm be true.",
221
236
  "breaks": false,
222
237
  "#1": "If true, use approved GitHub Flavored Markdown (GFM) specification.",
@@ -227,14 +242,11 @@
227
242
  "silent": false
228
243
  },
229
244
  "NAME": "web-documentation",
230
- "IS_DIRECTORY": {
231
- "__evaluate__": "filesystem.isDirectorySync"
232
- },
233
245
  "READ_FILE": {
234
- "__evaluate__": "fs.readFileSync"
246
+ "__evaluate__": "fs.promises.readFile"
235
247
  },
236
248
  "RENDER_MARKDOWN": {
237
- "__evaluate__": "require(path.resolve(currentPath, 'source/renderMarkdown.mjs')).default(self.module.preprocessor.ejs.options.locals.MARKED_OPTIONS)"
249
+ "__await_evaluate__": "module.optionalImport(path.resolve(currentPath, 'source/renderMarkdown.mjs')).then((module) => module?.default(self.module.preprocessor.ejs.options.locals.MARKED_OPTIONS))"
238
250
  },
239
251
  "META_TAGS": [],
240
252
  "SOURCE_URL": {
@@ -276,14 +288,10 @@
276
288
  "javaScript": {
277
289
  "pattern": {
278
290
  "#": "This is how we can make our main exported artefact executable.",
279
- "__evaluate__": "`#!/usr/bin/env node\n// -*- coding: utf-8 -*-\n${self.generic.assetPattern.javaScript.pattern}{1}`"
291
+ "__evaluate__": "`#!/usr/bin/env node\n// -*- coding: utf-8 -*-\n{1}`"
280
292
  }
281
293
  }
282
294
  },
283
- "exportFormat": {
284
- "external": "commonjs2",
285
- "self": "commonjs2"
286
- },
287
295
  "files": {
288
296
  "defaultHTML": {
289
297
  "template": {
@@ -298,15 +306,17 @@
298
306
  },
299
307
  "module": {
300
308
  "optimizer": {
301
- "babelMinify": {
302
- "#": "To provide a logging output we need to exclude this feature.",
303
- "bundle": {
304
- "transform": {
305
- "removeConsole": false
309
+ "terser": {
310
+ "terserOptions": {
311
+ "compress": {
312
+ "#": "To provide a logging output we need to exclude this feature.",
313
+ "drop_console": {
314
+ "__evaluate__": "false"
315
+ },
316
+ "drop_debugger": {
317
+ "__evaluate__": "false"
318
+ }
306
319
  }
307
- },
308
- "module": {
309
- "removeConsole": false
310
320
  }
311
321
  }
312
322
  }
package/source/deploy.ts CHANGED
@@ -279,7 +279,7 @@ const generateAndPushNewDocumentationPage = async (
279
279
  const serializedParameters: string =
280
280
  JSON.stringify(evaluateDynamicData(
281
281
  BUILD_DOCUMENTATION_PAGE_CONFIGURATION,
282
- {parameters, ...PACKAGE_CONFIGURATION}
282
+ {scope: {parameters, ...PACKAGE_CONFIGURATION}}
283
283
  ))
284
284
  const parametersFilePath: string =
285
285
  await makeTemporaryFile({extension: '.json'})
Binary file
@@ -33,7 +33,7 @@ _%>
33
33
  <%_ } _%>>
34
34
  <%_ } _%>
35
35
  <title><%- _.NAME %></title>
36
- <%- _.include(
36
+ <%- await _.include(
37
37
  'web-component-wrapper/polyfill.html', {webComponents: false}
38
38
  ) %>
39
39
  <script>
@@ -194,13 +194,13 @@ _%>
194
194
  let content = ''
195
195
  if (_.CONTENT && !_.CONTENT.trim().startsWith('<!--html-->'))
196
196
  if (_.CONTENT.endsWith('.html'))
197
- content = _.READ_FILE(_.CONTENT, _.configuration.encoding)
197
+ content = await _.READ_FILE(_.CONTENT, _.configuration.encoding)
198
198
  else if (_.CONTENT.endsWith('.md'))
199
- content = _.RENDER_MARKDOWN(_.READ_FILE(
199
+ content = await _.RENDER_MARKDOWN(await _.READ_FILE(
200
200
  _.CONTENT, _.configuration.encoding
201
201
  ))
202
202
  else
203
- content = _.RENDER_MARKDOWN(_.CONTENT)
203
+ content = await _.RENDER_MARKDOWN(_.CONTENT)
204
204
  _%>
205
205
 
206
206
  <%- content %>
@@ -257,7 +257,7 @@ _%>
257
257
  </lang-replacement>
258
258
  </a>
259
259
  </p>
260
- <%- _.include('legal-notes') %>
260
+ <%- await _.include('legal-notes') %>
261
261
  </section>
262
262
  <!--endregion-->
263
263
  </main>
package/source/test.ts CHANGED
@@ -15,6 +15,7 @@
15
15
  */
16
16
  // region imports
17
17
  import {beforeAll, describe, expect, test} from '@jest/globals'
18
+
18
19
  import '@webcomponents/webcomponentsjs/custom-elements-es5-adapter'
19
20
 
20
21
  import WebDocumentation, {api} from './index'