chore(core): enable provenance and update lerna usage (#16814)

This commit is contained in:
James Henry 2023-05-05 18:20:05 +01:00 committed by GitHub
parent d83184db0d
commit c9d649e57c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 569 additions and 1028 deletions

View File

@ -2,6 +2,7 @@ name: publish
env:
DEBUG: napi:*
NX_RUN_GROUP: ${{ github.run_id }}-${{ github.run_attempt }}
NPM_CONFIG_PROVENANCE: true
on:
release:
types: [published]
@ -203,6 +204,8 @@ jobs:
if: ${{ github.repository_owner == 'nrwl' }}
name: Publish
runs-on: ubuntu-latest
permissions:
id-token: write
needs:
# - build-freebsd
- build

View File

@ -142,19 +142,19 @@ nx test jest
To make sure your changes do not break any E2E tests, run:
```bash
nx e2e e2e-cli # or any other project here
nx e2e e2e-vite # or any other project here
```
Running E2E tests can take some time, so it is often useful to run a single test. To run a single suite of tests, run:
```bash
nx e2e e2e-cli -t versions # I often add qqqq to my test name so I can use -t qqqq
nx e2e e2e-vite -t versions # I often add qqqq to my test name so I can use -t qqqq
```
Sometimes tests pass locally but they fail on the CI. To reproduce the CI environment and be able to debug the issue, run:
```bash
NX_VERBOSE_LOGGING=true CI=true SELECTED_PM=pnpm pnpm nx e2e e2e-cli --t="should do something is this test"
NX_VERBOSE_LOGGING=true CI=true SELECTED_PM=pnpm pnpm nx e2e e2e-vite --t="should do something is this test"
```
The above command sets verbose logging (this exposes stack traces and underlying errors), sets the defaults to be CI-like and sets Pnpm as the selected package manager.

View File

@ -48,8 +48,6 @@
"@jest/reporters": "^29.4.1",
"@jest/test-result": "^29.4.1",
"@jest/types": "^29.4.1",
"@lerna/publish": "6.0.0",
"@lerna/version": "6.0.0",
"@monodon/rust": "1.1.2",
"@napi-rs/cli": "2.14.0",
"@nestjs/cli": "^9.0.0",
@ -194,7 +192,7 @@
"jsonc-eslint-parser": "^2.1.0",
"jsonc-parser": "3.2.0",
"kill-port": "^1.6.1",
"lerna": "6.0.0",
"lerna": "6.6.2",
"less": "4.1.3",
"less-loader": "11.1.0",
"license-webpack-plugin": "^4.0.2",

1580
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -7,8 +7,8 @@ import { join } from 'path';
import { parse } from 'semver';
import * as version from '@lerna/version';
import * as publish from '@lerna/publish';
const version = require('lerna/commands/version');
const publish = require('lerna/commands/publish');
const lernaJsonPath = join(__dirname, '../lerna.json');
const originalLernaJson = readFileSync(lernaJsonPath);