Closed push1st1k closed 4 years ago
Hi @push1st1k Thanks a lot for this PR. We're not using typescript and this library any more, but the tests look all good and it seems that types also do their job :) So I'm going to release a minor (v1.2.0), now.
I got errors compiling the package before publish:
src/Strategy.ts:38:25 - error TS2339: Property 'fail' does not exist on type 'Strategy'.
38 return this.fail(new BadRequestError('Missing API Key'), null);
~~~~
src/Strategy.ts:44:25 - error TS2339: Property 'fail' does not exist on type 'Strategy'.
44 return this.fail(
~~~~
src/Strategy.ts:54:29 - error TS2339: Property 'error' does not exist on type 'Strategy'.
54 return this.error(err);
~~~~~
src/Strategy.ts:57:29 - error TS2339: Property 'fail' does not exist on type 'Strategy'.
57 return this.fail(info, null);
~~~~
src/Strategy.ts:59:18 - error TS2339: Property 'success' does not exist on type 'Strategy'.
59 this.success(user, info);
~~~~~~~
Can you maybe do something about that?
@guischdi let me look into it
@guischdi I tried to reproduce it, but everything looks fine. Could you check the installed tsc version?
~/workspace/passport-headerapikey$ npm publish
> passport-headerapikey@1.1.0 prepublishOnly .
> tsc
npm notice
npm notice 📦 passport-headerapikey@1.1.0
npm notice === Tarball Contents ===
npm notice 431B lib/errors/BadRequestError.js
npm notice 444B lib/index.js
npm notice 2.5kB lib/Strategy.js
npm notice 1.1kB package.json
npm notice 3.5kB README.md
npm notice 273B lib/errors/BadRequestError.d.ts
npm notice 251B lib/index.d.ts
npm notice 816B lib/Strategy.d.ts
npm notice === Tarball Details ===
npm notice name: passport-headerapikey
npm notice version: 1.1.0
npm notice package size: 3.4 kB
npm notice unpacked size: 9.3 kB
npm notice shasum: 90f4c4dc86835fb2e04e5206f51d2ca755c72aab
npm notice integrity: sha512-MtXmq0n0JYNEh[...]0HeZMACHciOQw==
npm notice total files: 8
npm notice
Ok, I'm so sorry for the confusion. Something must have been wrong with my node_modules. After a rm -rf node_modules && npm i
everything worked fine. v1.2.0 is publish!
Thanks again!