New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not add sourcemap markings for indentation #14506
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
let str = "Updated!"; | ||
let str = "Updated!"; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
console.log("Updated!"); | ||
console.log("Updated!"); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,29 +79,40 @@ const assertTest = function (stdout, stderr, opts, cwd) { | |
const expectStderr = opts.stderr.trim(); | ||
stderr = stderr.trim(); | ||
|
||
if (opts.stderr) { | ||
if (opts.stderrContains) { | ||
expect(stderr).toContain(expectStderr); | ||
} else { | ||
expect(stderr).toBe(expectStderr); | ||
try { | ||
if (opts.stderr) { | ||
if (opts.stderrContains) { | ||
expect(stderr).toContain(expectStderr); | ||
} else { | ||
expect(stderr).toBe(expectStderr); | ||
} | ||
} else if (stderr) { | ||
throw new Error("stderr:\n" + stderr); | ||
} | ||
} else if (stderr) { | ||
throw new Error("stderr:\n" + stderr); | ||
} catch (e) { | ||
if (!process.env.OVERWRITE) throw e; | ||
console.log(`Updated test file: ${opts.stderrPath}`); | ||
outputFileSync(opts.stderrPath, stderr + "\n"); | ||
} | ||
|
||
const expectStdout = opts.stdout.trim(); | ||
stdout = stdout.trim(); | ||
stdout = stdout.replace(/\\/g, "/"); | ||
|
||
if (opts.stdout) { | ||
if (opts.stdoutContains) { | ||
expect(stdout).toContain(expectStdout); | ||
} else { | ||
fs.writeFileSync(opts.stdoutPath, stdout + "\n"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was very annoying. |
||
expect(stdout).toBe(expectStdout); | ||
try { | ||
if (opts.stdout) { | ||
if (opts.stdoutContains) { | ||
expect(stdout).toContain(expectStdout); | ||
} else { | ||
expect(stdout).toBe(expectStdout); | ||
} | ||
} else if (stdout) { | ||
throw new Error("stdout:\n" + stdout); | ||
} | ||
} else if (stdout) { | ||
throw new Error("stdout:\n" + stdout); | ||
} catch (e) { | ||
if (!process.env.OVERWRITE) throw e; | ||
console.log(`Updated test file: ${opts.stdoutPath}`); | ||
outputFileSync(opts.stdoutPath, stdout + "\n"); | ||
} | ||
|
||
if (opts.outFiles) { | ||
|
@@ -127,7 +138,7 @@ const assertTest = function (stdout, stderr, opts, cwd) { | |
} | ||
const expectedLoc = path.join(opts.testLoc, "out-files", filename); | ||
console.log(`Updated test file: ${expectedLoc}`); | ||
fs.writeFileSync(expectedLoc, actualFiles[filename]); | ||
outputFileSync(expectedLoc, actualFiles[filename]); | ||
} | ||
}); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
{ | ||
"version": 3, | ||
"sources": ["source-maps/full/input.js"], | ||
"names": [ | ||
"arr", | ||
"map", | ||
"x" | ||
], | ||
"mappings": "AAAAA,GAAG,CAACC,GAAJ,CAAQ,UAAAC,CAAC;AAAA,SAAIA,CAAC,GAAGA,CAAR;AAAA,CAAT", | ||
"sourcesContent": ["arr.map(x => x * x);"] | ||
} | ||
"sources": [ | ||
"source-maps/full/input.js" | ||
], | ||
"sourcesContent": [ | ||
"arr.map(x => x * x);" | ||
], | ||
"mappings": "AAAAA,GAAG,CAACC,GAAJ,CAAQ,UAAAC,CAAC;EAAA,OAAIA,CAAC,GAAGA,CAAR;AAAA,CAAT" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The diff here: - AAAAA,GAAG,CAACC,GAAJ,CAAQ,UAAAC,CAAC;AAAA,SAAIA,CAAC,GAAGA,CAAR;AAAA,CAAT
+ AAAAA,GAAG,CAACC,GAAJ,CAAQ,UAAAC,CAAC;EAAA,OAAIA,CAAC,GAAGA,CAAR;AAAA,CAAT The changed |
||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
{ | ||
"version": 3, | ||
"sources": ["HelloWorld.vue"], | ||
"names": ["name", "data", "msg"], | ||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAsFA;AACAA,oBADA;;AAEAC;AACA;AACAC;AADA;AAGA;;AANA,C", | ||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAsFA;EACAA,kBADA;;EAEAC;IACA;MACAC;IADA;EAGA;;AANA,C", | ||
"names": [ | ||
"name", | ||
"data", | ||
"msg" | ||
], | ||
"sourceRoot": "src/components", | ||
"sources": [ | ||
"HelloWorld.vue" | ||
], | ||
"sourcesContent": [ | ||
"<template>\n <div class=\"hello\">\n <h1>{{ msg }}</h1>\n <h2>Essential Links</h2>\n <ul>\n <li>\n <a\n href=\"https://vuejs.org\"\n target=\"_blank\"\n >\n Core Docs\n </a>\n </li>\n <li>\n <a\n href=\"https://forum.vuejs.org\"\n target=\"_blank\"\n >\n Forum\n </a>\n </li>\n <li>\n <a\n href=\"https://chat.vuejs.org\"\n target=\"_blank\"\n >\n Community Chat\n </a>\n </li>\n <li>\n <a\n href=\"https://twitter.com/vuejs\"\n target=\"_blank\"\n >\n Twitter\n </a>\n </li>\n <br>\n <li>\n <a\n href=\"http://vuejs-templates.github.io/webpack/\"\n target=\"_blank\"\n >\n Docs for This Template\n </a>\n </li>\n </ul>\n <h2>Ecosystem</h2>\n <ul>\n <li>\n <a\n href=\"http://router.vuejs.org/\"\n target=\"_blank\"\n >\n vue-router\n </a>\n </li>\n <li>\n <a\n href=\"http://vuex.vuejs.org/\"\n target=\"_blank\"\n >\n vuex\n </a>\n </li>\n <li>\n <a\n href=\"http://vue-loader.vuejs.org/\"\n target=\"_blank\"\n >\n vue-loader\n </a>\n </li>\n <li>\n <a\n href=\"https://github.com/vuejs/awesome-vue\"\n target=\"_blank\"\n >\n awesome-vue\n </a>\n </li>\n </ul>\n </div>\n</template>\n\n<script>\nexport default {\n name: 'HelloWorld',\n data () {\n return {\n msg: 'Welcome to Your Vue.js App'\n }\n }\n}\n</script>\n\n<!-- Add \"scoped\" attribute to limit CSS to this component only -->\n<style scoped>\nh1, h2 {\n font-weight: normal;\n}\nul {\n list-style-type: none;\n padding: 0;\n}\nli {\n display: inline-block;\n margin: 0 10px;\n}\na {\n color: #42b983;\n}\n</style>\n" | ||
] | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm tired of manually updating fixtures, so I'm adding these in the places that can use it.