mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-11-05 04:47:54 +00:00
7a08a2d676
* Catch promise errors better * Move subFunctions to bottom of createNewWindow * Use parents when creating child BrowserWindow instances * Some about:blank pages have an anchor (for some reason) * Inject browserWindowOptions better * Interim refactor to MainWindow object * Split up the window functions/helpers/events some * Further separate out window functions + tests * Add a mock for unit testing functions that access electron * Add unit tests for onWillPreventUnload * Improve windowEvents tests * Add the first test for windowHelpers * Move WebRequest event handling to node * insertCSS completely under test * clearAppData completely under test * Fix contextMenu require bug * More tests + fixes * Fix + add to createNewTab tests * Convert createMainWindow back to func + work out gremlins * Move setupWindow away from main since its shared * Make sure contextMenu is handling promises * Fix issues with fullscreen not working + menu refactor * Run jest against app/dist so that we can hit app unit tests as well * Requested PR changes * Add strict typing; tests currently failing * Fix failing unit tests * Add some more eslint warnings and fixes * More eslint fixes * Strict typing on (still issues with the lib dir) * Fix the package.json import/require * Fix some funky test errors * Warn -> Error for eslint rules * @ts-ignore -> @ts-expect-error * Add back the ext code I removed
37 lines
1.2 KiB
JSON
37 lines
1.2 KiB
JSON
{
|
|
"compilerOptions": {
|
|
"allowJs": false,
|
|
"declaration": true,
|
|
"incremental": true,
|
|
"module": "commonjs",
|
|
"moduleResolution": "node",
|
|
"outDir": "./lib",
|
|
"resolveJsonModule": true,
|
|
"skipLibCheck": true,
|
|
"sourceMap": true,
|
|
"strict": true,
|
|
// Bumping the minimum required Node version? You must bump:
|
|
// 1. package.json -> engines.node
|
|
// 2. package.json -> devDependencies.@types/node
|
|
// 3. tsconfig.json -> {target, lib}
|
|
// 4. .github/workflows/ci.yml -> node-version
|
|
//
|
|
// Here in tsconfig.json, we want to set the `target` and `lib` keys
|
|
// to the "best" values for the minimum/required version of node.
|
|
// TS doesn't offer any easy "preset" for this, so the best we have is to
|
|
// believe people who know which {syntax, library} parts of current EcmaScript
|
|
// are supported for our version of Node, and use what they recommend.
|
|
// For the current Node version, I followed
|
|
// https://stackoverflow.com/questions/59787574/typescript-tsconfig-settings-for-node-js-12
|
|
"target": "es2019",
|
|
// In `lib` we add `dom`, to tell tsc it's okay to use the URL object (which is in Node >= 7)
|
|
"lib": [
|
|
"es2020",
|
|
"dom"
|
|
]
|
|
},
|
|
"include": [
|
|
"./src/**/*"
|
|
]
|
|
}
|