Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export type declaration maps *.d.mts.map #4154

Closed
wants to merge 3 commits into from

Conversation

colinrotherham
Copy link
Contributor

Follow up to #2835 and up for discussion

Enables editor and IDE “Go to definition” (to original sources) via npm install govuk-frontend

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4154 August 31, 2023 13:23 Inactive
@github-actions
Copy link

github-actions bot commented Aug 31, 2023

📋 Stats

File sizes

File Size
dist/govuk-frontend-development.min.css 112.86 KiB
dist/govuk-frontend-development.min.js 38.53 KiB
packages/govuk-frontend/dist/govuk/all.bundle.js 78.63 KiB
packages/govuk-frontend/dist/govuk/all.bundle.mjs 73.89 KiB
packages/govuk-frontend/dist/govuk/all.mjs 3.86 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend-component.mjs 359 B
packages/govuk-frontend/dist/govuk/govuk-frontend.min.css 112.85 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend.min.js 38.51 KiB
packages/govuk-frontend/dist/govuk/i18n.mjs 5.38 KiB

Modules

File Size (bundled) Size (minified)
all.mjs 70.21 KiB 36.78 KiB
accordion.mjs 21.67 KiB 12.42 KiB
button.mjs 4.67 KiB 2.16 KiB
character-count.mjs 21.24 KiB 9.45 KiB
checkboxes.mjs 5.83 KiB 2.83 KiB
error-summary.mjs 6.57 KiB 2.92 KiB
exit-this-page.mjs 16.04 KiB 8.86 KiB
header.mjs 4.46 KiB 2.6 KiB
notification-banner.mjs 4.93 KiB 2.09 KiB
radios.mjs 4.83 KiB 2.38 KiB
skip-link.mjs 4.39 KiB 2.18 KiB
tabs.mjs 10.13 KiB 6.11 KiB

View stats and visualisations on the review app


Action run for e325a62

@colinrotherham colinrotherham requested a review from a team as a code owner October 2, 2023 12:16
@colinrotherham colinrotherham force-pushed the build-types-declaration-maps branch from a232f4d to aaee535 Compare October 2, 2023 12:16
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4154 October 2, 2023 12:17 Inactive
@colinrotherham colinrotherham force-pushed the build-types-declaration-maps branch from aaee535 to a2241f0 Compare October 2, 2023 12:50
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4154 October 2, 2023 12:50 Inactive
@colinrotherham colinrotherham force-pushed the build-types-declaration-maps branch from a2241f0 to ff899a6 Compare October 11, 2023 15:01
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4154 October 11, 2023 15:02 Inactive
@colinrotherham colinrotherham force-pushed the build-types-declaration-maps branch from ff899a6 to fb9e6d3 Compare October 23, 2023 19:40
@colinrotherham colinrotherham force-pushed the build-types-declaration-maps branch from fb9e6d3 to b23d87e Compare November 10, 2023 09:47
@colinrotherham colinrotherham force-pushed the build-types-declaration-maps branch from b23d87e to 5fb52b8 Compare November 29, 2023 11:15
Copy link

github-actions bot commented Nov 29, 2023

Other changes to npm package

diff --git a/packages/govuk-frontend/dist/govuk/all.d.mts b/packages/govuk-frontend/dist/govuk/all.d.mts
index 80b4caadd..8e7644ebf 100644
--- a/packages/govuk-frontend/dist/govuk/all.d.mts
+++ b/packages/govuk-frontend/dist/govuk/all.d.mts
@@ -91,3 +91,4 @@ import { Radios } from './components/radios/radios.mjs';
 import { SkipLink } from './components/skip-link/skip-link.mjs';
 import { Tabs } from './components/tabs/tabs.mjs';
 export { version, Accordion, Button, CharacterCount, Checkboxes, ErrorSummary, ExitThisPage, Header, NotificationBanner, Radios, SkipLink, Tabs };
