jest-snapshot
Advanced tools
Comparing version 29.0.3 to 29.1.0
@@ -221,3 +221,7 @@ 'use strict'; | ||
} else if (length >= 2) { | ||
if (typeof propertiesOrHint !== 'object' || propertiesOrHint === null) { | ||
if ( | ||
Array.isArray(propertiesOrHint) || | ||
typeof propertiesOrHint !== 'object' || | ||
propertiesOrHint === null | ||
) { | ||
const options = { | ||
@@ -298,2 +302,3 @@ isNot: this.isNot, | ||
if ( | ||
Array.isArray(propertiesOrSnapshot) || | ||
typeof propertiesOrSnapshot !== 'object' || | ||
@@ -300,0 +305,0 @@ propertiesOrSnapshot === null |
@@ -348,10 +348,12 @@ 'use strict'; | ||
}) | ||
: null; // Detect the parser for the test file. | ||
: null; // Prioritize parser found in the project config. | ||
// If not found detect the parser for the test file. | ||
// For older versions of Prettier, fallback to a simple parser detection. | ||
// @ts-expect-error - `inferredParser` is `string` | ||
const inferredParser = prettier.getFileInfo | ||
? prettier.getFileInfo.sync(sourceFilePath).inferredParser | ||
: (config && typeof config.parser === 'string' && config.parser) || | ||
simpleDetectParser(sourceFilePath); | ||
const inferredParser = | ||
(config && typeof config.parser === 'string' && config.parser) || | ||
(prettier.getFileInfo | ||
? prettier.getFileInfo.sync(sourceFilePath).inferredParser | ||
: simpleDetectParser(sourceFilePath)); | ||
@@ -358,0 +360,0 @@ if (!inferredParser) { |
{ | ||
"name": "jest-snapshot", | ||
"version": "29.0.3", | ||
"version": "29.1.0", | ||
"repository": { | ||
@@ -26,5 +26,5 @@ "type": "git", | ||
"@babel/types": "^7.3.3", | ||
"@jest/expect-utils": "^29.0.3", | ||
"@jest/transform": "^29.0.3", | ||
"@jest/types": "^29.0.3", | ||
"@jest/expect-utils": "^29.1.0", | ||
"@jest/transform": "^29.1.0", | ||
"@jest/types": "^29.1.0", | ||
"@types/babel__traverse": "^7.0.6", | ||
@@ -34,12 +34,12 @@ "@types/prettier": "^2.1.5", | ||
"chalk": "^4.0.0", | ||
"expect": "^29.0.3", | ||
"expect": "^29.1.0", | ||
"graceful-fs": "^4.2.9", | ||
"jest-diff": "^29.0.3", | ||
"jest-diff": "^29.1.0", | ||
"jest-get-type": "^29.0.0", | ||
"jest-haste-map": "^29.0.3", | ||
"jest-matcher-utils": "^29.0.3", | ||
"jest-message-util": "^29.0.3", | ||
"jest-util": "^29.0.3", | ||
"jest-haste-map": "^29.1.0", | ||
"jest-matcher-utils": "^29.1.0", | ||
"jest-message-util": "^29.1.0", | ||
"jest-util": "^29.1.0", | ||
"natural-compare": "^1.4.0", | ||
"pretty-format": "^29.0.3", | ||
"pretty-format": "^29.1.0", | ||
"semver": "^7.3.5" | ||
@@ -50,3 +50,3 @@ }, | ||
"@babel/preset-react": "^7.12.1", | ||
"@jest/test-utils": "^29.0.3", | ||
"@jest/test-utils": "^29.1.0", | ||
"@tsd/typescript": "~4.8.2", | ||
@@ -67,3 +67,3 @@ "@types/graceful-fs": "^4.1.3", | ||
}, | ||
"gitHead": "77f865da39af5b3e1c114dc347e49257eb3dcfd1" | ||
"gitHead": "51f10300daf90db003a1749ceaed1084c4f74811" | ||
} |
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
82833
2403
Updated@jest/expect-utils@^29.1.0
Updated@jest/transform@^29.1.0
Updated@jest/types@^29.1.0
Updatedexpect@^29.1.0
Updatedjest-diff@^29.1.0
Updatedjest-haste-map@^29.1.0
Updatedjest-matcher-utils@^29.1.0
Updatedjest-message-util@^29.1.0
Updatedjest-util@^29.1.0
Updatedpretty-format@^29.1.0