webextension-polyfill-ts
Advanced tools
Comparing version 0.15.0 to 0.16.0
{ | ||
"name": "webextension-polyfill-ts", | ||
"version": "0.15.0", | ||
"version": "0.16.0", | ||
"description": "webextension-polyfill for TypeScript", | ||
@@ -21,14 +21,12 @@ "keywords": [ | ||
"files": [ | ||
"dist/", | ||
"src/generated/", | ||
"tsconfig.json" | ||
"lib/" | ||
], | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"scripts": { | ||
"all": "npm run fetch && npm run validate && npm run generate && npm run build", | ||
"build": "rimraf dist && tsc", | ||
"fetch": "ts-node src/commands/fetch.ts", | ||
"validate": "ts-node src/commands/validate.ts", | ||
"generate": "ts-node src/commands/generate.ts" | ||
"all": "npm run fetch && npm run validate:schemas && npm run build && npm run validate:lib", | ||
"build": "ts-node src/build.ts", | ||
"fetch": "ts-node src/fetch.ts", | ||
"validate:schemas": "ts-node src/validate.ts", | ||
"validate:lib": "tsc -p tsconfig-lib.json" | ||
}, | ||
@@ -39,9 +37,9 @@ "dependencies": { | ||
"devDependencies": { | ||
"@types/node": "^13.13.4", | ||
"@types/node": "^14.0.5", | ||
"@types/rimraf": "^3.0.0", | ||
"got": "^11.0.3", | ||
"got": "^11.1.4", | ||
"rimraf": "^3.0.2", | ||
"ts-node": "^8.9.1", | ||
"typescript": "^3.8.3" | ||
"ts-node": "^8.10.1", | ||
"typescript": "^3.9.3" | ||
} | ||
} |
@@ -10,3 +10,3 @@ # Web-Extension Polyfill for TypeScript | ||
## How to use: | ||
This guide assumes you are building a web-extension using npm and webpack. | ||
This guide assumes you are building a web-extension using npm and webpack, parcel or similar. | ||
If you are looking for an example use-case, check out the development branch of my web-extension [Forget Me Not](https://github.com/lusito/forget-me-not/tree/develop). | ||
@@ -21,4 +21,7 @@ | ||
```typescript | ||
import { browser, Cookies } from "webextension-polyfill-ts"; | ||
const cookie: Cookies.Cookie; | ||
import { Cookies } from "webextension-polyfill-ts"; | ||
function inspectCookie(cookie: Cookies.Cookie) { | ||
//... | ||
} | ||
``` | ||
@@ -32,2 +35,5 @@ | ||
## Unit Testing | ||
Consider [mockzilla-webextension](https://lusito.github.io/mockzilla-webextension/) for unit-testing. It combines all the types this package provides with some nifty mocking functionality. | ||
## Issues | ||
@@ -34,0 +40,0 @@ There are still some issues left: |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
55
424131
63
10835
1