+//# sourceMappingURL=all.d.mts.map
\ No newline at end of file
diff --git a/packages/govuk-frontend/dist/govuk/common/closest-attribute-value.d.mts b/packages/govuk-frontend/dist/govuk/common/closest-attribute-value.d.mts
index f8b233519..1ab2cafc6 100644
--- a/packages/govuk-frontend/dist/govuk/common/closest-attribute-value.d.mts
+++ b/packages/govuk-frontend/dist/govuk/common/closest-attribute-value.d.mts
@@ -7,3 +7,4 @@
  * @returns {string | null} Attribute value
  */
 export function closestAttributeValue($element: Element, attributeName: string): string | null;
+//# sourceMappingURL=closest-attribute-value.d.mts.map
\ No newline at end of file
diff --git a/packages/govuk-frontend/dist/govuk/common/govuk-frontend-version.d.mts b/packages/govuk-frontend/dist/govuk/common/govuk-frontend-version.d.mts
index 41b014810..c3d1e3daa 100644
--- a/packages/govuk-frontend/dist/govuk/common/govuk-frontend-version.d.mts
+++ b/packages/govuk-frontend/dist/govuk/common/govuk-frontend-version.d.mts
@@ -4,3 +4,4 @@
  * {@link https://github.com/alphagov/govuk-frontend/releases}
  */
 export const version: "development";
+//# sourceMappingURL=govuk-frontend-version.d.mts.map
\ No newline at end of file
diff --git a/packages/govuk-frontend/dist/govuk/common/index.d.mts b/packages/govuk-frontend/dist/govuk/common/index.d.mts
index ccd0abbb5..fbc2888d7 100644
--- a/packages/govuk-frontend/dist/govuk/common/index.d.mts
+++ b/packages/govuk-frontend/dist/govuk/common/index.d.mts
@@ -118,3 +118,4 @@ export type SchemaCondition = {
      */
     errorMessage: string;
 };
+//# sourceMappingURL=index.d.mts.map
\ No newline at end of file
diff --git a/packages/govuk-frontend/dist/govuk/common/normalise-dataset.d.mts b/packages/govuk-frontend/dist/govuk/common/normalise-dataset.d.mts
index 8fe4823ef..338545e7b 100644
--- a/packages/govuk-frontend/dist/govuk/common/normalise-dataset.d.mts
+++ b/packages/govuk-frontend/dist/govuk/common/normalise-dataset.d.mts
@@ -26,3 +26,4 @@ export function normaliseString(value: string | undefined): string | boolean | n
 export function normaliseDataset(dataset: DOMStringMap): {
     [key: string]: string | number | boolean | undefined;
 };
+//# sourceMappingURL=normalise-dataset.d.mts.map
\ No newline at end of file
diff --git a/packages/govuk-frontend/dist/govuk/components/accordion/accordion.d.mts b/packages/govuk-frontend/dist/govuk/components/accordion/accordion.d.mts
index 89233a78c..6de247630 100644
--- a/packages/govuk-frontend/dist/govuk/components/accordion/accordion.d.mts
+++ b/packages/govuk-frontend/dist/govuk/components/accordion/accordion.d.mts
@@ -245,3 +245,4 @@ export type AccordionTranslations = {
     showSectionAriaLabel?: string | undefined;
 };
 import { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';
+//# sourceMappingURL=accordion.d.mts.map
\ No newline at end of file
diff --git a/packages/govuk-frontend/dist/govuk/components/button/button.d.mts b/packages/govuk-frontend/dist/govuk/components/button/button.d.mts
index 64da5ad1b..935a46012 100644
--- a/packages/govuk-frontend/dist/govuk/components/button/button.d.mts
+++ b/packages/govuk-frontend/dist/govuk/components/button/button.d.mts
@@ -70,3 +70,4 @@ export type ButtonConfig = {
     preventDoubleClick?: boolean | undefined;
 };
 import { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';
+//# sourceMappingURL=button.d.mts.map
\ No newline at end of file
diff --git a/packages/govuk-frontend/dist/govuk/components/character-count/character-count.d.mts b/packages/govuk-frontend/dist/govuk/components/character-count/character-count.d.mts
index 58c39c5e5..6b6048fd4 100644
--- a/packages/govuk-frontend/dist/govuk/components/character-count/character-count.d.mts
+++ b/packages/govuk-frontend/dist/govuk/components/character-count/character-count.d.mts
@@ -269,3 +269,4 @@ export type CharacterCountTranslations = {
 export type Schema = import('../../common/index.mjs').Schema;
 export type TranslationPluralForms = import('../../i18n.mjs').TranslationPluralForms;
 import { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';
+//# sourceMappingURL=character-count.d.mts.map
\ No newline at end of file
diff --git a/packages/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.d.mts b/packages/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.d.mts
index 712c491e2..28677efc0 100644
--- a/packages/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.d.mts
+++ b/packages/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.d.mts
@@ -77,3 +77,4 @@ export class Checkboxes extends GOVUKFrontendComponent {
     private handleClick;
 }
 import { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';
+//# sourceMappingURL=checkboxes.d.mts.map
\ No newline at end of file
diff --git a/packages/govuk-frontend/dist/govuk/components/error-summary/error-summary.d.mts b/packages/govuk-frontend/dist/govuk/components/error-summary/error-summary.d.mts
index 708fe9d8b..587a19dc8 100644
--- a/packages/govuk-frontend/dist/govuk/components/error-summary/error-summary.d.mts
+++ b/packages/govuk-frontend/dist/govuk/components/error-summary/error-summary.d.mts
@@ -87,3 +87,4 @@ export type ErrorSummaryConfig = {
     disableAutoFocus?: boolean | undefined;
 };
 import { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';
+//# sourceMappingURL=error-summary.d.mts.map
\ No newline at end of file
diff --git a/packages/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.d.mts b/packages/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.d.mts
index da4bb4414..e49cbe615 100644
--- a/packages/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.d.mts
+++ b/packages/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.d.mts
@@ -191,3 +191,4 @@ export type ExitThisPageTranslations = {
     pressOneMoreTime?: string | undefined;
 };
 import { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';
+//# sourceMappingURL=exit-this-page.d.mts.map
\ No newline at end of file
diff --git a/packages/govuk-frontend/dist/govuk/components/header/header.d.mts b/packages/govuk-frontend/dist/govuk/components/header/header.d.mts
index b1596574b..0f6c5408c 100644
--- a/packages/govuk-frontend/dist/govuk/components/header/header.d.mts
+++ b/packages/govuk-frontend/dist/govuk/components/header/header.d.mts
@@ -66,3 +66,4 @@ export class Header extends GOVUKFrontendComponent {
     private handleMenuButtonClick;
 }
 import { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';
+//# sourceMappingURL=header.d.mts.map
\ No newline at end of file
diff --git a/packages/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.d.mts b/packages/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.d.mts
index 696d5e125..7e81bed83 100644
--- a/packages/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.d.mts
+++ b/packages/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.d.mts
@@ -42,3 +42,4 @@ export type NotificationBannerConfig = {
     disableAutoFocus?: boolean | undefined;
 };
 import { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';
+//# sourceMappingURL=notification-banner.d.mts.map
\ No newline at end of file
diff --git a/packages/govuk-frontend/dist/govuk/components/radios/radios.d.mts b/packages/govuk-frontend/dist/govuk/components/radios/radios.d.mts
index 3901263f8..471d5ba39 100644
--- a/packages/govuk-frontend/dist/govuk/components/radios/radios.d.mts
+++ b/packages/govuk-frontend/dist/govuk/components/radios/radios.d.mts
@@ -57,3 +57,4 @@ export class Radios extends GOVUKFrontendComponent {
     private handleClick;
 }
 import { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';
+//# sourceMappingURL=radios.d.mts.map
\ No newline at end of file
diff --git a/packages/govuk-frontend/dist/govuk/components/skip-link/skip-link.d.mts b/packages/govuk-frontend/dist/govuk/components/skip-link/skip-link.d.mts
index 4ed8d45bd..fa8971e73 100644
--- a/packages/govuk-frontend/dist/govuk/components/skip-link/skip-link.d.mts
+++ b/packages/govuk-frontend/dist/govuk/components/skip-link/skip-link.d.mts
@@ -19,3 +19,4 @@ export class SkipLink extends GOVUKFrontendComponent {
     private $module;
 }
 import { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';
+//# sourceMappingURL=skip-link.d.mts.map
\ No newline at end of file
diff --git a/packages/govuk-frontend/dist/govuk/components/tabs/tabs.d.mts b/packages/govuk-frontend/dist/govuk/components/tabs/tabs.d.mts
index f5b1d819a..ce2e89f78 100644
--- a/packages/govuk-frontend/dist/govuk/components/tabs/tabs.d.mts
+++ b/packages/govuk-frontend/dist/govuk/components/tabs/tabs.d.mts
@@ -187,3 +187,4 @@ export class Tabs extends GOVUKFrontendComponent {
     private getCurrentTab;
 }
 import { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';
+//# sourceMappingURL=tabs.d.mts.map
\ No newline at end of file
diff --git a/packages/govuk-frontend/dist/govuk/errors/index.d.mts b/packages/govuk-frontend/dist/govuk/errors/index.d.mts
index d22350614..75b1fc4db 100644
--- a/packages/govuk-frontend/dist/govuk/errors/index.d.mts
+++ b/packages/govuk-frontend/dist/govuk/errors/index.d.mts
@@ -74,3 +74,4 @@ export type ElementErrorOptions = {
      */
     expectedType?: string | undefined;
 };
+//# sourceMappingURL=index.d.mts.map
\ No newline at end of file
diff --git a/packages/govuk-frontend/dist/govuk/govuk-frontend-component.d.mts b/packages/govuk-frontend/dist/govuk/govuk-frontend-component.d.mts
index 5abec9edb..d82ef05a9 100644
--- a/packages/govuk-frontend/dist/govuk/govuk-frontend-component.d.mts
+++ b/packages/govuk-frontend/dist/govuk/govuk-frontend-component.d.mts
@@ -15,3 +15,4 @@ export class GOVUKFrontendComponent {
      */
     private checkSupport;
 }
+//# sourceMappingURL=govuk-frontend-component.d.mts.map
\ No newline at end of file
diff --git a/packages/govuk-frontend/dist/govuk/i18n.d.mts b/packages/govuk-frontend/dist/govuk/i18n.d.mts
index 90829b603..9056dfa08 100644
--- a/packages/govuk-frontend/dist/govuk/i18n.d.mts
+++ b/packages/govuk-frontend/dist/govuk/i18n.d.mts
@@ -190,3 +190,4 @@ export type TranslationPluralForms = {
      */
     many?: string | undefined;
 };
+//# sourceMappingURL=i18n.d.mts.map
\ No newline at end of file

Action run for e325a62

@colinrotherham colinrotherham force-pushed the build-types-declaration-maps branch from 2852387 to 4c258d7 Compare January 8, 2024 17:38
@colinrotherham colinrotherham force-pushed the build-types-declaration-maps branch from 4c258d7 to 97210a5 Compare January 18, 2024 09:49
@colinrotherham colinrotherham force-pushed the build-types-declaration-maps branch from 97210a5 to fd45bba Compare February 19, 2024 19:37
@colinrotherham colinrotherham force-pushed the build-types-declaration-maps branch from fd45bba to a9f06c7 Compare February 27, 2024 10:53
Just like source maps for CSS and JavaScript, declaration maps are used to map type definitions to their original source code

This makes “Go to definition” in editors and IDEs useful
Allows users of GOV.UK Frontend to see the original source when selecting “Go to definition” rather than solely the type declarations
@colinrotherham colinrotherham force-pushed the build-types-declaration-maps branch from a9f06c7 to e325a62 Compare March 8, 2024 15:49
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4154 March 8, 2024 15:50 Inactive
@querkmachine
Copy link
Member

We're still interested in shipping proper type definitions in the future, but this work isn't in our team roadmap for the immediate future.

As such, I'm closing this off for housekeeping purposes. Happy to hear more thoughts and feedback on the issue, however: #2835

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants