{"action":"created","issue":{"url":"https://api.github.com/repos/standard-things/esm/issues/498","repository_url":"https://api.github.com/repos/standard-things/esm","labels_url":"https://api.github.com/repos/standard-things/esm/issues/498/labels{/name}","comments_url":"https://api.github.com/repos/standard-things/esm/issues/498/comments","events_url":"https://api.github.com/repos/standard-things/esm/issues/498/events","html_url":"https://github.com/standard-things/esm/issues/498","id":339466108,"node_id":"MDU6SXNzdWUzMzk0NjYxMDg=","number":498,"title":"Issue upgrading to 3.0.57 - \"Must use import to load ES module\"","user":{"login":"chadxz","id":309219,"node_id":"MDQ6VXNlcjMwOTIxOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/309219?v=4","gravatar_id":"","url":"https://api.github.com/users/chadxz","html_url":"https://github.com/chadxz","followers_url":"https://api.github.com/users/chadxz/followers","following_url":"https://api.github.com/users/chadxz/following{/other_user}","gists_url":"https://api.github.com/users/chadxz/gists{/gist_id}","starred_url":"https://api.github.com/users/chadxz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chadxz/subscriptions","organizations_url":"https://api.github.com/users/chadxz/orgs","repos_url":"https://api.github.com/users/chadxz/repos","events_url":"https://api.github.com/users/chadxz/events{/privacy}","received_events_url":"https://api.github.com/users/chadxz/received_events","type":"User","site_admin":false},"labels":[{"id":613130610,"node_id":"MDU6TGFiZWw2MTMxMzA2MTA=","url":"https://api.github.com/repos/standard-things/esm/labels/question","name":"question","color":"d4c5f9","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-07-09T14:10:42Z","updated_at":"2018-07-10T08:35:20Z","closed_at":"2018-07-09T14:23:05Z","author_association":"NONE","body":"Hello! My issue kind of walks the line between bug report and support request. Sorry if it is the latter, I can take to Stackoverflow if so.\r\n\r\nI have been using esm with [chadxz/awry](https://github.com/chadxz/awry) and it's been working great for me. I use nyc and mocha for my tests, and have `--require esm` in my \"mocha.opts\" file. This configure has been working for me up to now.\r\n\r\nAfter upgrading to `esm@3.0.57`, I am now getting the following message when I try to run my tests.\r\n\r\n```\r\n/Users/cmcelligott/src/awry/node_modules/mocha/lib/mocha.js:1\r\nError [ERR_REQUIRE_ESM]: Must use import to load ES module: file:///Users/cmcelligott/src/awry/test/api/ApplicationsAPI.spec.mjs\r\n```\r\n\r\nIf i downgrade to `esm@3.0.56` it works fine. If I upgrade to anything past 3.0.56 it breaks.\r\n\r\nSteps to reproduce:\r\n1. `$ git clone https://github.com/chadxz/awry`\r\n2. `$ npm i`\r\n3. `$ mocha`"},"comment":{"url":"https://api.github.com/repos/standard-things/esm/issues/comments/403744591","html_url":"https://github.com/standard-things/esm/issues/498#issuecomment-403744591","issue_url":"https://api.github.com/repos/standard-things/esm/issues/498","id":403744591,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMzc0NDU5MQ==","user":{"login":"jdalton","id":4303,"node_id":"MDQ6VXNlcjQzMDM=","avatar_url":"https://avatars2.githubusercontent.com/u/4303?v=4","gravatar_id":"","url":"https://api.github.com/users/jdalton","html_url":"https://github.com/jdalton","followers_url":"https://api.github.com/users/jdalton/followers","following_url":"https://api.github.com/users/jdalton/following{/other_user}","gists_url":"https://api.github.com/users/jdalton/gists{/gist_id}","starred_url":"https://api.github.com/users/jdalton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdalton/subscriptions","organizations_url":"https://api.github.com/users/jdalton/orgs","repos_url":"https://api.github.com/users/jdalton/repos","events_url":"https://api.github.com/users/jdalton/events{/privacy}","received_events_url":"https://api.github.com/users/jdalton/received_events","type":"User","site_admin":false},"created_at":"2018-07-10T08:35:20Z","updated_at":"2018-07-10T08:35:20Z","author_association":"MEMBER","body":"Just to be clear the restriction is on `.mjs` side loaded with `require`. This means while your test files can be `.js` (and support ESM by way of `esm`) your package files can still be `.mjs` and imported file within the `.js` test files using ESM syntax."}}
{"actor":{"display_login":"jdalton"}}