-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow specifying ci file in check-project (#1317)
Not all projects use js-test-and-release.yml as their main CI file so allow specifying something different.
- Loading branch information
1 parent
a994888
commit 4c3ab55
Showing
5 changed files
with
108 additions
and
27 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
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import mergeOptions from 'merge-options' | ||
import { semanticReleaseConfig } from '../semantic-release-config.js' | ||
import { | ||
sortFields, | ||
constructManifest | ||
} from '../utils.js' | ||
|
||
const merge = mergeOptions.bind({ ignoreUndefined: true }) | ||
|
||
/** | ||
* @param {any} manifest | ||
* @param {string} branchName | ||
* @param {string} repoUrl | ||
* @param {string} [homePage] | ||
*/ | ||
export async function untypedESMManifest (manifest, branchName, repoUrl, homePage = repoUrl) { | ||
let proposedManifest = constructManifest(manifest, { | ||
type: 'module', | ||
files: [ | ||
'src', | ||
'dist', | ||
'!dist/test', | ||
'!**/*.tsbuildinfo' | ||
], | ||
exports: { | ||
'.': { | ||
types: './dist/src/index.d.ts', | ||
import: './src/index.js' | ||
} | ||
}, | ||
eslintConfig: merge({ | ||
extends: 'ipfs', | ||
parserOptions: { | ||
sourceType: 'module' | ||
} | ||
}, manifest.eslintConfig), | ||
release: (manifest.scripts?.release?.includes('semantic-release') || manifest.scripts?.release?.includes('aegir release')) ? semanticReleaseConfig(branchName) : undefined | ||
}, repoUrl, homePage) | ||
|
||
const rest = { | ||
...sortFields(manifest) | ||
} | ||
|
||
for (const key of Object.keys(proposedManifest)) { | ||
delete rest[key] | ||
} | ||
|
||
proposedManifest = { | ||
...proposedManifest, | ||
...rest, | ||
contributors: undefined, | ||
leadMaintainer: undefined | ||
} | ||
|
||
return proposedManifest | ||
} |
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