@vercel/static-config
Advanced tools
Comparing version 1.0.2-canary.0 to 2.0.0
@@ -32,15 +32,14 @@ "use strict"; | ||
.find(objectLiteral => { | ||
var _a; | ||
// Make sure the object is assigned to "config" | ||
const varDec = objectLiteral.getParentIfKind(ts_morph_1.SyntaxKind.VariableDeclaration); | ||
if ((varDec === null || varDec === void 0 ? void 0 : varDec.getName()) !== 'config') | ||
if (varDec?.getName() !== 'config') | ||
return false; | ||
// Make sure assigned with `const` | ||
const varDecList = varDec.getParentIfKind(ts_morph_1.SyntaxKind.VariableDeclarationList); | ||
const isConst = ((_a = varDecList === null || varDecList === void 0 ? void 0 : varDecList.getFlags()) !== null && _a !== void 0 ? _a : 0) & ts_morph_1.NodeFlags.Const; | ||
const isConst = (varDecList?.getFlags() ?? 0) & ts_morph_1.NodeFlags.Const; | ||
if (!isConst) | ||
return false; | ||
// Make sure it is exported | ||
const exp = varDecList === null || varDecList === void 0 ? void 0 : varDecList.getParentIfKind(ts_morph_1.SyntaxKind.VariableStatement); | ||
if (!(exp === null || exp === void 0 ? void 0 : exp.isExported())) | ||
const exp = varDecList?.getParentIfKind(ts_morph_1.SyntaxKind.VariableStatement); | ||
if (!exp?.isExported()) | ||
return false; | ||
@@ -47,0 +46,0 @@ return true; |
{ | ||
"name": "@vercel/static-config", | ||
"version": "1.0.2-canary.0", | ||
"version": "2.0.0", | ||
"license": "MIT", | ||
@@ -44,3 +44,3 @@ "main": "./dist/index", | ||
}, | ||
"gitHead": "00420b7a0124b0a0b622f031b1afd9a4e8bfffbd" | ||
"gitHead": "de0d2fba0b32588726a2799015eaff4e6bb65ffb" | ||
} |
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
27926
276