Migrates the library to TypeScript. Note: this PR is about enabling TypeScript and not leveraging it. Where the compiler complained about types, I just added any... for now. And it does also not yet generate type declarations. This was done intentionally as I didn't want to break consumer if they started relying on them while they were still being in flux
imports/exports have been switched to ESM
.npmignore has been deleted in favour of explicitly specifying files to be included using the files key in the package.json
formatted with nom run format (prettier)
How should this be manually tested?
npm run test to make sure that the library is not broken
npm pack to see what will be in the published package
npm link and then npm link snyk-policy in Registry before running Registry tests to make sure the clients can still consume the library and everything is working as expected
What does this PR do?
Migrates the library to TypeScript. Note: this PR is about enabling TypeScript and not leveraging it. Where the compiler complained about types, I just added
any
... for now. And it does also not yet generate type declarations. This was done intentionally as I didn't want to break consumer if they started relying on them while they were still being in flux.npmignore
has been deleted in favour of explicitly specifying files to be included using thefiles
key in thepackage.json
nom run format
(prettier)How should this be manually tested?
npm run test
to make sure that the library is not brokennpm pack
to see what will be in the published packagenpm link
and thennpm link snyk-policy
in Registry before running Registry tests to make sure the clients can still consume the library and everything is working as expected