Skip to content

Commit

Permalink
Nit: uncontroversial parsers
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskowal committed Aug 24, 2020
1 parent b730feb commit 3985e72
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/endo/src/compartmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ const findPackage = async (readDescriptor, directory, name) => {
};

const languages = ["cjs", "mjs", "json"];
const incontroversialParsers = { cjs: "cjs", mjs: "mjs", json: "json" };
const commonParsers = { js: "cjs", ...incontroversialParsers };
const moduleParsers = { js: "mjs", ...incontroversialParsers };
const uncontroversialParsers = { cjs: "cjs", mjs: "mjs", json: "json" };
const commonParsers = { js: "cjs", ...uncontroversialParsers };
const moduleParsers = { js: "mjs", ...uncontroversialParsers };

const inferParsers = (descriptor, location) => {
const { type, parsers } = descriptor;
Expand All @@ -98,7 +98,7 @@ const inferParsers = (descriptor, location) => {
)} of package at ${location}, must be an object mapping file extensions to corresponding languages (mjs for ECMAScript modules, cjs for CommonJS modules, or json for JSON modules`
);
}
return { ...incontroversialParsers, ...parsers };
return { ...uncontroversialParsers, ...parsers };
}
if (type === "module") {
return moduleParsers;
Expand Down

0 comments on commit 3985e72

Please sign in to comment.