Skip to content

Commit

Permalink
Support node v18 and hapi v21, drop node v12 and hapi v18/19 (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
geek committed Jul 19, 2022
1 parent 3872299 commit f28b7f9
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci-plugin.yml
Expand Up @@ -10,3 +10,6 @@ on:
jobs:
test:
uses: hapijs/.github/.github/workflows/ci-plugin.yml@master
with:
min-node-version: 14
min-hapi-version: 20
5 changes: 3 additions & 2 deletions LICENSE.md
@@ -1,5 +1,6 @@
Copyright (c) 2012-2020, Sideway Inc, and project contributors
Copyright (c) 2012-2014, Walmart.
Copyright (c) 2012-2022, Project contributors
Copyright (c) 2012-2020, Sideway Inc
Copyright (c) 2012-2014, Walmart.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Expand Up @@ -10,7 +10,7 @@ const internals = {};
exports.plugin = {
pkg: require('../package.json'),
requirements: {
hapi: '>=18.4.0'
hapi: '>=20.0.0'
},

register(server, options) {
Expand Down
10 changes: 5 additions & 5 deletions package.json
Expand Up @@ -19,14 +19,14 @@
]
},
"dependencies": {
"@hapi/boom": "9.x.x",
"@hapi/hoek": "9.x.x"
"@hapi/boom": "^10.0.0",
"@hapi/hoek": "^10.0.0"
},
"devDependencies": {
"@hapi/code": "8.x.x",
"@hapi/code": "^9.0.1",
"@hapi/eslint-plugin": "*",
"@hapi/hapi": "20.x.x",
"@hapi/lab": "24.x.x"
"@hapi/hapi": "^21.0.0-beta.1",
"@hapi/lab": "^25.0.1"
},
"scripts": {
"test": "lab -a @hapi/code -t 100 -L",
Expand Down
27 changes: 27 additions & 0 deletions test/esm.js
@@ -0,0 +1,27 @@
'use strict';

const Code = require('@hapi/code');
const Lab = require('@hapi/lab');


const { before, describe, it } = exports.lab = Lab.script();
const expect = Code.expect;


describe('import()', () => {

let Basic;

before(async () => {

Basic = await import('../lib/index.js');
});

it('exposes all methods and classes as named imports', () => {

expect(Object.keys(Basic)).to.equal([
'default',
'plugin'
]);
});
});

0 comments on commit f28b7f9

Please sign in to comment.