-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/jpmorganchase/modular into …
…feature/v4
- Loading branch information
Showing
15 changed files
with
73 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'modular-scripts': patch | ||
--- | ||
|
||
Fix repository field generation on Windows |
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 @@ | ||
--- | ||
'modular-scripts': minor | ||
--- | ||
|
||
- Fix prefixed logger debug method logging as info | ||
- Copy LICENSE files when building packages |
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,10 @@ | ||
--- | ||
'modular-scripts': patch | ||
'modular-template-app': patch | ||
'modular-template-esm-view': patch | ||
'modular-template-node-env-app': patch | ||
'modular-template-package': patch | ||
'modular-template-view': patch | ||
--- | ||
|
||
Remove explicit package.json and license entry in files array |
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
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
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
35 changes: 35 additions & 0 deletions
35
packages/modular-scripts/src/build/buildPackage/maybeCopyRootLicense.ts
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,35 @@ | ||
import * as fs from 'fs-extra'; | ||
import * as path from 'path'; | ||
import globby from 'globby'; | ||
import getPrefixedLogger from '../../utils/getPrefixedLogger'; | ||
import getModularRoot from '../../utils/getModularRoot'; | ||
|
||
const licenseGlob = 'LICEN@(C|S)E*'; | ||
|
||
export async function maybeCopyRootLicense( | ||
target: string, | ||
targetOutputDirectory: string, | ||
) { | ||
const logger = getPrefixedLogger(target); | ||
const modularRoot = getModularRoot(); | ||
const matches = globby.sync(path.join(targetOutputDirectory, licenseGlob), { | ||
cwd: modularRoot, | ||
onlyFiles: true, | ||
}); | ||
if (matches.length === 0) { | ||
logger.debug( | ||
`No license found in ${targetOutputDirectory}. Looking for root license.`, | ||
); | ||
const rootLicenses = globby.sync(path.join(modularRoot, licenseGlob), { | ||
cwd: modularRoot, | ||
onlyFiles: true, | ||
}); | ||
if (rootLicenses.length > 0) { | ||
rootLicenses.forEach((license) => { | ||
const filename = path.basename(license); | ||
logger.log(`Copying ${filename} found in ${modularRoot}`); | ||
fs.copyFileSync(license, path.join(targetOutputDirectory, filename)); | ||
}); | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,6 @@ | |
}, | ||
"license": "Apache-2.0", | ||
"files": [ | ||
"README.md", | ||
"public", | ||
"src" | ||
] | ||
|
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 |
---|---|---|
|
@@ -10,7 +10,6 @@ | |
}, | ||
"license": "Apache-2.0", | ||
"files": [ | ||
"README.md", | ||
"src" | ||
] | ||
} |
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 |
---|---|---|
|
@@ -14,7 +14,6 @@ | |
}, | ||
"license": "Apache-2.0", | ||
"files": [ | ||
"README.md", | ||
"public", | ||
"src" | ||
] | ||
|
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 |
---|---|---|
|
@@ -11,7 +11,6 @@ | |
}, | ||
"license": "Apache-2.0", | ||
"files": [ | ||
"README.md", | ||
"src" | ||
] | ||
} |
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 |
---|---|---|
|
@@ -11,7 +11,6 @@ | |
"templateType": "view" | ||
}, | ||
"files": [ | ||
"README.md", | ||
"src" | ||
] | ||
} |