Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
37 changes: 0 additions & 37 deletions .changeset/crisp-wasps-flow.md

This file was deleted.

38 changes: 38 additions & 0 deletions packages/autocomplete-client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# @meilisearch/autocomplete-client

## 0.8.0

### Minor Changes

- 9642256: # Rework exports and bundling
- Update usage of `MeiliSearch` to lower case `Meilisearch` to eliminate some possible issues arising from JSPM and maybe other CDNs/package resolvers (#1472, #1468)
- From now on [`meilisearch`](https://github.com/meilisearch/meilisearch-js/) is marked as a peer dependency
- Update README.md to show the HTML example with [`importmap`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap)
- 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)
- There is no need anymore for separate version file within source files, as they import the package JSON file to get the version
- Node.js ^20 can now `require(esm)`, so there's no point in bundling to commonjs anymore
- https://vite.dev/blog/announcing-vite8#node-js-support
- https://github.com/vitejs/vite/blob/main/packages/vite/package.json
- 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
- Remove any fields regarding exports outside of `"exports"` field, all supported Node.js versions support "exports" field, as do all modern bundlers and CDNs
- Make use of [`publishConfig`](https://pnpm.io/package_json#publishconfig), so we can export to other workspace packages the TypeScript source files
- Thanks to this change, running build script is only required for publishing, and not for developing
- Put `package.json` into exports, mainly so bundlers can read it via directly importing it, and it seems to be the industry norm
Comment thread
Strift marked this conversation as resolved.
Outdated

## Migration
1. - CommonJS and UMD bundles aren't available anymore
- `package.json` `"main"` and `"types"` fields aren't available anymore

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.
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):

```diff
- import { meilisearch } from '@meilisearch/instant-meilisearch'
- import { meilisearch } from '@meilisearch/autocomplete-client'
+ import * as meilisearch from 'meilisearch'
+ import { Meilisearch } from 'meilisearch'
```

### Patch Changes

- Updated dependencies [9642256]
- @meilisearch/instant-meilisearch@0.31.0

## 0.7.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/autocomplete-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@meilisearch/autocomplete-client",
"version": "0.7.0",
"version": "0.8.0",
"description": "The search client to use Meilisearch with autocomplete.js.",
"homepage": "https://github.com/meilisearch/meilisearch-js-plugins/tree/main/packages/autocomplete-client",
"scripts": {
Expand Down
33 changes: 33 additions & 0 deletions packages/instant-meilisearch/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# @meilisearch/instant-meilisearch

## 0.31.0

### Minor Changes

- 9642256: # Rework exports and bundling
- Update usage of `MeiliSearch` to lower case `Meilisearch` to eliminate some possible issues arising from JSPM and maybe other CDNs/package resolvers (#1472, #1468)
- From now on [`meilisearch`](https://github.com/meilisearch/meilisearch-js/) is marked as a peer dependency
- Update README.md to show the HTML example with [`importmap`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap)
- 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)
- There is no need anymore for separate version file within source files, as they import the package JSON file to get the version
- Node.js ^20 can now `require(esm)`, so there's no point in bundling to commonjs anymore
- https://vite.dev/blog/announcing-vite8#node-js-support
- https://github.com/vitejs/vite/blob/main/packages/vite/package.json
- 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
- Remove any fields regarding exports outside of `"exports"` field, all supported Node.js versions support "exports" field, as do all modern bundlers and CDNs
- Make use of [`publishConfig`](https://pnpm.io/package_json#publishconfig), so we can export to other workspace packages the TypeScript source files
- Thanks to this change, running build script is only required for publishing, and not for developing
- Put `package.json` into exports, mainly so bundlers can read it via directly importing it, and it seems to be the industry norm
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

## Migration
1. - CommonJS and UMD bundles aren't available anymore
- `package.json` `"main"` and `"types"` fields aren't available anymore

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.
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):

```diff
- import { meilisearch } from '@meilisearch/instant-meilisearch'
- import { meilisearch } from '@meilisearch/autocomplete-client'
+ import * as meilisearch from 'meilisearch'
+ import { Meilisearch } from 'meilisearch'
```

## 0.30.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/instant-meilisearch/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@meilisearch/instant-meilisearch",
"version": "0.30.0",
"version": "0.31.0",
"description": "The search client to use Meilisearch with InstantSearch.",
"homepage": "https://github.com/meilisearch/meilisearch-js-plugins/tree/main/packages/instant-meilisearch",
"license": "MIT",
Expand Down
Loading