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

Merge next into master #432

Merged
merged 5 commits into from
Jul 22, 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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

jobs:
test:
uses: fastify/workflows/.github/workflows/plugins-ci.yml@v3
uses: fastify/workflows/.github/workflows/plugins-ci.yml@v4.1.0
with:
license-check: true
lint: true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

out/
tap-snapshots/

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

Expand Down
9 changes: 2 additions & 7 deletions .taprc
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
ts: false
jsx: false
flow: false
coverage: true
nyc-arg: [--exclude=out]

disable-coverage: true
files:
- test/**/*.{js,mjs}
- test/*.{js,mjs}
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,7 @@ async function fastifyView (fastify, opts) {
renderAsync = engine.renderAsync.bind(engine)
}

/* c8 ignore next */
if (opts?.async ?? globalOptions.async) {
return renderAsync(page, data, config)
} else {
Expand Down
42 changes: 21 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"example-with-options": "node examples/example-ejs-with-some-options.js",
"example-typescript": "npx ts-node types/index.test-d.ts",
"lint": "standard",
"test-with-snapshot": "cross-env TAP_SNAPSHOT=1 tap test/test-ejs-with-snapshot.js",
"test": "npm run test:unit && npm run test:typescript",
"test-with-snapshot": "cross-env TAP_SNAPSHOT=1 tap test/snap/*",
"test": "npm run test:unit && npm run test-with-snapshot && npm run test:typescript",
"test:unit": "tap",
"test:typescript": "tsd"
},
Expand Down Expand Up @@ -40,33 +40,33 @@
},
"homepage": "https://github.com/fastify/point-of-view#readme",
"dependencies": {
"fastify-plugin": "^4.0.0",
"fastify-plugin": "^5.0.0-pre.fv5.1",
"toad-cache": "^3.7.0"
},
"devDependencies": {
"@fastify/pre-commit": "^2.0.2",
"@types/node": "^20.1.0",
"@fastify/pre-commit": "^2.1.0",
"@types/node": "^20.12.7",
"art-template": "^4.13.2",
"autocannon": "^7.15.0",
"cross-env": "^7.0.2",
"cross-env": "^7.0.3",
"dot": "^1.1.3",
"ejs": "^3.1.8",
"eta": "^3.0.3",
"express": "^4.17.1",
"fastify": "^4.0.0-rc.2",
"handlebars": "^4.7.6",
"ejs": "^3.1.10",
"eta": "^3.4.0",
"express": "^4.19.2",
"fastify": "^5.0.0-alpha.3",
"handlebars": "^4.7.8",
"html-minifier-terser": "^7.2.0",
"liquidjs": "^10.0.0",
"mustache": "^4.0.1",
"nunjucks": "^3.2.1",
"pino": "^9.2.0",
"pug": "^3.0.0",
"simple-get": "^4.0.0",
"split2": "^4.0.0",
"standard": "^17.0.0",
"tap": "^16.0.0",
"liquidjs": "^10.11.0",
"mustache": "^4.2.0",
"nunjucks": "^3.2.4",
"pino": "^9.0.0",
"pug": "^3.0.2",
"simple-get": "^4.0.1",
"split2": "^4.2.0",
"standard": "^17.1.0",
"tap": "^18.7.2",
"tsd": "^0.31.0",
"twig": "^1.13.3"
"twig": "^1.17.1"
},
"pre-commit": [
"lint",
Expand Down
26 changes: 0 additions & 26 deletions tap-snapshots/test/test-ejs-with-snapshot.js.test.cjs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test('reply.view with ejs engine, template folder specified, include files (ejs

const data = { text: 'text' }

fastify.register(require('../index'), {
fastify.register(require('../../index'), {
engine: {
ejs
},
Expand Down Expand Up @@ -62,7 +62,7 @@ test('reply.view with ejs engine, templates with folder specified, include files

const data = { text: 'Hello from EJS Templates' }

fastify.register(require('../index'), {
fastify.register(require('../../index'), {
engine: {
ejs
},
Expand Down Expand Up @@ -106,7 +106,7 @@ test('reply.view with ejs engine, templates with folder specified, include files

const data = { text: 'Hello from EJS Templates' }

fastify.register(require('../index'), {
fastify.register(require('../../index'), {
engine: {
ejs
},
Expand Down Expand Up @@ -150,7 +150,7 @@ test('reply.view with ejs engine, templates with folder specified, include files

const data = { text: 'Hello from EJS Templates' }

fastify.register(require('../index'), {
fastify.register(require('../../index'), {
engine: {
ejs
},
Expand Down Expand Up @@ -194,7 +194,7 @@ test('reply.view with ejs engine, templates with folder specified, include files

const data = { text: 'Hello from EJS Templates' }

fastify.register(require('../index'), {
fastify.register(require('../../index'), {
engine: {
ejs
},
Expand Down
2 changes: 1 addition & 1 deletion test/test-dot.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ test('reply.view with dot engine .dot file should log WARN if template not found
})
const logger = pino({ level: 'warn' }, splitStream)
const fastify = Fastify({
logger
loggerInstance: logger
})
const engine = require('dot')
engine.log = false
Expand Down
Loading