-
Notifications
You must be signed in to change notification settings - Fork 0
Teste #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jordyfontoura
wants to merge
14
commits into
dev
Choose a base branch
from
main
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Teste #9
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
5442fb5
chore: Bump version to 1.5.3 in package.json
jordyfontoura 0558ca1
refactor: Update type annotations in unwrap-error tests for improved β¦
jordyfontoura a8303e7
chore: Add Playwright browser installation step to CI workflow for enβ¦
jordyfontoura ab80fe7
chore: Update Playwright browser installation command in CI workflow β¦
jordyfontoura 55108b9
chore: Reorder test execution in CI workflow for improved clarity andβ¦
jordyfontoura 0c7d936
chore: Enhance CI/CD workflows with validation steps, multi-version tβ¦
jordyfontoura d73770a
chore: Remove Node.js version 18 from CI workflow matrix for streamliβ¦
jordyfontoura 3182f65
chore: Update keywords in package.json for improved clarity and relevβ¦
jordyfontoura 86e6fb7
chore: Bump version to 1.5.4 and enhance package metadata for improveβ¦
jordyfontoura 1e94241
chore: Bump version to 1.5.5 and migrate documentation examples to usβ¦
jordyfontoura 709f603
chore: Bump version to 1.5.6 and enhance `resultfy()` to support Promβ¦
jordyfontoura a89d686
chore: Simplify package.json exports structure for clearer module resβ¦
jordyfontoura 166e0fb
chore: Bump version to 1.5.7 and fix ESM module exports configurationβ¦
jordyfontoura 60164aa
chore: Bump version to 1.5.8 and fix ESM module compatibility by updaβ¦
jordyfontoura File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -16,6 +16,22 @@ jobs: | |
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Validate tag format | ||
| id: tag-info | ||
| run: | | ||
| TAG=${GITHUB_REF#refs/tags/} | ||
| echo "tag=$TAG" >> $GITHUB_OUTPUT | ||
|
|
||
| # Remove 'v' prefix for version comparison | ||
| VERSION=${TAG#v} | ||
| echo "version=$VERSION" >> $GITHUB_OUTPUT | ||
|
|
||
| # Validate semantic versioning format | ||
| if [[ ! $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?(\+[a-zA-Z0-9.]+)?$ ]]; then | ||
| echo "Error: Tag must follow semantic versioning (e.g., v1.0.0)" | ||
| exit 1 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| fi | ||
|
|
||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@v4 | ||
| with: | ||
|
|
@@ -31,18 +47,76 @@ jobs: | |
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Verify package.json version matches tag | ||
| run: | | ||
| PACKAGE_VERSION=$(node -p "require('./package/package.json').version") | ||
| TAG_VERSION="${{ steps.tag-info.outputs.version }}" | ||
|
|
||
| if [ "$PACKAGE_VERSION" != "$TAG_VERSION" ]; then | ||
| echo "Error: package.json version ($PACKAGE_VERSION) does not match tag version ($TAG_VERSION)" | ||
| exit 1 | ||
| fi | ||
| echo "β Version validation passed: $PACKAGE_VERSION" | ||
|
|
||
| - name: Verify CHANGELOG entry exists | ||
| run: | | ||
| TAG_VERSION="${{ steps.tag-info.outputs.version }}" | ||
|
|
||
| if ! grep -q "## \[$TAG_VERSION\]" CHANGELOG.md && ! grep -q "## $TAG_VERSION" CHANGELOG.md; then | ||
| echo "β οΈ Warning: No CHANGELOG entry found for version $TAG_VERSION" | ||
| echo "Please update CHANGELOG.md before publishing" | ||
| exit 1 | ||
| fi | ||
| echo "β CHANGELOG entry found for version $TAG_VERSION" | ||
|
|
||
| - name: Run linter | ||
| run: pnpm --filter tryless lint | ||
|
|
||
| - name: Run tests | ||
| run: pnpm --filter tryless test | ||
| - name: Check types | ||
| run: pnpm --filter tryless exec tsc --noEmit | ||
|
|
||
| - name: Get Playwright version | ||
| id: playwright-version | ||
| run: echo "version=$(pnpm --filter tryless list @playwright/test --depth=0 --json | jq -r '.[0].version')" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Cache Playwright browsers | ||
| uses: actions/cache@v4 | ||
| id: playwright-cache | ||
| with: | ||
| path: ~/.cache/ms-playwright | ||
| key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }} | ||
|
|
||
| - name: Install Playwright browsers | ||
| if: steps.playwright-cache.outputs.cache-hit != 'true' | ||
| run: pnpm --filter tryless exec playwright install --with-deps chromium | ||
|
|
||
| - name: Install Playwright system dependencies | ||
| if: steps.playwright-cache.outputs.cache-hit == 'true' | ||
| run: pnpm --filter tryless exec playwright install-deps chromium | ||
|
|
||
| - name: Build package | ||
| run: pnpm --filter tryless build | ||
|
|
||
| - name: Run tests | ||
| run: pnpm --filter tryless test | ||
|
|
||
| - name: Copy README to package | ||
| run: cp README.md package/README.md | ||
|
|
||
| - name: Verify package contents | ||
| working-directory: ./package | ||
| run: | | ||
| echo "π¦ Package contents:" | ||
| ls -la | ||
| echo "" | ||
| echo "π Dist files:" | ||
| ls -la dist/ | ||
| echo "" | ||
| if [ ! -f "README.md" ]; then | ||
| echo "Error: README.md not found in package directory" | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Publish to NPM | ||
| working-directory: ./package | ||
| run: npm publish --provenance --access public | ||
|
|
@@ -61,7 +135,7 @@ jobs: | |
| ## π¦ Installation | ||
|
|
||
| ```bash | ||
| npm install tryless@${{ github.ref_name }} | ||
| npm install tryless@${{ steps.tag-info.outputs.version }} | ||
| ``` | ||
|
|
||
| ## π Documentation | ||
|
|
||
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Playwright cache key uses wrong dependency
Medium Severity
The cache key reads
@playwright/testversion, butpackage/package.jsondepends onplaywrightinstead. This makessteps.playwright-version.outputs.versionresolve tonull, so the browser cache key is not tied to the actual Playwright runtime version.Additional Locations (1)
.github/workflows/publish.yml#L77-L80