Skip to content
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

Maintenance Release: preinstall fix and dependency update #4

Merged
merged 6 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/continuous-build-multi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ jobs:
build-lint-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Checkout
uses: actions/checkout@v4
- name: Setup environment
uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v3
- name: Install package
uses: pnpm/action-setup@v3
with:
version: 8
version: 9
- run: pnpm install --frozen-lockfile
- run: pnpm lint
- run: pnpm test
Expand Down
46 changes: 36 additions & 10 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Node.js Package
name: Create release and publish npm package

on:
push:
Expand All @@ -12,13 +12,19 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Checkout
uses: actions/checkout@v4

- name: Setup environment
uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v3

- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 8
version: 9

- run: pnpm install --frozen-lockfile
- run: pnpm lint
- run: pnpm test
Expand All @@ -28,16 +34,36 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Checkout
uses: actions/checkout@v4
- name: Setup environment
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
scope: "@quatico"
- uses: pnpm/action-setup@v3
- name: Install package
uses: pnpm/action-setup@v3
with:
version: 8
version: 9
- run: pnpm install --frozen-lockfile
- run: pnpm publish-npm

- name: Extract release notes
id: extract-release-notes
uses: ffurrer2/extract-release-notes@v2
with:
changelog_file: Release-Notes.md

- name: Create release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
body: ${{ steps.extract-release-notes.outputs.release_notes }}
env:
# The workflow permissions of the project must be updated to 'Workflows have read and write permissions in the repository for all scopes'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to npm
run: pnpm publish-npm
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Quatico Solutions Inc.
Copyright (c) 2024 Quatico Solutions Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
87 changes: 50 additions & 37 deletions Release-Notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,109 +4,122 @@
Licensed under the MIT License. See LICENSE in the project root for license information.
---------------------------------------------------------------------------------------------
-->
<!-- markdownlint-disable MD024 -->

# Releases

## v0.7.0
Release notes follow the [keep a changelog](https://keepachangelog.com/en/1.0.0/) format.

> in development
## [Unreleased]

### TBD
### Changed

- Feature :sparkles:: TBD
- Improvement :gift_heart:: TBD
- Bugfix :pill:: TBD

## v0.6.1
## [0.6.2] - 2024-05-29

> 2024-04-13
Bugfix release to address installation issues with preinstall scripts.

### Bugfix Release
### Fixed

- Bugfix :pill:: Fixes an issue where clients could not install the package with yarn or npm.

### Changed

- Upgrades all package dependencies to the latest versions

## [0.6.1] - 2024-04-13

Bugfix release to address installation issues with engine requirements.

### Fixed

- Bugfix :pill:: Fixes an issues where installing the package would fail due to unmet engine requirements.

## v0.6.0
## [0.6.0] - 2024-04-04

> 2024-04-04
Rendering of slotted content within slots.

### Rendering of slotted content
### Added

- Feature :sparkles:: Provides new options to render slotted content within slots.

## v0.5.2
## [0.5.2] - 2022-07-20

> 2022-07-20
Bugfix release to address rendering issues with sharp brackets.

### Bugfix Release
### Fixed

- Bugfix :pill:: Fixes the alignment of opening and closing sharp brackets for tags with multiple attributes.

## v0.5.1
## [0.5.1] - 2022-07-20

> 2022-07-20
Improved rendering options for shadow roots.

### Improved rendering options
### Added

- Feature :sparkles:: Introduce "shadowRoots" option to controls how shadow roots are rendered. Choose from HTML compliant "declarative" shadow roots (default), or "devtools" inspired options.
- Feature :sparkles:: Introduce "filterAttrs" option to filter attributes from the output. Name the attributes that should be ignored in the snapshot.
- Feature :sparkles:: Introduce "filterComments" option to remove HTML comments from the output. Defaults to true.

## v0.4.2
## [0.4.2] - 2022-05-12

> 2022-05-12
1st public release on GitHub.

### 1st public release
### Added

- Feature :sparkles:: Open-source release on GitHub.

## v0.3.1
## [0.3.1] - 2022-05-06

> 2022-05-06
Maintenance Release with dependency upgrades.

### Maintenance Release
### Changed

- Improvement :gift_heart:: Upgrade all project dependencies to the latest versions.
- Improvement :gift_heart:: Upgrade to node 16 and jest 27.
- Improvement :gift_heart:: Replace ts-lint with es-lint.

## v0.3.0
## [0.3.0] - 2021-03-19

> 2021-03-19
Snapshot Customization

### Snapshot Customization
### Added

- Feature :sparkles:: Customize the DOM serializer for Jest snapshots using with various render options

## v0.2.3
## [0.2.3] - 2021-03-05

> 2021-03-05
Bugfix release to address rendering issues with text nodes.

### Bugfix release
### Fixed

- Bugfix :pill:: Fixes an issue with duplicated text node rendering

## [0.2.2] - 2021-03-05

## v0.2.2

> 2021-03-05
Bugfix release to address rendering issues with void elements.

### Bugfix release
### Fixed

- Bugfix :pill:: Render void elements with self-closing tags

## v0.2.1
## [0.2.1] - 2021-03-05

> 2021-03-05
Maintenance release with improved serialization.

### Bugfix release
### Changed

- Feature :sparkles:: Improved serialization of void tags
- Improvement :gift_heart:: Custom element builder allows for more concise test setups

## v0.2.0
## [0.2.0] - 2021-01-08

> 2021-01-08
Initial release with Jest snapshot serializer.

### Initial release
### Added

- Feature :sparkles:: Snapshot serializer for Jest
- Feature :sparkles:: Function API `renderToString()` to render customize rendered DOM structure
3 changes: 2 additions & 1 deletion license-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"ignore": [
"**/*.!(ts|tsx|js|jsx|scss|spec.ts|test.ts|config.js|stories.js|stories.mdx|mdx|md)",
"**/__snapshots__",
"bin",
".git",
".idea",
"TODO.md",
Expand All @@ -43,4 +44,4 @@
"**/.gitkeep",
"**/.build"
]
}
}
15 changes: 7 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@quatico/dom-serializer",
"version": "0.6.1",
"version": "0.6.2",
"description": "A DOM serializer for web components",
"keywords": [
"shadow DOM",
Expand Down Expand Up @@ -37,31 +37,30 @@
"license:check": "license-check-and-add check -f license-config.json",
"license:add": "license-check-and-add add -f license-config.json",
"license:remove": "license-check-and-add remove -f license-config.json",
"preinstall": "npx only-allow pnpm",
Copy link
Member

@eins78 eins78 May 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, we should only added this for internal packages or mainly workspace roots, and never to published packages.

"prepublishOnly": "pnpm dist",
"publish-npm": "npm publish --access public"
},
"devDependencies": {
"@types/jest": "^29.5.12",
"@types/node": "20",
"@typescript-eslint/eslint-plugin": "^7.5.0",
"@typescript-eslint/parser": "^7.5.0",
"@types/node": "^20.12.12",
"@typescript-eslint/eslint-plugin": "^7.11.0",
"@typescript-eslint/parser": "^7.11.0",
"concurrently": "8.2.2",
"cross-env": "7.0.3",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-testing-library": "^6.2.0",
"eslint-plugin-testing-library": "^6.2.2",
"husky": "9.0.11",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"license-check-and-add": "4.0.5",
"lint-staged": "15.2.2",
"prettier": "3.2.5",
"rimraf": "5.0.5",
"ts-jest": "^29.1.2",
"typescript": "^5.4.3"
"ts-jest": "^29.1.4",
"typescript": "^5.4.5"
}
}
Loading