Skip to content

Commit

Permalink
fix(resources): change fs/promises import to be node 12 compatible (o…
Browse files Browse the repository at this point in the history
…pen-telemetry#3681)

* fix(resources): change fs/promises import to be node 12 compatible

* fix(changelog): add changelog entry.
  • Loading branch information
pichlermarc authored and dyladan committed Mar 16, 2023
1 parent 6b5acf8 commit d44107d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ For experimental package changes, see the [experimental CHANGELOG](experimental/

### :bug: (Bug Fix)

* fix(resource): make properties for async resource resolution optional [#3677](/~https://github.com/open-telemetry/opentelemetry-js/pull/3677) @pichlermarc
* fix(resource): change fs/promises import to be node 12 compatible [#3681](/~https://github.com/open-telemetry/opentelemetry-js/pull/3681) @pichlermarc

### :books: (Refine Doc)

### :house: (Internal)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import * as fs from 'fs/promises';
import { promises as fs } from 'fs';
import { execAsync } from './execAsync';
import { diag } from '@opentelemetry/api';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as fs from 'fs/promises';
import { promises as fs } from 'fs';
import { diag } from '@opentelemetry/api';

export async function getMachineId(): Promise<string> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import * as sinon from 'sinon';
import * as assert from 'assert';
import * as fs from 'fs/promises';
import { promises as fs } from 'fs';
import { PromiseWithChild } from 'child_process';
import * as util from '../../../../src/platform/node/machine-id/execAsync';
import { getMachineId } from '../../../../src/platform/node/machine-id/getMachineId-bsd';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import * as sinon from 'sinon';
import * as assert from 'assert';
import * as fs from 'fs/promises';
import { promises as fs } from 'fs';

import { getMachineId } from '../../../../src/platform/node/machine-id/getMachineId-linux';

Expand Down

0 comments on commit d44107d

Please sign in to comment.