-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adding config for stubbing (#360)
* fix: only stub `process.env` if not targeting node * fix: use better replacement * only dont stub on main thread electron * add tests that use the compiler * start converting old tests * move more tests * replace old tests * fix errors * fix race condition * handle no dir error * remove behavior changes * drop node 8 * undo more fixes * fix stubbing replacement, only stub on targets where we should * remove deprecated code * drop support for webpack <4 * merge stubIgnore PR * update readme * fix logic * Update README.md * skip stubbing on webpack 4, do not stub if target includes `node` * handle target array * move version check * fix logic * replace usage of `rmdirSync(..., { recursive: true })` BREAKING CHANGE: dropping support for Node v8 BREAKING CHANGE: dropping support for webpack < 4 BREAKING CHANGE: automatically stubbing during compilation
- Loading branch information
Showing
8 changed files
with
555 additions
and
264 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# Tests | ||
test/output | ||
|
||
# Logs | ||
logs | ||
*.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* eslint-disable no-unused-vars */ | ||
|
||
// Basic | ||
const TEST = process.env.TEST | ||
const TEST2 = process.env.TEST2 | ||
|
||
// System | ||
const PATH = process.env.PATH | ||
|
||
// Expanded | ||
const NODE_ENV = process.env.NODE_ENV | ||
const BASIC = process.env.BASIC | ||
const BASIC_EXPAND = process.env.BASIC_EXPAND | ||
const MACHINE = process.env.MACHINE | ||
const MACHINE_EXPAND = process.env.MACHINE_EXPAND | ||
const UNDEFINED_EXPAND = process.env.UNDEFINED_EXPAND | ||
const ESCAPED_EXPAND = process.env.ESCAPED_EXPAND | ||
const MONGOLAB_DATABASE = process.env.MONGOLAB_DATABASE | ||
const MONGOLAB_USER = process.env.MONGOLAB_USER | ||
const MONGOLAB_PASSWORD = process.env.MONGOLAB_PASSWORD | ||
const MONGOLAB_DOMAIN = process.env.MONGOLAB_DOMAIN | ||
const MONGOLAB_PORT = process.env.MONGOLAB_PORT | ||
const MONGOLAB_URI = process.env.MONGOLAB_URI | ||
const MONGOLAB_USER_RECURSIVELY = process.env.MONGOLAB_USER_RECURSIVELY | ||
const MONGOLAB_URI_RECURSIVELY = process.env.MONGOLAB_URI_RECURSIVELY | ||
const WITHOUT_CURLY_BRACES_URI = process.env.WITHOUT_CURLY_BRACES_URI | ||
const WITHOUT_CURLY_BRACES_USER_RECURSIVELY = process.env.WITHOUT_CURLY_BRACES_USER_RECURSIVELY | ||
const WITHOUT_CURLY_BRACES_URI_RECURSIVELY = process.env.WITHOUT_CURLY_BRACES_URI_RECURSIVELY |
Oops, something went wrong.