From 0a1065409b385184007e9c037158b5b91cb670a6 Mon Sep 17 00:00:00 2001 From: Bas Huis Date: Thu, 2 Dec 2021 08:44:36 +0100 Subject: [PATCH 1/2] Add test for functions to be deprecated in v2 --- src/index.test.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/index.test.js b/src/index.test.js index c74c18a..ed2a7f7 100755 --- a/src/index.test.js +++ b/src/index.test.js @@ -1,5 +1,7 @@ const { test } = require('tape') +const { isNil } = require('./helpers') const { check, gen } = require('tape-check') +const { version } = require('../package') const { reference, instanceOf, @@ -166,3 +168,15 @@ test('Deprecated functions', ts => { console.error = consoleError ts.end() }) + +if (version.startsWith('2')) { + + test('Deprecated functions in version 2', t => { + t.plan(3) + t.ok(isNil(require('./index').typed)) + t.ok(isNil(require('./index').t)) + t.ok(isNil(require('./index').ref)) + }) + +} + From ca6c26b22375fe2e1c37d214238fbeb127571001 Mon Sep 17 00:00:00 2001 From: Bas Huis Date: Thu, 2 Dec 2021 08:45:41 +0100 Subject: [PATCH 2/2] Use npm ci instead of install and prune --- README.mz | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.mz b/README.mz index 3e18954..25a2cc7 100644 --- a/README.mz +++ b/README.mz @@ -442,8 +442,8 @@ We also care about code coverage so we'll use [nyc][8] to generate a coverage report. ```bash bash -eo pipefail -# Install and prune dependencies -{ npm i && npm prune; } &> /dev/null +# Clearn install dependencies. +npm ci &> /dev/null # Run tests and generate a coverage report npx nyc npm t | npx tap-nyc