Skip to content

Commit

Permalink
fix: adjust peer dep versions of OT packages (#159)
Browse files Browse the repository at this point in the history
* fix: adjust peer dep versions of OT packages

* use "-" range instead of <= >=

* test the samples can be installed without issue
  • Loading branch information
aabmass authored Aug 31, 2020
1 parent aa8a644 commit 2db3776
Show file tree
Hide file tree
Showing 12 changed files with 5,114 additions and 90 deletions.
29 changes: 24 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,25 @@ unit_tests: &unit_tests
- run:
name: Unit tests
command: npm run test
- run:
name: Verify package.json dependencies of samples
command: |
set +eo pipefail
for sample_dir in $(realpath samples/*); do
pushd $sample_dir
npm ci
# verify dependencies are met without warnings or errors. Ignore
# "extraneous" messages, they are because of the local install
npm ls |& grep -v "extraneous" | grep "ERR!"
if [ $? -eq 0 ]; then
>&2 echo "Found dependency errors in $sample_dir package.json"
exit 1
else
exit 0
fi
popd
done
- run:
name: report coverage
command: if [ "${CIRCLE_NODE_VERSION}" = "v12" ]; then npm run codecov; fi
Expand All @@ -43,27 +62,27 @@ jobs:
command: npm run lint
node8:
docker:
- image: node:8
- image: circleci/node:8
environment: *test_env
<<: *unit_tests
node10:
docker:
- image: node:10
- image: circleci/node:10
environment: *test_env
<<: *unit_tests
node12:
docker:
- image: node:12
- image: circleci/node:12
environment: *test_env
<<: *unit_tests
node13:
docker:
- image: node:13
- image: circleci/node:13
environment: *test_env
<<: *unit_tests
node14:
docker:
- image: node:14
- image: circleci/node:14
environment: *test_env
<<: *unit_tests

Expand Down
33 changes: 8 additions & 25 deletions packages/opentelemetry-cloud-monitoring-exporter/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 5 additions & 7 deletions packages/opentelemetry-cloud-monitoring-exporter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
},
"devDependencies": {
"@opentelemetry/api": "0.8.3",
"@opentelemetry/base": "0.7.0",
"@opentelemetry/core": "0.7.0",
"@opentelemetry/core": "0.8.0",
"@opentelemetry/metrics": "0.9.0",
"@opentelemetry/resources": "0.9.0",
"@types/mocha": "7.0.2",
Expand All @@ -61,10 +60,9 @@
"googleapis": "^46.0.0"
},
"peerDependencies": {
"@opentelemetry/api": "^0.8.3",
"@opentelemetry/base": "^0.7.0",
"@opentelemetry/core": "^0.7.0",
"@opentelemetry/metrics": "^0.9.0",
"@opentelemetry/resources": "^0.9.0"
"@opentelemetry/api": "0.8.3 - 0.10.x",
"@opentelemetry/core": "0.8.0 - 0.10.x",
"@opentelemetry/metrics": "0.9.0 - 0.10.x",
"@opentelemetry/resources": "0.9.0 - 0.10.x"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ import {
MetricRecord,
MetricDescriptor as OTMetricDescriptor,
} from '@opentelemetry/metrics';
import { ExportResult } from '@opentelemetry/base';
import { NoopLogger, VERSION } from '@opentelemetry/core';
import { ExportResult, NoopLogger, VERSION } from '@opentelemetry/core';
import { Logger } from '@opentelemetry/api';
import { ExporterOptions } from './external-types';
import { GoogleAuth, JWT } from 'google-auth-library';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ import * as assert from 'assert';
import * as nock from 'nock';
import * as sinon from 'sinon';
import { MetricExporter } from '../src';
import { ConsoleLogger, LogLevel } from '@opentelemetry/core';
import { ExportResult } from '@opentelemetry/base';
import { ConsoleLogger, ExportResult, LogLevel } from '@opentelemetry/core';
import { MeterProvider } from '@opentelemetry/metrics';
import { Labels } from '@opentelemetry/api';

Expand Down
66 changes: 35 additions & 31 deletions packages/opentelemetry-cloud-trace-exporter/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 7 additions & 10 deletions packages/opentelemetry-cloud-trace-exporter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@
"registry": "https://wombat-dressing-room.appspot.com"
},
"devDependencies": {
"@opentelemetry/api": "0.7.0",
"@opentelemetry/base": "0.7.0",
"@opentelemetry/core": "0.7.0",
"@opentelemetry/resources": "0.7.0",
"@opentelemetry/tracing": "0.7.0",
"@opentelemetry/api": "0.8.0",
"@opentelemetry/resources": "0.8.0",
"@opentelemetry/tracing": "0.8.0",
"@types/mocha": "7.0.2",
"@types/node": "12.12.51",
"@types/sinon": "9.0.4",
Expand All @@ -63,10 +61,9 @@
"grpc": "^1.24.3"
},
"peerDependencies": {
"@opentelemetry/api": "^0.7.0",
"@opentelemetry/base": "^0.7.0",
"@opentelemetry/core": "^0.7.0",
"@opentelemetry/resources": "^0.7.0",
"@opentelemetry/tracing": "^0.7.0"
"@opentelemetry/api": "0.8.0 - 0.10.x",
"@opentelemetry/core": "0.8.0 - 0.10.x",
"@opentelemetry/resources": "0.8.0 - 0.10.x",
"@opentelemetry/tracing": "0.8.0 - 0.10.x"
}
}
3 changes: 1 addition & 2 deletions packages/opentelemetry-cloud-trace-exporter/src/trace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import { ExportResult } from '@opentelemetry/base';
import { NoopLogger } from '@opentelemetry/core';
import { ExportResult, NoopLogger } from '@opentelemetry/core';
import { ReadableSpan, SpanExporter } from '@opentelemetry/tracing';
import { Logger } from '@opentelemetry/api';
import * as protoloader from '@grpc/proto-loader';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@

import * as types from '@opentelemetry/api';
import { TraceFlags } from '@opentelemetry/api';
import { ExportResult } from '@opentelemetry/base';
import { ConsoleLogger, LogLevel } from '@opentelemetry/core';
import { ConsoleLogger, ExportResult, LogLevel } from '@opentelemetry/core';
import { Resource } from '@opentelemetry/resources';
import { ReadableSpan } from '@opentelemetry/tracing';
import * as assert from 'assert';
Expand Down
2 changes: 2 additions & 0 deletions samples/trace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ This example shows how to use [@opentelemetry/node](https://github.com/open-tele
## Installation

```sh
$ # from root of repo, build all packages
$ npm install
$ # from this directory
$ npm install
```
Expand Down
Loading

0 comments on commit 2db3776

Please sign in to comment.