Skip to content

Commit 266dacf

Browse files
Version Packages
1 parent 2e746b6 commit 266dacf

5 files changed

Lines changed: 73 additions & 39 deletions

File tree

.changeset/crisp-wasps-flow.md

Lines changed: 0 additions & 37 deletions
This file was deleted.

packages/autocomplete-client/CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,43 @@
11
# @meilisearch/autocomplete-client
22

3+
## 0.8.0
4+
5+
### Minor Changes
6+
7+
- 9642256: # Rework exports and bundling
8+
- Update usage of `MeiliSearch` to lower case `Meilisearch` to eliminate some possible issues arising from JSPM and maybe other CDNs/package resolvers (#1472, #1468)
9+
- From now on [`meilisearch`](https://github.com/meilisearch/meilisearch-js/) is marked as a peer dependency
10+
- Update README.md to show the HTML example with [`importmap`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap)
11+
- Changed TypeScript settings, and adapted some files to it, so we can let in the future Node.js execute `*.ts` files directly; for now executing them with [`tsx`](https://github.com/privatenumber/tsx)
12+
- There is no need anymore for separate version file within source files, as they import the package JSON file to get the version
13+
- Node.js ^20 can now `require(esm)`, so there's no point in bundling to commonjs anymore
14+
- https://vite.dev/blog/announcing-vite8#node-js-support
15+
- https://github.com/vitejs/vite/blob/main/packages/vite/package.json
16+
- Remove UMD bundle, modern browsers support importing ESM from URLs and `type="module"` scripts for almost a decade now, even Node.js supports requiring ESM as stated above
17+
- Remove any fields regarding exports outside of `"exports"` field, all supported Node.js versions support "exports" field, as do all modern bundlers and CDNs
18+
- Make use of [`publishConfig`](https://pnpm.io/package_json#publishconfig), so we can export to other workspace packages the TypeScript source files
19+
- Thanks to this change, running build script is only required for publishing, and not for developing
20+
- Put `package.json` into exports, mainly so bundlers can read it via directly importing it, and it seems to be the industry norm
21+
22+
## Migration
23+
1. - CommonJS and UMD bundles aren't available anymore
24+
- `package.json` `"main"` and `"types"` fields aren't available anymore
25+
26+
If you relied on any of these outdated features, you will have to bundle for any target environment that requires them, or update the environment if that's possible.
27+
2. From now on [`meilisearch`](https://github.com/meilisearch/meilisearch-js/) is a peer dependency (if the package manager used doesn't automatically install it, add it to the list of dependencies manually):
28+
29+
```diff
30+
- import { meilisearch } from '@meilisearch/instant-meilisearch'
31+
- import { meilisearch } from '@meilisearch/autocomplete-client'
32+
+ import * as meilisearch from 'meilisearch'
33+
+ import { Meilisearch } from 'meilisearch'
34+
```
35+
36+
### Patch Changes
37+
38+
- Updated dependencies [9642256]
39+
- @meilisearch/instant-meilisearch@0.31.0
40+
341
## 0.7.0
442

543
### Minor Changes

packages/autocomplete-client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@meilisearch/autocomplete-client",
3-
"version": "0.7.0",
3+
"version": "0.8.0",
44
"description": "The search client to use Meilisearch with autocomplete.js.",
55
"homepage": "https://github.com/meilisearch/meilisearch-js-plugins/tree/main/packages/autocomplete-client",
66
"scripts": {

packages/instant-meilisearch/CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,38 @@
11
# @meilisearch/instant-meilisearch
22

3+
## 0.31.0
4+
5+
### Minor Changes
6+
7+
- 9642256: # Rework exports and bundling
8+
- Update usage of `MeiliSearch` to lower case `Meilisearch` to eliminate some possible issues arising from JSPM and maybe other CDNs/package resolvers (#1472, #1468)
9+
- From now on [`meilisearch`](https://github.com/meilisearch/meilisearch-js/) is marked as a peer dependency
10+
- Update README.md to show the HTML example with [`importmap`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap)
11+
- Changed TypeScript settings, and adapted some files to it, so we can let in the future Node.js execute `*.ts` files directly; for now executing them with [`tsx`](https://github.com/privatenumber/tsx)
12+
- There is no need anymore for separate version file within source files, as they import the package JSON file to get the version
13+
- Node.js ^20 can now `require(esm)`, so there's no point in bundling to commonjs anymore
14+
- https://vite.dev/blog/announcing-vite8#node-js-support
15+
- https://github.com/vitejs/vite/blob/main/packages/vite/package.json
16+
- Remove UMD bundle, modern browsers support importing ESM from URLs and `type="module"` scripts for almost a decade now, even Node.js supports requiring ESM as stated above
17+
- Remove any fields regarding exports outside of `"exports"` field, all supported Node.js versions support "exports" field, as do all modern bundlers and CDNs
18+
- Make use of [`publishConfig`](https://pnpm.io/package_json#publishconfig), so we can export to other workspace packages the TypeScript source files
19+
- Thanks to this change, running build script is only required for publishing, and not for developing
20+
- Put `package.json` into exports, mainly so bundlers can read it via directly importing it, and it seems to be the industry norm
21+
22+
## Migration
23+
1. - CommonJS and UMD bundles aren't available anymore
24+
- `package.json` `"main"` and `"types"` fields aren't available anymore
25+
26+
If you relied on any of these outdated features, you will have to bundle for any target environment that requires them, or update the environment if that's possible.
27+
2. From now on [`meilisearch`](https://github.com/meilisearch/meilisearch-js/) is a peer dependency (if the package manager used doesn't automatically install it, add it to the list of dependencies manually):
28+
29+
```diff
30+
- import { meilisearch } from '@meilisearch/instant-meilisearch'
31+
- import { meilisearch } from '@meilisearch/autocomplete-client'
32+
+ import * as meilisearch from 'meilisearch'
33+
+ import { Meilisearch } from 'meilisearch'
34+
```
35+
336
## 0.30.0
437

538
### Minor Changes

packages/instant-meilisearch/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@meilisearch/instant-meilisearch",
3-
"version": "0.30.0",
3+
"version": "0.31.0",
44
"description": "The search client to use Meilisearch with InstantSearch.",
55
"homepage": "https://github.com/meilisearch/meilisearch-js-plugins/tree/main/packages/instant-meilisearch",
66
"license": "MIT",

0 commit comments

Comments
 (0)