Skip to content

Commit

Permalink
publish latest
Browse files Browse the repository at this point in the history
  • Loading branch information
dmail committed Dec 30, 2024
1 parent dd12cfd commit 6f1acf7
Show file tree
Hide file tree
Showing 30 changed files with 385 additions and 349 deletions.
37 changes: 4 additions & 33 deletions dist/jsenv_core.js
Original file line number Diff line number Diff line change
Expand Up @@ -11482,39 +11482,10 @@ const jsenvPluginTranspilation = ({
};

const lookupPackageDirectory = (currentUrl) => {
if (currentUrl === "file:///") {
return null;
}
const packageJsonFileUrl = `${currentUrl}package.json`;
if (existsSync(new URL(packageJsonFileUrl))) {
return currentUrl;
}
return lookupPackageDirectory(getParentUrl$1(currentUrl));
};

const getParentUrl$1 = (url) => {
if (url.startsWith("file://")) {
// With node.js new URL('../', 'file:///C:/').href
// returns "file:///C:/" instead of "file:///"
const resource = url.slice("file://".length);
const slashLastIndex = resource.lastIndexOf("/");
if (slashLastIndex === -1) {
return url;
}
const lastCharIndex = resource.length - 1;
if (slashLastIndex === lastCharIndex) {
const slashBeforeLastIndex = resource.lastIndexOf(
"/",
slashLastIndex - 1,
);
if (slashBeforeLastIndex === -1) {
return url;
}
return `file://${resource.slice(0, slashBeforeLastIndex + 1)}`;
}
return `file://${resource.slice(0, slashLastIndex + 1)}`;
}
return new URL(url.endsWith("/") ? "../" : "./", url).href;
return findAncestorDirectoryUrl(currentUrl, (ancestorDirectoryUrl) => {
const potentialPackageJsonFileUrl = `${ancestorDirectoryUrl}package.json`;
return existsSync(new URL(potentialPackageJsonFileUrl));
});
};

const watchSourceFiles = (
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"@financial-times/polyfill-useragent-normaliser": "1.10.2",
"@jsenv/abort": "4.3.0",
"@jsenv/ast": "6.4.1",
"@jsenv/filesystem": "4.11.0",
"@jsenv/filesystem": "4.12.0",
"@jsenv/humanize": "1.2.8",
"@jsenv/importmap": "1.2.1",
"@jsenv/integrity": "0.0.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/independent/https-local/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jsenv/https-local",
"version": "3.2.14",
"version": "3.2.15",
"description": "A programmatic way to generate locally trusted certificates",
"license": "MIT",
"repository": {
Expand Down Expand Up @@ -40,7 +40,7 @@
"hosts:ensure-localhost-mappings": "node ./scripts/hosts/ensure_localhost_mappings.mjs"
},
"dependencies": {
"@jsenv/filesystem": "4.11.0",
"@jsenv/filesystem": "4.12.0",
"@jsenv/humanize": "1.2.8",
"@jsenv/urls": "2.5.4",
"command-exists": "1.2.9",
Expand Down
4 changes: 2 additions & 2 deletions packages/independent/md-up/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jsenv/md-up",
"version": "0.0.13",
"version": "0.0.14",
"license": "MIT",
"private": true,
"repository": {
Expand All @@ -24,7 +24,7 @@
"dependencies": {
"anchor-markdown-header": "0.7.0",
"marked": "15.0.3",
"@jsenv/filesystem": "4.11.0",
"@jsenv/filesystem": "4.12.0",
"@jsenv/urls": "2.5.4",
"@jsenv/ast": "6.4.1"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/independent/snapshot/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jsenv/snapshot",
"version": "2.11.24",
"version": "2.11.25",
"description": "Snapshot testing",
"license": "MIT",
"author": {
Expand Down Expand Up @@ -34,7 +34,7 @@
"@jsenv/ast": "6.4.1",
"@jsenv/exception": "1.1.3",
"@jsenv/humanize": "1.2.8",
"@jsenv/filesystem": "4.11.0",
"@jsenv/filesystem": "4.12.0",
"@jsenv/terminal-recorder": "1.4.23",
"@jsenv/urls": "2.5.4",
"@jsenv/utils": "2.1.2",
Expand Down
6 changes: 3 additions & 3 deletions packages/independent/workflow/file-size-impact/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jsenv/file-size-impact",
"version": "14.3.12",
"version": "14.3.13",
"description": "Add files size impact into pull requests",
"license": "MIT",
"repository": {
Expand Down Expand Up @@ -34,8 +34,8 @@
},
"dependencies": {
"@jsenv/dynamic-import-worker": "1.2.1",
"@jsenv/filesystem": "4.11.0",
"@jsenv/github-pull-request-impact": "1.8.12",
"@jsenv/filesystem": "4.12.0",
"@jsenv/github-pull-request-impact": "1.8.13",
"@jsenv/urls": "2.5.4",
"@jsenv/humanize": "1.2.8"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jsenv/github-pull-request-impact",
"version": "1.8.12",
"version": "1.8.13",
"description": "Report pull request impact on something",
"license": "MIT",
"repository": {
Expand All @@ -26,7 +26,7 @@
"/src/"
],
"dependencies": {
"@jsenv/filesystem": "4.11.0",
"@jsenv/filesystem": "4.12.0",
"@jsenv/humanize": "1.2.8"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jsenv/github-release-package",
"version": "1.6.12",
"version": "1.6.13",
"description": "Create github release when package version changes.",
"license": "MIT",
"repository": {
Expand All @@ -25,8 +25,8 @@
"/src/"
],
"dependencies": {
"@jsenv/filesystem": "4.11.0",
"@jsenv/filesystem": "4.12.0",
"@jsenv/humanize": "1.2.8",
"@jsenv/github-pull-request-impact": "1.8.12"
"@jsenv/github-pull-request-impact": "1.8.13"
}
}
6 changes: 3 additions & 3 deletions packages/independent/workflow/lighthouse-impact/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jsenv/lighthouse-impact",
"version": "4.2.13",
"version": "4.2.14",
"description": "Package description",
"license": "MIT",
"repository": {
Expand Down Expand Up @@ -31,8 +31,8 @@
"dependencies": {
"@jsenv/abort": "4.3.0",
"@jsenv/dynamic-import-worker": "1.2.1",
"@jsenv/filesystem": "4.11.0",
"@jsenv/github-pull-request-impact": "1.8.12",
"@jsenv/filesystem": "4.12.0",
"@jsenv/github-pull-request-impact": "1.8.13",
"@jsenv/humanize": "1.2.8",
"lighthouse": "12.2.2"
}
Expand Down
6 changes: 3 additions & 3 deletions packages/independent/workflow/monorepo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jsenv/monorepo",
"version": "0.2.3",
"version": "0.2.4",
"description": "Helpers to manage packages in a monorepo",
"license": "MIT",
"repository": {
Expand All @@ -27,8 +27,8 @@
],
"dependencies": {
"@jsenv/urls": "2.5.4",
"@jsenv/filesystem": "4.11.0",
"@jsenv/package-publish": "1.11.12",
"@jsenv/filesystem": "4.12.0",
"@jsenv/package-publish": "1.11.13",
"@jsenv/humanize": "1.2.8",
"semver": "7.6.3"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/independent/workflow/package-publish/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jsenv/package-publish",
"version": "1.11.12",
"version": "1.11.13",
"description": "Publish package to one or many registry.",
"license": "MIT",
"repository": {
Expand All @@ -26,7 +26,7 @@
"/src/"
],
"dependencies": {
"@jsenv/filesystem": "4.11.0",
"@jsenv/filesystem": "4.12.0",
"@jsenv/humanize": "1.2.8",
"semver": "7.6.3"
}
Expand Down
6 changes: 3 additions & 3 deletions packages/independent/workflow/performance-impact/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jsenv/performance-impact",
"version": "4.4.12",
"version": "4.4.13",
"description": "Report pull request impacts on performance metrics",
"license": "MIT",
"repository": {
Expand Down Expand Up @@ -30,8 +30,8 @@
},
"dependencies": {
"@jsenv/dynamic-import-worker": "1.2.1",
"@jsenv/filesystem": "4.11.0",
"@jsenv/github-pull-request-impact": "1.8.12",
"@jsenv/filesystem": "4.12.0",
"@jsenv/github-pull-request-impact": "1.8.13",
"@jsenv/humanize": "1.2.8"
}
}
2 changes: 1 addition & 1 deletion packages/related/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jsenv/cli",
"version": "0.2.26",
"version": "0.2.27",
"description": "Command Line Interface for jsenv",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/related/cli/template-node-package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@jsenv/assert": "4.4.2",
"@jsenv/core": "39.8.0",
"@jsenv/eslint-config-relax": "1.3.6",
"@jsenv/test": "3.5.31",
"@jsenv/test": "3.5.32",
"eslint": "9.16.0",
"prettier": "3.4.2"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/related/cli/template-web-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@jsenv/plugin-bundling": "2.7.20",
"@jsenv/plugin-minification": "1.5.12",
"@jsenv/eslint-config-relax": "1.3.6",
"@jsenv/test": "3.5.31",
"@jsenv/test": "3.5.32",
"eslint": "9.16.0",
"open": "10.1.0",
"@playwright/browser-chromium": "1.49.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/related/cli/template-web-preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@jsenv/plugin-bundling": "2.7.20",
"@jsenv/plugin-minification": "1.5.12",
"@jsenv/eslint-config-relax": "1.3.6",
"@jsenv/test": "3.5.31",
"@jsenv/test": "3.5.32",
"eslint": "9.16.0",
"open": "10.1.0",
"@playwright/browser-chromium": "1.49.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/related/cli/template-web-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
"@babel/plugin-transform-react-jsx": "7.25.9",
"@jsenv/assert": "4.4.2",
"@jsenv/core": "39.8.0",
"@jsenv/plugin-react": "1.5.51",
"@jsenv/plugin-react": "1.5.52",
"@jsenv/plugin-bundling": "2.7.20",
"@jsenv/plugin-minification": "1.5.12",
"@jsenv/eslint-config-relax": "1.3.6",
"@jsenv/test": "3.5.31",
"@jsenv/test": "3.5.32",
"eslint": "9.16.0",
"open": "10.1.0",
"@playwright/browser-chromium": "1.49.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/related/cli/template-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@jsenv/eslint-config-relax": "1.3.6",
"@jsenv/plugin-bundling": "2.7.20",
"@jsenv/plugin-minification": "1.5.12",
"@jsenv/test": "3.5.31",
"@jsenv/test": "3.5.32",
"eslint": "9.16.0",
"open": "10.1.0",
"@playwright/browser-chromium": "1.49.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/related/plugin-commonjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jsenv/plugin-commonjs",
"version": "2.9.4",
"version": "2.9.5",
"license": "MIT",
"repository": {
"type": "git",
Expand All @@ -21,7 +21,7 @@
"/src/"
],
"dependencies": {
"@jsenv/filesystem": "4.11.0",
"@jsenv/filesystem": "4.12.0",
"@jsenv/humanize": "1.2.8",
"@jsenv/url-meta": "8.5.2",
"@jsenv/urls": "2.5.4",
Expand Down
4 changes: 2 additions & 2 deletions packages/related/plugin-explorer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jsenv/plugin-explorer",
"version": "1.0.53",
"version": "1.0.54",
"license": "MIT",
"repository": {
"type": "git",
Expand All @@ -26,7 +26,7 @@
"/src/"
],
"dependencies": {
"@jsenv/filesystem": "4.11.0"
"@jsenv/filesystem": "4.12.0"
},
"scripts": {
"build": "node ./scripts/build.mjs",
Expand Down
4 changes: 2 additions & 2 deletions packages/related/plugin-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jsenv/plugin-react",
"version": "1.5.51",
"version": "1.5.52",
"license": "MIT",
"repository": {
"type": "git",
Expand All @@ -24,7 +24,7 @@
"@babel/plugin-transform-react-jsx": "7.25.9",
"@babel/plugin-transform-react-jsx-development": "7.25.9",
"@jsenv/ast": "6.4.1",
"@jsenv/plugin-commonjs": "2.9.4",
"@jsenv/plugin-commonjs": "2.9.5",
"@jsenv/sourcemap": "1.2.28",
"@jsenv/url-meta": "8.5.2",
"react-refresh": "0.16.0"
Expand Down
Loading

0 comments on commit 6f1acf7

Please sign in to comment.