Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(opentelemetry-api): update browser field #5063

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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
7 changes: 1 addition & 6 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@
"module": "build/esm/index.js",
"esnext": "build/esnext/index.js",
"types": "build/src/index.d.ts",
"browser": {
"./src/platform/index.ts": "./src/platform/browser/index.ts",
"./build/esm/platform/index.js": "./build/esm/platform/browser/index.js",
"./build/esnext/platform/index.js": "./build/esnext/platform/browser/index.js",
"./build/src/platform/index.js": "./build/src/platform/browser/index.js"
},
"exports": {
".": {
"module": "./build/esm/index.js",
Expand Down Expand Up @@ -77,6 +71,7 @@
"access": "public"
},
"devDependencies": {
"@opentelemetry/platform-common": "1.26.0",
"@types/mocha": "10.0.8",
"@types/node": "18.6.5",
"@types/sinon": "17.0.3",
Expand Down
4 changes: 2 additions & 2 deletions api/src/internal/global-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
* limitations under the License.
*/

import { MeterProvider } from '../metrics/MeterProvider';
import { _globalThis } from '@opentelemetry/platform-common';
import { ContextManager } from '../context/types';
import { DiagLogger } from '../diag/types';
import { _globalThis } from '../platform';
import { MeterProvider } from '../metrics/MeterProvider';
import { TextMapPropagator } from '../propagation/TextMapPropagator';
import type { TracerProvider } from '../trace/tracer_provider';
import { VERSION } from '../version';
Expand Down
38 changes: 0 additions & 38 deletions api/src/platform/browser/globalThis.ts

This file was deleted.

4 changes: 2 additions & 2 deletions api/test/common/internal/global.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
* limitations under the License.
*/

import { _globalThis } from '@opentelemetry/platform-common';
import * as assert from 'assert';
import { getGlobal } from '../../../src/internal/global-utils';
import { _globalThis } from '../../../src/platform';
import { NoopContextManager } from '../../../src/context/NoopContextManager';
import { DiagLogLevel } from '../../../src/diag/types';
import { getGlobal } from '../../../src/internal/global-utils';
import sinon = require('sinon');

const api1 = require('../../../src') as typeof import('../../../src');
Expand Down
6 changes: 5 additions & 1 deletion api/tsconfig.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@
"include": [
"src/**/*.ts"
],
"references": []
"references": [
{
"path": "../packages/platform-common"
}
]
}
6 changes: 5 additions & 1 deletion api/tsconfig.esnext.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@
"include": [
"src/**/*.ts"
],
"references": []
"references": [
{
"path": "../packages/platform-common"
}
]
}
6 changes: 5 additions & 1 deletion api/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,9 @@
"src/**/*.ts",
"test/**/*.ts"
],
"references": []
"references": [
{
"path": "../packages/platform-common"
}
]
}
7 changes: 1 addition & 6 deletions experimental/packages/api-events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@
"module": "build/esm/index.js",
"esnext": "build/esnext/index.js",
"types": "build/src/index.d.ts",
"browser": {
"./src/platform/index.ts": "./src/platform/browser/index.ts",
"./build/esm/platform/index.js": "./build/esm/platform/browser/index.js",
"./build/esnext/platform/index.js": "./build/esnext/platform/browser/index.js",
"./build/src/platform/index.js": "./build/src/platform/browser/index.js"
},
"repository": "open-telemetry/opentelemetry-js",
"scripts": {
"build": "npm run compile",
Expand Down Expand Up @@ -64,6 +58,7 @@
"@opentelemetry/api-logs": "0.53.0"
},
"devDependencies": {
"@opentelemetry/platform-common": "1.26.0",
"@types/mocha": "10.0.8",
"@types/node": "18.6.5",
"@types/webpack-env": "1.16.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

import { _globalThis } from '@opentelemetry/platform-common';
import { EventLoggerProvider } from '../types/EventLoggerProvider';
import { _globalThis } from '../platform';

export const GLOBAL_EVENTS_API_KEY = Symbol.for(
'io.opentelemetry.js.api.events'
Expand Down
17 changes: 0 additions & 17 deletions experimental/packages/api-events/src/platform/browser/index.ts

This file was deleted.

17 changes: 0 additions & 17 deletions experimental/packages/api-events/src/platform/index.ts

This file was deleted.

This file was deleted.

17 changes: 0 additions & 17 deletions experimental/packages/api-events/src/platform/node/index.ts

This file was deleted.

7 changes: 1 addition & 6 deletions experimental/packages/api-logs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@
"module": "build/esm/index.js",
"esnext": "build/esnext/index.js",
"types": "build/src/index.d.ts",
"browser": {
"./src/platform/index.ts": "./src/platform/browser/index.ts",
"./build/esm/platform/index.js": "./build/esm/platform/browser/index.js",
"./build/esnext/platform/index.js": "./build/esnext/platform/browser/index.js",
"./build/src/platform/index.js": "./build/src/platform/browser/index.js"
},
"repository": "open-telemetry/opentelemetry-js",
"scripts": {
"prepublishOnly": "npm run compile",
Expand Down Expand Up @@ -63,6 +57,7 @@
"@opentelemetry/api": "^1.3.0"
},
"devDependencies": {
"@opentelemetry/platform-common": "1.26.0",
"@types/mocha": "10.0.8",
"@types/node": "18.6.5",
"@types/webpack-env": "1.16.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

import { _globalThis } from '@opentelemetry/platform-common';
import { LoggerProvider } from '../types/LoggerProvider';
import { _globalThis } from '../platform';

export const GLOBAL_LOGS_API_KEY = Symbol.for('io.opentelemetry.js.api.logs');

Expand Down

This file was deleted.

17 changes: 0 additions & 17 deletions experimental/packages/api-logs/src/platform/browser/index.ts

This file was deleted.

17 changes: 0 additions & 17 deletions experimental/packages/api-logs/src/platform/index.ts

This file was deleted.

17 changes: 0 additions & 17 deletions experimental/packages/api-logs/src/platform/node/index.ts

This file was deleted.

19 changes: 14 additions & 5 deletions experimental/packages/exporter-logs-otlp-http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,19 @@
"module": "build/esm/index.js",
"esnext": "build/esnext/index.js",
"types": "build/src/index.d.ts",
"browser": {
"./src/platform/index.ts": "./src/platform/browser/index.ts",
"./build/esm/platform/index.js": "./build/esm/platform/browser/index.js",
"./build/esnext/platform/index.js": "./build/esnext/platform/browser/index.js",
"./build/src/platform/index.js": "./build/src/platform/browser/index.js"
"exports": {
".": {
"browser": {
"module": "./build/esm/platform/browser/index.js",
"esnext": "./build/esnext/platform/browser/index.js",
"types": "./build/src/platform/browser/index.d.ts",
"default": "./build/src/platform/browser/index.js"
},
"module": "./build/esm/index.js",
"esnext": "./build/esnext/index.js",
"types": "./build/src/index.d.ts",
"default": "./build/src/index.js"
}
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -70,6 +78,7 @@
],
"sideEffects": false,
"devDependencies": {
"@opentelemetry/platform-common": "1.26.0",
"@babel/core": "7.25.2",
"@babel/preset-env": "7.25.4",
"@opentelemetry/api": "1.9.0",
Expand Down
Loading