Skip to content

Commit

Permalink
feat(tame-metering)!: RESM to NESM
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Converts `@agoric/tame-metering` from emulated ESM with `node -r esm` to Node.js ESM proper.

Refs: #527
  • Loading branch information
kriskowal committed Jun 15, 2021
1 parent 7b6024d commit 705f930
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 14 deletions.
10 changes: 1 addition & 9 deletions packages/tame-metering/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
"name": "@agoric/tame-metering",
"version": "1.3.9",
"description": "tame-metering",
"parsers": {
"js": "mjs"
},
"type": "module",
"main": "src/index.js",
"scripts": {
"test": "ava",
Expand All @@ -13,9 +11,6 @@
"lint-check": "eslint '**/*.{js,jsx}'",
"build": "exit 0"
},
"dependencies": {
"esm": "agoric-labs/esm#Agoric-built"
},
"devDependencies": {
"ava": "^3.12.1"
},
Expand All @@ -41,9 +36,6 @@
"files": [
"test/**/test-*.js"
],
"require": [
"esm"
],
"timeout": "2m"
},
"eslintConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/tame-metering/src/index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { tameMetering, isTamed } from './tame';
export { tameMetering, isTamed } from './tame.js';
2 changes: 1 addition & 1 deletion packages/tame-metering/src/install-global-metering.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { tameMetering } from './tame';
import { tameMetering } from './tame.js';

export default tameMetering();
2 changes: 1 addition & 1 deletion packages/tame-metering/src/tame.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* global globalThis */
import * as c from './constants';
import * as c from './constants.js';

let replaceGlobalMeter;

Expand Down
2 changes: 1 addition & 1 deletion packages/tame-metering/test/test-istamed.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import { isTamed, tameMetering } from '../src/index';
import { isTamed, tameMetering } from '../src/index.js';

test('isTamed', t => {
t.is(isTamed(), false, 'isTamed() is false in a new untamed realm');
Expand Down
2 changes: 1 addition & 1 deletion packages/tame-metering/test/test-sanity.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '../src/install-global-metering';
import '../src/install-global-metering.js';
import test from 'ava';

test('symbol properties', t => {
Expand Down

0 comments on commit 705f930

Please sign in to comment.