Remove eval() call from the bundle (#6129)
parent
eca23e111f
commit
bb1fd59e00
|
@ -256,6 +256,10 @@ function Foo() {
|
|||
}
|
||||
```
|
||||
|
||||
### API: Prettier now works in Atom again ([#6129] by [@duailibe])
|
||||
|
||||
Atom has a security feature where code containing `eval` is not allowed to be run. One of Prettier's dependencies uses `eval` to prevent bundlers from including debug code. We've now made sure that this `eval` does not end up in the code we ship to npm, making Prettier play nice with Atom again.
|
||||
|
||||
[#5979]: https://github.com/prettier/prettier/pull/5979
|
||||
[#6086]: https://github.com/prettier/prettier/pull/6086
|
||||
[#6088]: https://github.com/prettier/prettier/pull/6088
|
||||
|
@ -265,6 +269,7 @@ function Foo() {
|
|||
[#6116]: https://github.com/prettier/prettier/pull/6116
|
||||
[#6119]: https://github.com/prettier/prettier/pull/6119
|
||||
[#6127]: https://github.com/prettier/prettier/pull/6127
|
||||
[#6129]: https://github.com/prettier/prettier/pull/6129
|
||||
[#6130]: https://github.com/prettier/prettier/pull/6130
|
||||
[@belochub]: https://github.com/belochub
|
||||
[@brainkim]: https://github.com/brainkim
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"@babel/code-frame": "7.0.0",
|
||||
"@babel/parser": "7.2.0",
|
||||
"@glimmer/syntax": "0.30.3",
|
||||
"@iarna/toml": "2.0.0",
|
||||
"@iarna/toml": "2.2.3",
|
||||
"@typescript-eslint/typescript-estree": "1.6.0",
|
||||
"angular-estree-parser": "1.1.5",
|
||||
"angular-html-parser": "1.2.0",
|
||||
|
|
|
@ -99,7 +99,7 @@ async function run(params) {
|
|||
await execa("rm", ["-rf", ".cache"]);
|
||||
}
|
||||
|
||||
const bundleCache = new Cache(".cache/", "v11");
|
||||
const bundleCache = new Cache(".cache/", "v12");
|
||||
await bundleCache.load();
|
||||
|
||||
console.log(chalk.inverse(" Building packages "));
|
||||
|
|
|
@ -109,7 +109,11 @@ const coreBundles = [
|
|||
input: "index.js",
|
||||
type: "core",
|
||||
target: "node",
|
||||
external: [path.resolve("src/common/third-party.js")]
|
||||
external: [path.resolve("src/common/third-party.js")],
|
||||
replace: {
|
||||
// from @iarna/toml/parse-string
|
||||
"eval(\"require('util').inspect\")": "require('util').inspect"
|
||||
}
|
||||
},
|
||||
{
|
||||
input: "src/doc/index.js",
|
||||
|
|
|
@ -634,9 +634,9 @@
|
|||
dependencies:
|
||||
"@glimmer/util" "^0.30.3"
|
||||
|
||||
"@iarna/toml@2.0.0":
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@iarna/toml/-/toml-2.0.0.tgz#7802115684397785b3b6dc8a3ba50e30d7a7422b"
|
||||
"@iarna/toml@2.2.3":
|
||||
version "2.2.3"
|
||||
resolved "https://registry.yarnpkg.com/@iarna/toml/-/toml-2.2.3.tgz#f060bf6eaafae4d56a7dac618980838b0696e2ab"
|
||||
|
||||
"@types/node@^10.11.7":
|
||||
version "10.12.0"
|
||||
|
|
Loading…
Reference in New Issue