Skip to content

Commit

Permalink
drop missed /web/ case
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Oct 12, 2023
1 parent 1db0f36 commit fe427cc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions scripts/build-compat/entries.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import konan from 'konan';
import { modules } from '@core-js/compat/src/data.mjs';
import helpers from '@core-js/compat/helpers.js';
import { intersection, sortObjectByKey } from '@core-js/compat/helpers.js';

async function getModulesForEntryPoint(path, parent) {
const entry = new URL(path, parent);
Expand All @@ -17,7 +17,7 @@ async function getModulesForEntryPoint(path, parent) {
return getModulesForEntryPoint(dependency, entry);
}));

return helpers.intersection(result.flat(1), modules);
return intersection(result.flat(1), modules);
}

const entriesList = await glob([
Expand All @@ -29,10 +29,9 @@ const entriesList = await glob([
'packages/core-js/proposals/**/*.js',
'packages/core-js/stable/**/*.js',
'packages/core-js/stage/**/*.js',
'packages/core-js/web/**/*.js',
]);

const entriesMap = helpers.sortObjectByKey(Object.fromEntries(await Promise.all(entriesList.map(async file => {
const entriesMap = sortObjectByKey(Object.fromEntries(await Promise.all(entriesList.map(async file => {
// TODO: store entries without the package name in `core-js@4`
const entry = file.replace(/\.js$/, '').replace(/\/index$/, '');
return [entry.slice(9), await getModulesForEntryPoint(`../../${ entry }`, import.meta.url)];
Expand Down

0 comments on commit fe427cc

Please sign in to comment.