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

feat: add support for eta@3.x #377

Merged
merged 1 commit into from
Jun 30, 2023

Conversation

multivoltage
Copy link
Contributor

@multivoltage multivoltage commented Jun 28, 2023

Checklist

Goal

I want etajs@3.x support for this project. Hope my PR or other people want same feature

What I did not

Not edited documentation since probably I cannot say to be skilled enough in this project

What I did

I tried to make all the tests work by changing as few things as possible. Unfortunately, one big change involves creating an Eta instance with new Eta().
I had to change many parts of the tests. Not sure about many changes. Finally I started a test project by installing fastify, and linking index.js. I managed to get the basic example working:

import view from '../point-of-view-new'
import { Eta } from 'eta'

const eta = new Eta()

const fastify = Fastify({
    logger: true
  })
  
fastify.register(view, {
    engine: {
      eta
    },
});

  
// Declare a route
fastify.get('/', function (request, reply) {
    reply.view("/templates/hello.eta", { name: "diego" });
})

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina mcollina added the semver-major Issue or PR that should land as semver major label Jun 29, 2023
@multivoltage
Copy link
Contributor Author

@mcollina
maybe I should have created a special issue for this change?

@mcollina
Copy link
Member

why?

@multivoltage
Copy link
Contributor Author

Honestly I don't know. Is my second time I submit a pr ;)

@mcollina mcollina merged commit 2bf96d9 into fastify:master Jun 30, 2023
15 checks passed
ddadaal pushed a commit to PKUHPC/SCOW that referenced this pull request Jul 4, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@fastify/view](https://togithub.com/fastify/point-of-view) | [`7.4.1`
->
`8.0.0`](https://renovatebot.com/diffs/npm/@fastify%2fview/7.4.1/8.0.0)
|
[![age](https://badges.renovateapi.com/packages/npm/@fastify%2fview/8.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@fastify%2fview/8.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@fastify%2fview/8.0.0/compatibility-slim/7.4.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@fastify%2fview/8.0.0/confidence-slim/7.4.1)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>fastify/point-of-view (@&#8203;fastify/view)</summary>

###
[`v8.0.0`](https://togithub.com/fastify/point-of-view/releases/tag/v8.0.0)

[Compare
Source](https://togithub.com/fastify/point-of-view/compare/v7.4.1...v8.0.0)

#### What's Changed

- build(deps-dev): bump eta from 1.14.2 to 2.0.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[fastify/point-of-view#364
- chore(.gitignore): add bun lockfile by
[@&#8203;Fdawgs](https://togithub.com/Fdawgs) in
[fastify/point-of-view#366
- build(deps-dev): bump tsd from 0.25.0 to 0.26.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[fastify/point-of-view#367
- build(deps-dev): bump tsd from 0.26.1 to 0.27.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[fastify/point-of-view#368
- build(deps-dev): bump tsd from 0.27.0 to 0.28.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[fastify/point-of-view#369
- ci: only trigger on pushes to main branches by
[@&#8203;Fdawgs](https://togithub.com/Fdawgs) in
[fastify/point-of-view#370
- build(deps-dev): bump
[@&#8203;types/node](https://togithub.com/types/node) from 18.16.5 to
20.1.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in
[fastify/point-of-view#371
- feat: add support for eta@3.x by
[@&#8203;multivoltage](https://togithub.com/multivoltage) in
[fastify/point-of-view#377

#### New Contributors

- [@&#8203;multivoltage](https://togithub.com/multivoltage) made their
first contribution in
[fastify/point-of-view#377

**Full Changelog**:
fastify/point-of-view@v7.4.1...v8.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on sunday" in timezone Asia/Shanghai,
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log [here](https://developer.mend.io/github/PKUHPC/SCOW).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xNDQuMiIsInVwZGF0ZWRJblZlciI6IjM1LjE0NC4yIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@aalfiann
Copy link

I have issue, this PR doesn't work if eta using includeFile.

@Eomm
Copy link
Member

Eomm commented Jul 26, 2023

Please open a new detailed issue adding a Minimal, Reproducible Example.

@fastify fastify locked as resolved and limited conversation to collaborators Jul 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
semver-major Issue or PR that should land as semver major
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants