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

chore(components): change package.json main, module and types files-paths to the recommended dist-folder files #2886

Merged
merged 12 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .changeset/giant-glasses-sniff.md
Original file line number Diff line number Diff line change
@@ -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.
9 changes: 4 additions & 5 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
oliverschuerch marked this conversation as resolved.
Show resolved Hide resolved
"collection": "dist/collection/collection-manifest.json",
"collection:main": "dist/collection/index.js",
"unpkg": "dist/post-components/post-components.esm.js",
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,33 @@ export class MigrationV67Component extends LitElement {
<h4>WebComponents</h4>

<ul>
<li class="mb-3">
<p>
Updated the package entry file paths within the <em>package.json</em> to the
paths, recommended by stencil
<span class="tag tag-sm tag-danger">breaking</span>
</p>
<ul>
<li>
updated the <code>main</code> property from
<code>loader/index.cjs.js</code> to <code>dist/index.cjs.js</code>
</li>
<li>
updated the <code>module</code> property from <code>loader/index.js</code> to
<code>dist/loader.js</code>
</li>
<li>
updated the <code>types</code> property from <code>loader/index.d.ts</code> to
<code>dist/types/index.d.ts</code>
</li>
<li>removed the <code>es2017</code> property</li>
</ul>
<p class="info">
The usage of the <code>@swisspost/design-system-components/loader</code> entry
files are still available and should be used (as documented) to get the
lazy-loaded components.
</p>
</li>
<li class="mb-3">
<p>
Renamed all <em>custom-events</em> in our existing web-components
Expand Down
Loading