-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(shared-metrics): fixed package.json not being found when app is E…
…SM (#749) - there was another case for esm apps - you can either pass --experimental-loader={VAL} or --experimental-loader {VAL}
- Loading branch information
Showing
11 changed files
with
139 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
6 changes: 6 additions & 0 deletions
6
packages/shared-metrics/test/esm-loader/module-2/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "esm-loader-2", | ||
"version": "1.0.0", | ||
"description": "", | ||
"dependencies": {} | ||
} |
26 changes: 26 additions & 0 deletions
26
packages/shared-metrics/test/esm-loader/module-2/src/app.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* (c) Copyright IBM Corp. 2023 | ||
*/ | ||
|
||
'use strict'; | ||
|
||
import express from 'express'; | ||
|
||
const port = process.env.APP_PORT || 44004; | ||
const app = express(); | ||
const logPrefix = `EJS preload collector: (${process.pid}):\t`; | ||
|
||
app.get('/', (req, res) => { | ||
res.send('OK'); | ||
}); | ||
|
||
app.listen(port, () => { | ||
log(`Listening on port: ${port}`); | ||
}); | ||
|
||
function log() { | ||
const args = Array.prototype.slice.call(arguments); | ||
args[0] = `${logPrefix} (${process.pid}):\t${args[0]}`; | ||
// eslint-disable-next-line no-console | ||
console.log.apply(console, args); | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/shared-metrics/test/esm-loader/module-3/node_modules/my-app/package.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
packages/shared-metrics/test/esm-loader/module-3/node_modules/my-app/server.mjs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
packages/shared-metrics/test/esm-loader/module-3/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "esm-loader-3", | ||
"version": "1.0.0", | ||
"description": "", | ||
"dependencies": {} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* (c) Copyright IBM Corp. 2022 | ||
* (c) Copyright IBM Corp. 2023 | ||
*/ | ||
|
||
'use strict'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters