Skip to content

Commit

Permalink
ci: ensure that all packages have manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
tpluscode committed Jun 25, 2024
1 parent c4bd4fc commit e58a5c8
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 4 deletions.
30 changes: 30 additions & 0 deletions .github/ensureManifests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { findWorkspaces } from 'find-workspaces'
import { existsSync } from 'node:fs'

let result = 0

for (const workspace of findWorkspaces()) {
if(workspace.package.private) {
continue
}

if (!(existsSync(workspace.location + '/manifest.ttl'))) {
console.log(`⚠️ ${workspace.package.name} - no manifest.ttl`)
continue
}

if(!workspace.package.files) {
console.log(`✅ ${workspace.package.name} - all files included in package`)
continue
}

if(workspace.package.files.includes('manifest.ttl')) {
console.log(`✅ ${workspace.package.name} - manifest.ttl file listed`)
continue
}

console.error(`❌ ${workspace.package.name} - manifest.ttl file not listed`)
result += 1
}

process.exit(result)
66 changes: 62 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"c8": "^7.6.0",
"chai": "^4.3.10",
"eslint-import-resolver-typescript": "^3.6.1",
"find-workspaces": "^0.3.1",
"husky": "^8.0.3",
"lint-staged": "^13.2.2",
"mocha": "^10.2.0",
Expand Down

0 comments on commit e58a5c8

Please sign in to comment.