From 9b3143c421ab0c945f7c30dfc6b2eefa005b21cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20Sch=C3=BCrch?= Date: Wed, 10 Apr 2024 15:43:05 +0200 Subject: [PATCH] chore(components): change package.json main, module and types files-paths to the recommended dist-folder files (#2886) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Alizé Debray --- .changeset/giant-glasses-sniff.md | 12 +++++++++ packages/components/package.json | 9 +++---- .../migrationv6-7.component.ts | 27 +++++++++++++++++++ 3 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 .changeset/giant-glasses-sniff.md diff --git a/.changeset/giant-glasses-sniff.md b/.changeset/giant-glasses-sniff.md new file mode 100644 index 0000000000..d6e5725039 --- /dev/null +++ b/.changeset/giant-glasses-sniff.md @@ -0,0 +1,12 @@ +--- +'@swisspost/design-system-components': major +--- + +Updated the package entry properties in the package.json to the by stencil recommended files: + +- Updated the `main` property from `loader/index.cjs.js` to `dist/index.cjs.js` +- Updated the `module` property from `loader/index.js` to `dist/loader.js` +- Updated the `types` property from `loader/index.d.ts` to `dist/types/index.d.ts` +- Removed the `es2017` property + +The usage of the `@swisspost/design-system-components/loader` entry files are still available and should be used to get the lazy-loaded components. diff --git a/packages/components/package.json b/packages/components/package.json index 965146eb59..0ae98f9f3d 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -3,10 +3,9 @@ "version": "2.1.0", "description": "A collection of web components built with Stencil JS for the Swiss Post Design System.", "license": "Apache-2.0", - "main": "loader/index.cjs.js", - "module": "loader/index.js", - "es2017": "loader/index.2017.js", - "types": "loader/index.d.ts", + "main": "dist/index.cjs.js", + "module": "dist/index.js", + "types": "dist/types/index.d.ts", "collection": "dist/collection/collection-manifest.json", "collection:main": "dist/collection/index.js", "unpkg": "dist/post-components/post-components.esm.js", @@ -24,7 +23,7 @@ "linkDirectory": true }, "scripts": { - "dev": "stencil build --serve --port 9200 --watch --docs-readme", + "dev": "stencil build --port 9200 --serve --watch --docs-readme", "start": "stencil build --watch --docs-readme", "build": "stencil build --docs-readme", "clean": "rimraf www dist loader", diff --git a/packages/documentation/src/stories/getting-started/migration-guide/migrationv6-7.component.ts b/packages/documentation/src/stories/getting-started/migration-guide/migrationv6-7.component.ts index c232656884..bc01ada703 100644 --- a/packages/documentation/src/stories/getting-started/migration-guide/migrationv6-7.component.ts +++ b/packages/documentation/src/stories/getting-started/migration-guide/migrationv6-7.component.ts @@ -195,6 +195,33 @@ export class MigrationV67Component extends LitElement {

Web Components