diff --git a/.eslintrc b/.eslintrc index 52a74b6..1fcdea0 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,3 +1,3 @@ { - "extends": "./node_modules/lab/lib/linter/.eslintrc.js" + "extends": "@hapi/hapi" } diff --git a/.releaserc.js b/.releaserc.js new file mode 100644 index 0000000..acfb39f --- /dev/null +++ b/.releaserc.js @@ -0,0 +1,6 @@ +module.exports = { + npmPublish: true, + tarballDir: '.', + assets: 'allow-scripts-*.tgz', + otpUrl: process.env.NPM_OTP_URL +}; diff --git a/.travis.yml b/.travis.yml index 85292e3..78cc8de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ sudo: false node_js: - "8" - "10" + - "12" - "node" install: @@ -12,6 +13,7 @@ install: jobs: include: - stage: release + if: branch = master AND type = push node_js: "10" deploy: provider: "script" diff --git a/package.json b/package.json index a080fd1..73662d1 100644 --- a/package.json +++ b/package.json @@ -21,12 +21,14 @@ "semver": "6.x.x" }, "devDependencies": { - "@commitlint/cli": "7.x.x", - "@commitlint/config-conventional": "7.x.x", - "code": "5.x.x", - "lab": "18.x.x", + "@commitlint/cli": "8.x.x", + "@commitlint/config-conventional": "8.x.x", + "@hapi/code": "^5.3.1", + "@hapi/lab": "^19.1.0", + "@semantic-release/npm": "git+https://github.com/dominykas/semantic-release-npm.git#otp-url-with-version", "mkdirp": "0.5.x", "rimraf": "2.x.x", + "semantic-release": "15.x.x", "sinon": "7.x.x" }, "files": [ @@ -38,9 +40,7 @@ "@commitlint/config-conventional" ] }, - "release": { - "npmPublish": false, - "tarballDir": ".", - "assets": "allow-scripts-*.tgz" + "allowScripts": { + "core-js": false } } diff --git a/test/index.js b/test/index.js index 6cc9202..fe0ab2c 100644 --- a/test/index.js +++ b/test/index.js @@ -8,8 +8,8 @@ const Path = require('path'); const Allow = require('..'); -const { describe, it, beforeEach, afterEach } = exports.lab = require('lab').script(); -const { expect } = require('code'); +const { describe, it, beforeEach, afterEach } = exports.lab = require('@hapi/lab').script(); +const { expect } = require('@hapi/code'); describe('allow-scripts', () => {