@ministryofjustice/frontend-types 1.0.0-alpha.1 → 1.0.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Change log
2
2
 
3
+ ## 1.0.0
4
+
5
+ Updated the GOV.UK frontend types file to allow the `ConfigurableComponent` config field to be a `NestedObject`.
6
+ Added an example/test for the MoJ `FilterToggleButton`.
7
+ Also pinned npm to 11.11.1 for unit tests in GitHub actions as the latest Node 22 had issues getting the latest npm.
8
+
9
+ ## 1.0.0-alpha.2
10
+
11
+ Updating types for GOV.UK frontend 6.1.0 (scripts were unchanged).
12
+
3
13
  ## 1.0.0-alpha.1
4
14
 
5
15
  Adding manually-created ambient modules defining the exported items of:
package/dist/index.d.ts CHANGED
@@ -61,7 +61,7 @@ declare module 'accessible-autocomplete' {
61
61
  export default accessibleAutocomplete
62
62
  }
63
63
  /**
64
- * GOV.UK Frontend types based on v5.14.0
64
+ * GOV.UK Frontend types based on v6.1.0
65
65
  * https://github.com/alphagov/govuk-frontend
66
66
  *
67
67
  * NB: this was recreated manually from javascript sources and may be incomplete!
@@ -104,7 +104,7 @@ declare module 'govuk-frontend' {
104
104
  /** @since 5.8.0 */
105
105
  export abstract class ConfigurableComponent<
106
106
  RootElement extends HTMLElement = HTMLElement,
107
- Config = Record<string, string | boolean | number>,
107
+ Config = ObjectNested,
108
108
  > extends Component<RootElement> {
109
109
  // technically types of `schema` and `defaults` should be strongly tied to `Config`,
110
110
  // but static properties cannot refer to generic parameters
@@ -134,7 +134,7 @@ declare module 'govuk-frontend' {
134
134
  /** @since 5.9.0 */
135
135
  export class FileUpload extends ConfigurableComponent {}
136
136
  /**
137
- * NB: removed in 6.0.0
137
+ * NB: removed in 6.0.0! Included here for 5.x compatibility.
138
138
  * @since 5.0.0
139
139
  */
140
140
  export class Header extends Component {}
@@ -210,7 +210,7 @@ declare module 'govuk-frontend' {
210
210
  export const version: string
211
211
  }
212
212
  /**
213
- * MoJ Frontend types based on v8.0.1
213
+ * MoJ Frontend types based on v9.0.0
214
214
  * https://github.com/ministryofjustice/moj-frontend
215
215
  *
216
216
  * NB: this was recreated manually from javascript sources and may be incomplete!
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ministryofjustice/frontend-types",
3
- "version": "1.0.0-alpha.1",
3
+ "version": "1.0.0",
4
4
  "description": "",
5
5
  "author": "hmpps-developers",
6
6
  "license": "MIT",
@@ -31,14 +31,14 @@
31
31
  "check-for-updates": "npx npm-check-updates -u"
32
32
  },
33
33
  "devDependencies": {
34
- "@ministryofjustice/frontend": "8.0.1",
34
+ "@ministryofjustice/frontend": "9.0.0",
35
35
  "accessible-autocomplete": "3.0.1",
36
- "govuk-frontend": "5.14.0"
36
+ "govuk-frontend": "6.1.0"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@ministryofjustice/frontend": "6 || 7 || 8 || 9",
40
40
  "accessible-autocomplete": "3",
41
- "govuk-frontend": "5 || 6.0.x"
41
+ "govuk-frontend": "5 || 6"
42
42
  },
43
43
  "peerDependenciesMeta": {
44
44
  "@ministryofjustice/frontend": {