Skip to content

Commit

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

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

* fix(changelog): add changelog entry.
  • Loading branch information
pichlermarc authored Mar 16, 2023
1 parent 9a37faf commit a96e429
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ 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(resources): change fs/promises import to be node 12 compatible [#3681](https://github.com/open-telemetry/opentelemetry-js/pull/3681) @pichlermarc

### :books: (Refine Doc)

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 a96e429

Please sign in to comment.