diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 12304f5c..544586d3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,6 +31,7 @@ jobs: - name: Install Playwright Browsers run: npx playwright install --with-deps + - run: yarn nx affected --target=verify-integrity --parallel --max-parallel=3 - run: yarn nx affected --target=type-check --parallel --max-parallel=3 - run: yarn nx affected --target=build --parallel --max-parallel=3 - run: yarn nx affected --target=build-storybook --parallel --max-parallel=3 diff --git a/change/fluentui-contrib-e0f9df68-b86b-4cc8-9fd2-a18226c70fdb.json b/change/fluentui-contrib-e0f9df68-b86b-4cc8-9fd2-a18226c70fdb.json deleted file mode 100644 index 5ae29aca..00000000 --- a/change/fluentui-contrib-e0f9df68-b86b-4cc8-9fd2-a18226c70fdb.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "none", - "comment": "chore: scaffold react-themeless-provider package", - "packageName": "fluentui-contrib", - "email": "seanmonahan@microsoft.com", - "dependentChangeType": "none" -} diff --git a/change/fluentui-contrib-e822b249-aa15-4cb7-979e-467b1a976aa2.json b/change/fluentui-contrib-e822b249-aa15-4cb7-979e-467b1a976aa2.json deleted file mode 100644 index 00b3379a..00000000 --- a/change/fluentui-contrib-e822b249-aa15-4cb7-979e-467b1a976aa2.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "minor", - "comment": "release: first minor version", - "packageName": "fluentui-contrib", - "email": "marcosvmmoura@gmail.com", - "dependentChangeType": "patch" -} diff --git a/package.json b/package.json index 80fcf8ba..1e3aa37d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "fluentui-contrib", "private": true, - "version": "0.1.0", + "version": "0.0.0", "license": "MIT", "scripts": { "build": "nx affected --target=build", diff --git a/project.json b/project.json index 5356aa51..4478ed32 100644 --- a/project.json +++ b/project.json @@ -9,6 +9,9 @@ "config": ".verdaccio/config.yml", "storage": "tmp/local-registry/storage" } + }, + "verify-integrity": { + "command": "node ./tools/scripts/verify-repo-integrity.mjs" } } } diff --git a/tools/scripts/verify-repo-integrity.mjs b/tools/scripts/verify-repo-integrity.mjs new file mode 100644 index 00000000..a8e13bd5 --- /dev/null +++ b/tools/scripts/verify-repo-integrity.mjs @@ -0,0 +1,42 @@ +// @ts-check + +import { fileURLToPath } from 'node:url'; +import { dirname, join } from 'node:path'; +import { readFileSync } from 'node:fs'; + +import chalk from 'chalk'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); + +main(); + +function main() { + /** + * @type {string[]} + */ + const log = []; + + log.push(verifyPackageJson()); + + log.forEach((message) => { + console.log(`- ✅ ${chalk.bold.green(message)}`); + }); +} + +function verifyPackageJson() { + /** @type {import('nx/src/utils/package-json').PackageJson} */ + const json = JSON.parse( + readFileSync(join(__dirname, '../../package.json'), 'utf-8') + ); + + if (json.private !== true) { + throw new Error('The package.json must have a private field set to true'); + } + + if (json.version !== '0.0.0') { + throw new Error('The package.json must have a version field set to 0.0.0'); + } + + return 'The package.json is valid.'; +}