Skip to content

Commit

Permalink
update to v5 (#423)
Browse files Browse the repository at this point in the history
  • Loading branch information
gurgunday committed Apr 22, 2024
1 parent 8a78eb9 commit 1adfe27
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 60 deletions.
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 @@ -607,6 +607,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": "^4.5.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": "^4.26.2",
"handlebars": "^4.7.8",
"html-minifier-terser": "^7.2.0",
"liquidjs": "^10.0.0",
"mustache": "^4.0.1",
"nunjucks": "^3.2.1",
"pino": "^8.0.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": "^8.20.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

0 comments on commit 1adfe27

Please sign in to comment.