Skip to content

Update nodejs runtime to node20 #179

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

Merged
merged 3 commits into from
May 22, 2024
Merged

Update nodejs runtime to node20 #179

merged 3 commits into from
May 22, 2024

Conversation

brunoocasali
Copy link
Member

Fixes #178

@brunoocasali brunoocasali added enhancement New feature or request breaking-change The related changes are breaking for the users labels May 21, 2024
@brunoocasali brunoocasali requested a review from curquiza May 21, 2024 19:02
Copy link
Member

@curquiza curquiza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors merge

Copy link
Contributor

meili-bors bot commented May 22, 2024

Build succeeded:

@meili-bors meili-bors bot merged commit 28b9e9a into main May 22, 2024
3 checks passed
@meili-bors meili-bors bot deleted the brunoocasali-patch-1 branch May 22, 2024 06:58
meili-bors bot added a commit that referenced this pull request Apr 15, 2025
200: Move typescript to dependencies r=curquiza a=Strift

## why

- fix build to allow deploying v0.3.0

## how

- move `typescript` to dependencies

note: Google is unclear about it, but it seems that dev dependencies are not installed, as I see other projects including typescript as part of their dependencies (see [stripe-firebase-extensions](https://github.com/invertase/stripe-firebase-extensions/blob/next/firestore-stripe-invoices/functions/package.json))

```
firebase ext:dev:upload meilisearch/firestore-meilisearch

Extension: meilisearch/firestore-meilisearch
State: Published
Latest Version: 0.1.12
Version in Extensions Hub: 0.1.12
Source in GitHub: Local source

? Enter the GitHub repo URI where this extension's source code is located: https://github.com/meilisearch/firestore-meilisearch
? Enter this extension's root directory in the repo (defaults to previous root if set): /
? Enter the commit hash, branch, or tag name to build from in the repo: HEAD
Validating source code at https://github.com/meilisearch/firestore-meilisearch/tree/HEAD/...
? Choose the release stage: Stable (0.3.0, automatically sent for review)

You are about to upload a new version to Firebase's registry of extensions.

Extension: meilisearch/firestore-meilisearch
Version: 0.3.0 (automatically sent for review)
Source: https://github.com/meilisearch/firestore-meilisearch/tree/HEAD/
Release notes:
Breaking: Update nodejs runtime to node20 (#179) `@brunoocasali`

Once an extension version is uploaded, it becomes installable by other users and cannot be changed. If you wish to make changes after uploading, you will need to upload a new version.

? Do you wish to continue? Yes
✖ Uploading meilisearch/[email protected]...

Error: generic::invalid_argument: failed to build ExtensionVersion "publishers/meilisearch/extensions/firestore-meilisearch/versions/0.3.0" source: failed to build NPM package:
Pulling image: us-docker.pkg.dev/extensions-builder-prod/extensions-builder/builder
Using default tag: latest
latest: Pulling from extensions-builder-prod/extensions-builder/builder
3153aa388d02: Pulling fs layer
ef57089adb55: Pulling fs layer
792066ee936e: Pulling fs layer
9ed9b1b2bc55: Pulling fs layer
9ed9b1b2bc55: Waiting
3153aa388d02: Verifying Checksum
3153aa388d02: Download complete
9ed9b1b2bc55: Verifying Checksum
9ed9b1b2bc55: Download complete
ef57089adb55: Download complete
792066ee936e: Verifying Checksum
792066ee936e: Download complete
3153aa388d02: Pull complete
ef57089adb55: Pull complete
792066ee936e: Pull complete
9ed9b1b2bc55: Pull complete
Digest: sha256:3f9b4d6c7b66b5859a7d894cd23d8ddcf78a23dcee2959a79ef99a5c8c41b81b
Status: Downloaded newer image for us-docker.pkg.dev/extensions-builder-prod/extensions-builder/builder:latest
us-docker.pkg.dev/extensions-builder-prod/extensions-builder/builder:latest
Now using node v20.4.0 (npm v9.7.2)

> [email protected] build
> tsc

sh: 1: tsc: not found
```

Co-authored-by: Strift <[email protected]>
meili-bors bot added a commit that referenced this pull request Apr 17, 2025
202: Remove jest types from tsconfig r=curquiza a=Strift

# Pull Request

## Related issue

Error when publishing the extension

```

Extension: meilisearch/firestore-meilisearch
State: Published
Latest Version: 0.1.12
Version in Extensions Hub: 0.1.12
Source in GitHub: Local source

? Enter the GitHub repo URI where this extension's source code is located: https://github.com/meilisearch/firestore-meilisearch
? Enter this extension's root directory in the repo (defaults to previous root if set): /
? Enter the commit hash, branch, or tag name to build from in the repo: HEAD
Validating source code at https://github.com/meilisearch/firestore-meilisearch/tree/HEAD/...
? Choose the release stage: Stable (0.3.0, automatically sent for review)

You are about to upload a new version to Firebase's registry of extensions.

Extension: meilisearch/firestore-meilisearch
Version: 0.3.0 (automatically sent for review)
Source: https://github.com/meilisearch/firestore-meilisearch/tree/HEAD/
Release notes:
Breaking: Update nodejs runtime to node20 (#179) `@brunoocasali`

Once an extension version is uploaded, it becomes installable by other users and cannot be changed. If you wish to make changes after uploading, you will need to upload a new version.

? Do you wish to continue? Yes
✖ Uploading meilisearch/[email protected]...

Error: generic::invalid_argument: failed to build ExtensionVersion "publishers/meilisearch/extensions/firestore-meilisearch/versions/0.3.0" source: failed to build NPM package:
Pulling image: us-docker.pkg.dev/extensions-builder-prod/extensions-builder/builder
Using default tag: latest
latest: Pulling from extensions-builder-prod/extensions-builder/builder
3153aa388d02: Pulling fs layer
ef57089adb55: Pulling fs layer
792066ee936e: Pulling fs layer
9ed9b1b2bc55: Pulling fs layer
9ed9b1b2bc55: Waiting
3153aa388d02: Verifying Checksum
3153aa388d02: Download complete
9ed9b1b2bc55: Verifying Checksum
9ed9b1b2bc55: Download complete
ef57089adb55: Download complete
792066ee936e: Verifying Checksum
792066ee936e: Download complete
3153aa388d02: Pull complete
ef57089adb55: Pull complete
792066ee936e: Pull complete
9ed9b1b2bc55: Pull complete
Digest: sha256:3f9b4d6c7b66b5859a7d894cd23d8ddcf78a23dcee2959a79ef99a5c8c41b81b
Status: Downloaded newer image for us-docker.pkg.dev/extensions-builder-prod/extensions-builder/builder:latest
us-docker.pkg.dev/extensions-builder-prod/extensions-builder/builder:latest
Now using node v20.4.0 (npm v9.7.2)

> [email protected] build
> tsc

error TS2688: Cannot find type definition file for 'jest'.
  The file is in the program because:
    Entry point of type library 'jest' specified in compilerOptions
```

## What does this PR do?
- Move `jest` types to `functions/__tests__/tsconfig.json`
- Fix ensuing type errors

## PR checklist
Please check if your PR fulfills the following requirements:
- [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!


Co-authored-by: Strift <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change The related changes are breaking for the users enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade the Now Deprecated NodeJS Runtime
2 participants