Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit 5866c65

Browse files
author
Amir Blum
authored
build: add lerna (#46)
1 parent 838b9ca commit 5866c65

File tree

19 files changed

+472
-552
lines changed

19 files changed

+472
-552
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,16 @@ on:
77
jobs:
88
test:
99
runs-on: ubuntu-latest
10-
strategy:
11-
max-parallel: 5
12-
matrix:
13-
packageName: [plugin-kafkajs, plugin-typeorm, plugin-aws-sdk, plugin-sequelize]
1410
steps:
1511
- uses: actions/checkout@v2
1612

1713
- name: Install Dependencies
18-
run: yarn --cwd packages/${{ matrix.packageName }}
19-
20-
- name: Test
21-
run: yarn --cwd packages/${{ matrix.packageName }} test
14+
run: yarn
2215

2316
- name: Build
24-
run: yarn --cwd packages/${{ matrix.packageName }} build
17+
run: yarn build
18+
19+
- name: Test
20+
run: yarn test
2521

2622

lerna.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"packages": ["packages/*"],
3+
"version": "independent",
4+
"npmClient": "yarn",
5+
"useWorkspaces": true
6+
}

package.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "root",
3+
"private": true,
4+
"scripts": {
5+
"test": "lerna run test",
6+
"build": "lerna run build",
7+
"postinstall": "lerna bootstrap",
8+
"prettier": "prettier --config .prettierrc.yml --write \"**/*.{ts,tsx,js,jsx,json}\""
9+
},
10+
"devDependencies": {
11+
"husky": "^4.3.6",
12+
"lerna": "^3.22.1",
13+
"lint-staged": "^10.5.3",
14+
"prettier": "^2.2.1"
15+
},
16+
"workspaces": [
17+
"packages/*"
18+
],
19+
"husky": {
20+
"hooks": {
21+
"pre-push": "yarn test",
22+
"pre-commit": "lint-staged"
23+
}
24+
},
25+
"lint-staged": {
26+
"*.{ts,js,json}": [
27+
"prettier --write"
28+
]
29+
}
30+
}

packages/plugin-aws-sdk/package.json

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
"build": "tsc",
2525
"prepare": "yarn run build",
2626
"test": "jest",
27-
"watch": "tsc -w",
28-
"prettier": "prettier --config ../../.prettierrc.yml --write \"src/**/*.{ts,tsx,js,jsx,json}\""
27+
"watch": "tsc -w"
2928
},
3029
"bugs": {
3130
"url": "https://github.com/aspecto-io/opentelemetry-ext-js/issues"
@@ -37,10 +36,7 @@
3736
"@types/jest": "^26.0.15",
3837
"@types/shimmer": "^1.0.1",
3938
"aws-sdk": "^2.780.0",
40-
"husky": "^4.3.0",
4139
"jest": "^26.6.1",
42-
"lint-staged": "^10.5.0",
43-
"prettier": "2.1.2",
4440
"ts-jest": "^26.4.3",
4541
"typescript": "^4.0.5"
4642
},
@@ -62,16 +58,5 @@
6258
"**/test/**/*.spec.+(ts|tsx)"
6359
],
6460
"testEnvironment": "node"
65-
},
66-
"husky": {
67-
"hooks": {
68-
"pre-push": "yarn test",
69-
"pre-commit": "lint-staged"
70-
}
71-
},
72-
"lint-staged": {
73-
"*.{ts,js,json}": [
74-
"prettier --write"
75-
]
7661
}
7762
}

packages/plugin-aws-sdk/src/services/sqs.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
import { Tracer, SpanKind, Span, propagation, Logger, TextMapGetter, TextMapSetter, setActiveSpan, context } from '@opentelemetry/api';
1+
import {
2+
Tracer,
3+
SpanKind,
4+
Span,
5+
propagation,
6+
Logger,
7+
TextMapGetter,
8+
TextMapSetter,
9+
setActiveSpan,
10+
context,
11+
} from '@opentelemetry/api';
212
import { pubsubPropagation } from 'opentelemetry-propagation-utils';
313
import { RequestMetadata, ServiceExtension } from './ServiceExtension';
414
import * as AWS from 'aws-sdk';

0 commit comments

Comments
 (0)