Skip to content

Commit

Permalink
enhancement/issue 1317 import map generation refactor for exports and…
Browse files Browse the repository at this point in the history
… leveraging `import.meta.resolve` (#1326)
  • Loading branch information
thescientist13 authored Dec 2, 2024
1 parent db0e184 commit 3a6540d
Show file tree
Hide file tree
Showing 29 changed files with 5,034 additions and 1,369 deletions.
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
"lint:css": "stylelint \"./www/**/*.js\", \"./www/**/*.css\"",
"lint": "ls-lint && yarn lint:js && yarn lint:css"
},
"resolutions": {
"lit": "^3.1.0"
},
"devDependencies": {
"@babel/core": "^7.24.4",
"@babel/eslint-parser": "^7.24.1",
Expand Down
15 changes: 6 additions & 9 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"dependencies": {
"@rollup/plugin-commonjs": "^28.0.0",
"@rollup/plugin-node-resolve": "^15.0.0",
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-terser": "^0.4.4",
"acorn": "^8.14.0",
"acorn-walk": "^8.3.4",
Expand All @@ -57,21 +56,19 @@
"wc-compiler": "~0.15.1"
},
"devDependencies": {
"@babel/runtime": "^7.10.4",
"@lion/button": "^0.14.5",
"@lion/calendar": "^0.16.7",
"@mapbox/rehype-prism": "^0.5.0",
"@material/mwc-button": "^0.25.2",
"@stencil/core": "^2.12.0",
"@types/trusted-types": "^2.0.2",
"@shoelace-style/shoelace": "^2.18.0",
"@spectrum-css/card": "^9.3.0",
"@spectrum-web-components/action-menu": "^1.0.1",
"@uswds/web-components": "^0.0.1-alpha",
"geist": "^1.2.0",
"lit": "^3.1.0",
"lit-redux-router": "~0.20.0",
"lodash-es": "^4.17.20",
"postcss-nested": "^4.1.2",
"pwa-helpers": "^0.9.1",
"redux": "^4.0.5",
"redux-thunk": "^2.3.0",
"redux": "^5.0.1",
"redux-thunk": "^3.1.0",
"rehype-autolink-headings": "^4.0.0",
"rehype-slug": "^3.0.0",
"simpledotcss": "^1.0.0"
Expand Down
6 changes: 4 additions & 2 deletions packages/cli/src/lib/node-modules-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { createRequire } from 'module';
import { checkResourceExists } from './resource-utils.js';
import fs from 'fs/promises';

// TODO delete me and everything else in this file
// https://github.com/ProjectEvergreen/greenwood/issues/684
async function getNodeModulesLocationForPackage(packageName) {
let nodeModulesUrl;

Expand Down Expand Up @@ -42,7 +44,7 @@ function getPackageNameFromUrl(url) {
return packageName;
}

async function getPackageJson({ userWorkspace, projectDirectory }) {
async function getPackageJsonForProject({ userWorkspace, projectDirectory }) {
const monorepoPackageJsonUrl = new URL('./package.json', userWorkspace);
const topLevelPackageJsonUrl = new URL('./package.json', projectDirectory);
const hasMonorepoPackageJson = await checkResourceExists(monorepoPackageJsonUrl);
Expand All @@ -56,7 +58,7 @@ async function getPackageJson({ userWorkspace, projectDirectory }) {
}

export {
getPackageJsonForProject,
getNodeModulesLocationForPackage,
getPackageJson,
getPackageNameFromUrl
};
4 changes: 2 additions & 2 deletions packages/cli/src/lib/parsing-utils.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const acornOptions = {
const ACORN_OPTIONS = {
ecmaVersion: 'latest',
sourceType: 'module'
};

export {
acornOptions
ACORN_OPTIONS
};
Loading

0 comments on commit 3a6540d

Please sign in to comment.