Compare commits

...

3 Commits

Author SHA1 Message Date
github-actions[bot] 053e9fdbc0
chore(main): release open-telemetry-hook 0.2.1-alpha.6 (#57)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-07-15 12:52:31 -04:00
Todd Baert 43062b6ff7
fix: fix a thing (#56)
Signed-off-by: Todd Baert <toddbaert@gmail.com>
2022-07-15 12:50:40 -04:00
Todd Baert 4c41089b79
Add release-please (#55)
Signed-off-by: Todd Baert <toddbaert@gmail.com>
2022-07-15 12:46:25 -04:00
8 changed files with 114 additions and 16 deletions

40
.github/workflows/release-please.yml vendored Normal file
View File

@ -0,0 +1,40 @@
on:
push:
branches:
- main
name: Run Release Please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
token: ${{secrets.GITHUB_TOKEN}}
default-branch: main
# The logic below handles the npm publication:
- name: Checkout Repository
if: ${{ steps.release.outputs.releases_created }}
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v3
if: ${{ steps.release.outputs.releases_created }}
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
- name: Build Packages
if: ${{ steps.release.outputs.releases_created }}
run: |
npm install
npm run build
# Release Please has already incremented versions and published tags, so we just
# need to publish all unpublished versions to NPM here
# See: https://github.com/lerna/lerna/tree/main/commands/publish#bump-from-package
- name: Publish to NPM
if: ${{ steps.release.outputs.releases_created }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: npm run publish

View File

@ -0,0 +1,3 @@
{
"libs/hooks/open-telemetry": "0.2.1-alpha.6"
}

View File

@ -0,0 +1,8 @@
# Changelog
## [0.2.1-alpha.6](https://github.com/open-feature/node-sdk-contrib/compare/open-telemetry-hook-v0.2.0-alpha.6...open-telemetry-hook-v0.2.1-alpha.6) (2022-07-15)
### Bug Fixes
* fix a thing ([#56](https://github.com/open-feature/node-sdk-contrib/issues/56)) ([43062b6](https://github.com/open-feature/node-sdk-contrib/commit/43062b6ff7c95e40156c76b8112441b49c5f0a7f))

View File

@ -1,5 +1,18 @@
{
"name": "@openfeature/open-telemetry-hook",
"version": "0.0.1",
"type": "commonjs"
}
"version": "0.2.1-alpha.6",
"type": "commonjs",
"repository": {
"type": "git",
"url": "https://github.com/open-feature/node-sdk-contrib.git",
"directory": "libs/hooks/open-telemetry"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"publish-if-not-exists": "cp $NPM_CONFIG_USERCONFIG .npmrc && if [[ $(npm show $npm_package_name@$npm_package_version version) = $(npm run current-version -s) ]]; then echo 'already published, skipping'; else npm publish --access public; fi",
"current-version": "echo $npm_package_version"
},
"license": "Apache-2.0"
}

View File

@ -5,7 +5,9 @@
"targets": {
"package": {
"executor": "@nrwl/web:rollup",
"outputs": ["{options.outputPath}"],
"outputs": [
"{options.outputPath}"
],
"options": {
"project": "libs/hooks/open-telemetry/package.json",
"outputPath": "dist/libs/hooks/open-telemetry",
@ -13,8 +15,13 @@
"tsConfig": "libs/hooks/open-telemetry/tsconfig.lib.json",
"compiler": "babel",
"umdName": "OpenTelemetry",
"external": ["typescript"],
"format": ["cjs", "esm"],
"external": [
"typescript"
],
"format": [
"cjs",
"esm"
],
"assets": [
{
"glob": "LICENSE",
@ -31,18 +38,23 @@
},
"build": {
"executor": "@nrwl/js:tsc",
"outputs": ["{options.outputPath}"],
"outputs": [
"{options.outputPath}"
],
"options": {
"outputPath": "dist/libs/hooks/open-telemetry",
"main": "libs/hooks/open-telemetry/src/index.ts",
"tsConfig": "libs/hooks/open-telemetry/tsconfig.lib.json",
"assets": ["libs/hooks/open-telemetry/*.md"]
"assets": [
"libs/hooks/open-telemetry/*.md"
]
}
},
"publish": {
"executor": "@nrwl/workspace:run-commands",
"options": {
"command": "node tools/scripts/publish.mjs hooks-open-telemetry {args.ver} {args.tag}"
"command": "npm run publish-if-not-exists",
"cwd": "dist/libs/hooks/open-telemetry"
},
"dependsOn": [
{
@ -53,14 +65,20 @@
},
"lint": {
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"outputs": [
"{options.outputFile}"
],
"options": {
"lintFilePatterns": ["libs/hooks/open-telemetry/**/*.ts"]
"lintFilePatterns": [
"libs/hooks/open-telemetry/**/*.ts"
]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/hooks/open-telemetry"],
"outputs": [
"coverage/libs/hooks/open-telemetry"
],
"options": {
"jestConfig": "libs/hooks/open-telemetry/jest.config.ts",
"passWithNoTests": true
@ -68,4 +86,4 @@
}
},
"tags": []
}
}

View File

@ -20,6 +20,7 @@ export class OpenTelemetryHook implements Hook {
private tracer: Tracer;
constructor(name: string, version?: string) {
console.log('minor');
this.tracer = trace.getTracer(name, version);
}

View File

@ -1,11 +1,13 @@
{
"name": "node-sdk-contrib",
"version": "0.0.0",
"license": "MIT",
"license": "Apache-2.0",
"scripts": {
"generate-hook": "nx workspace-generator open-feature hook",
"generate-provider": "nx workspace-generator open-feature provider",
"test": "nx run-many --all --target=test"
"test": "nx run-many --all --target=test",
"build": "npx nx run-many --all --target=build",
"publish": "npx nx run-many --all --target=publish"
},
"private": true,
"dependencies": {
@ -37,4 +39,4 @@
"ts-node": "~10.8.0",
"typescript": "~4.7.2"
}
}
}

View File

@ -0,0 +1,13 @@
{
"bootstrap-sha": "8ec3eb4db55b7c2d6c2d7edc7c7f3c147b47fd35",
"packages": {
"libs/hooks/open-telemetry": {
"releaseType": "node",
"prerelease": true,
"bumpMinorPreMajor": false,
"bumpPatchForMinorPreMajor": false,
"changelogPath": "CHANGELOG.md",
"versioning": "default"
}
}
}