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

chore: release 1.0 proposal #92

Merged
merged 5 commits into from
Jun 10, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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+$/));
})
});