mirror of
https://github.com/actualbudget/actual.git
synced 2026-10-11 22:49:59 +00:00
+33
@@ -0,0 +1,33 @@
|
|||||||
|
const APPLIED_FIELDS = [
|
||||||
|
'type',
|
||||||
|
'main',
|
||||||
|
'browser',
|
||||||
|
'module',
|
||||||
|
'exports',
|
||||||
|
'imports',
|
||||||
|
'bin',
|
||||||
|
'types',
|
||||||
|
'typings',
|
||||||
|
];
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: 'strip-publish-config',
|
||||||
|
factory: () => ({
|
||||||
|
hooks: {
|
||||||
|
beforeWorkspacePacking(workspace, rawManifest) {
|
||||||
|
const publishConfig = rawManifest.publishConfig;
|
||||||
|
if (!publishConfig) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const field of APPLIED_FIELDS) {
|
||||||
|
delete publishConfig[field];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Object.keys(publishConfig).length === 0) {
|
||||||
|
delete rawManifest.publishConfig;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
};
|
||||||
@@ -16,3 +16,8 @@ enableScripts: false
|
|||||||
# days ago, giving the community time to catch compromised releases. Trusted
|
# days ago, giving the community time to catch compromised releases. Trusted
|
||||||
# packages that need immediate updates can be listed in npmPreapprovedPackages.
|
# packages that need immediate updates can be listed in npmPreapprovedPackages.
|
||||||
npmMinimalAgeGate: '3d'
|
npmMinimalAgeGate: '3d'
|
||||||
|
|
||||||
|
# yarn pack applies publishConfig overrides but leaves them in the packed
|
||||||
|
# manifest, which npm publish warns about. Strip the applied fields.
|
||||||
|
plugins:
|
||||||
|
- path: .yarn/plugins/strip-publish-config.cjs
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
category: Maintenance
|
||||||
|
authors: [matt-fidd]
|
||||||
|
---
|
||||||
|
|
||||||
|
Remove the npm warning about unknown `publishConfig` fields when publishing packages.
|
||||||
Reference in New Issue
Block a user