jest-snapshot
Advanced tools
Comparing version 27.2.3 to 27.2.4
@@ -409,19 +409,16 @@ 'use strict'; | ||
// after the initial format because we don't know where the call expression | ||
// will be placed (specifically its indentation). | ||
// will be placed (specifically its indentation), so we have to do two | ||
// prettier.format calls back-to-back. | ||
let newSourceFile = prettier.format(sourceFileWithSnapshots, { | ||
...config, | ||
filepath: sourceFilePath | ||
}); | ||
if (newSourceFile !== sourceFileWithSnapshots) { | ||
// prettier moved things around, run it again to fix snapshot indentations. | ||
newSourceFile = prettier.format(newSourceFile, { | ||
return prettier.format( | ||
prettier.format(sourceFileWithSnapshots, { | ||
...config, | ||
filepath: sourceFilePath | ||
}), | ||
{ | ||
...config, | ||
filepath: sourceFilePath, | ||
parser: createFormattingParser(snapshotMatcherNames, inferredParser) | ||
}); | ||
} | ||
return newSourceFile; | ||
} | ||
); | ||
}; // This parser formats snapshots to the correct indentation. | ||
@@ -428,0 +425,0 @@ |
{ | ||
"name": "jest-snapshot", | ||
"version": "27.2.3", | ||
"version": "27.2.4", | ||
"repository": { | ||
@@ -23,4 +23,4 @@ "type": "git", | ||
"@babel/types": "^7.0.0", | ||
"@jest/transform": "^27.2.3", | ||
"@jest/types": "^27.2.3", | ||
"@jest/transform": "^27.2.4", | ||
"@jest/types": "^27.2.4", | ||
"@types/babel__traverse": "^7.0.4", | ||
@@ -30,13 +30,13 @@ "@types/prettier": "^2.1.5", | ||
"chalk": "^4.0.0", | ||
"expect": "^27.2.3", | ||
"expect": "^27.2.4", | ||
"graceful-fs": "^4.2.4", | ||
"jest-diff": "^27.2.3", | ||
"jest-diff": "^27.2.4", | ||
"jest-get-type": "^27.0.6", | ||
"jest-haste-map": "^27.2.3", | ||
"jest-matcher-utils": "^27.2.3", | ||
"jest-message-util": "^27.2.3", | ||
"jest-resolve": "^27.2.3", | ||
"jest-util": "^27.2.3", | ||
"jest-haste-map": "^27.2.4", | ||
"jest-matcher-utils": "^27.2.4", | ||
"jest-message-util": "^27.2.4", | ||
"jest-resolve": "^27.2.4", | ||
"jest-util": "^27.2.4", | ||
"natural-compare": "^1.4.0", | ||
"pretty-format": "^27.2.3", | ||
"pretty-format": "^27.2.4", | ||
"semver": "^7.3.2" | ||
@@ -47,3 +47,3 @@ }, | ||
"@babel/preset-react": "^7.7.2", | ||
"@jest/test-utils": "^27.2.3", | ||
"@jest/test-utils": "^27.2.4", | ||
"@types/graceful-fs": "^4.1.3", | ||
@@ -62,3 +62,3 @@ "@types/natural-compare": "^1.4.0", | ||
}, | ||
"gitHead": "ae53efe274dee5464d11f1b574d2d825685cd031" | ||
"gitHead": "5886f6c4d681aa9fc9bfc2517efd2b7f6035a4cd" | ||
} |
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
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
93228
2711
Updated@jest/transform@^27.2.4
Updated@jest/types@^27.2.4
Updatedexpect@^27.2.4
Updatedjest-diff@^27.2.4
Updatedjest-haste-map@^27.2.4
Updatedjest-matcher-utils@^27.2.4
Updatedjest-message-util@^27.2.4
Updatedjest-resolve@^27.2.4
Updatedjest-util@^27.2.4
Updatedpretty-format@^27.2.4