From 25cf8a4f3fb97af933190e0557b281293a168816 Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Thu, 10 Jun 2021 11:41:36 -0400 Subject: [PATCH] chore: release 1.0 proposal (#92) --- CHANGELOG.md | 15 +++++++++++++++ README.md | 4 ++++ package.json | 2 +- src/internal/global-utils.ts | 2 +- src/version.ts | 2 +- test/internal/global.test.ts | 2 +- test/internal/version.test.ts | 30 ++++++++++++++++++++++++++++++ 7 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 test/internal/version.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 289b8b34..5e98b99a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,21 @@ All notable changes to this project will be documented in this file. +## 1.0.0 + +### :memo: Documentation + +* [#89](https://github.com/open-telemetry/opentelemetry-js-api/pull/89) chore: update upgrade guidelines ([@dyladan](https://github.com/dyladan)) + +### :house: Internal + +* [#90](https://github.com/open-telemetry/opentelemetry-js-api/pull/90) chore: enable typescript 4.3 noImplicitOverride option ([@Flarna](https://github.com/Flarna)) + +### Committers: 2 + +* Daniel Dyla ([@dyladan](https://github.com/dyladan)) +* Gerhard Stöbich ([@Flarna](https://github.com/Flarna)) + ## 0.21.0 ### :boom: Breaking Change diff --git a/README.md b/README.md index 115cffad..17539217 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,10 @@ Because the npm installer and node module resolution algorithm could potentially ## Upgrade Guidelines +### 0.21.0 to 1.0.0 + +No breaking changes + ### 0.20.0 to 0.21.0 - [#78](https://github.com/open-telemetry/opentelemetry-js-api/issues/78) `api.context.bind` arguments reversed and `context` is now a required argument. diff --git a/package.json b/package.json index 3880ebfd..853a4cf8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/api", - "version": "0.21.0", + "version": "1.0.0", "description": "Public API for OpenTelemetry", "main": "build/src/index.js", "module": "build/esm/index.js", diff --git a/src/internal/global-utils.ts b/src/internal/global-utils.ts index ec26adc7..de0b859e 100644 --- a/src/internal/global-utils.ts +++ b/src/internal/global-utils.ts @@ -25,7 +25,7 @@ import { isCompatible } from './semver'; const major = VERSION.split('.')[0]; const GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for( - `io.opentelemetry.js.api.${major}` + `opentelemetry.js.api.${major}` ); const _global = _globalThis as OTelGlobal; diff --git a/src/version.ts b/src/version.ts index fb47fc30..2d95159f 100644 --- a/src/version.ts +++ b/src/version.ts @@ -15,4 +15,4 @@ */ // this is autogenerated file, see scripts/version-update.js -export const VERSION = '0.21.0'; +export const VERSION = '1.0.0'; diff --git a/test/internal/global.test.ts b/test/internal/global.test.ts index 016dafe3..ba6218c7 100644 --- a/test/internal/global.test.ts +++ b/test/internal/global.test.ts @@ -31,7 +31,7 @@ const api2 = require('../../src') as typeof import('../../src'); // This will need to be changed manually on major version changes. // It is intentionally not autogenerated to ensure the author of the change is aware of what they are doing. -const GLOBAL_API_SYMBOL_KEY = 'io.opentelemetry.js.api.0'; +const GLOBAL_API_SYMBOL_KEY = 'opentelemetry.js.api.1'; const getMockLogger = () => ({ verbose: sinon.spy(), diff --git a/test/internal/version.test.ts b/test/internal/version.test.ts new file mode 100644 index 00000000..4d0e5f25 --- /dev/null +++ b/test/internal/version.test.ts @@ -0,0 +1,30 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as assert from 'assert'; +import { VERSION } from '../../src/version'; + +describe('version', () => { + it('should have generated VERSION.ts', () => { + const pjson = require('../../package.json'); + assert.strictEqual(pjson.version, VERSION); + }); + + it('prerelease tag versions are banned', () => { + // see https://github.com/open-telemetry/opentelemetry-js-api/issues/74 + assert.ok(VERSION.match(/^\d+\.\d+\.\d+$/)); + }); +});