Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Commit

Permalink
chore: release 1.0 proposal (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
dyladan committed Jun 10, 2021
1 parent 3b246e0 commit 25cf8a4
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 4 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion 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",
Expand Down
2 changes: 1 addition & 1 deletion src/internal/global-utils.ts
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Expand Up @@ -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';
2 changes: 1 addition & 1 deletion test/internal/global.test.ts
Expand Up @@ -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(),
Expand Down
30 changes: 30 additions & 0 deletions 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+$/));
});
});

0 comments on commit 25cf8a4

Please sign in to comment.