You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Rule: The semconv dep should *not* be pinned. Expect `^X.Y.Z`.
74
+
constpinnedVerRe=/^\d+\.\d+\.\d+$/;
75
+
if(depRange&&pinnedVerRe.exec(depRange)){
76
+
problem(`${wsDir}/package.json: package ${pj.name} pins "${SEMCONV}" in dependencies, but should not (see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#why-not-pin-the-version)`);
problem(`${wsDir}/package.json: package ${pj.name} pins "${SEMCONV}" in devDependencies, but should not (see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#why-not-pin-the-version)`);
79
+
}
80
+
81
+
// Rule: The incubating entry-point should not be used.
// Rule: If the semconv "incubating" entry-point is used, then the dep
85
-
// should be pinned. Otherwise it should not be pinned.
86
-
constpinnedVerRe=/^\d+\.\d+\.\d+$/;
87
-
constpins=Boolean(pinnedVerRe.exec(depRange));
88
-
if(usesIncubating){
89
-
if(!pins){
90
-
problem(`package ${pj.name} (in ${wsDir}) imports "${SEMCONV}/incubating" but does not *pin* the dependency: \`"${SEMCONV}": "${depRange}"\``);
91
-
numProbs+=1;
92
-
}
93
-
}else{
94
-
if(pins){
95
-
problem(`package ${pj.name} (in ${wsDir}) does not import "${SEMCONV}/incubating" but pins the dependency: \`"${SEMCONV}": "${depRange}"\` (it could use a caret-range)`);
96
-
numProbs+=1;
88
+
problem(`${srcFile}: uses the 'incubating' entry-point from '@opentelemetry/semantic-conventions', but should not (see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv)`)
0 commit comments