-
Notifications
You must be signed in to change notification settings - Fork 0
use latest @shiftcode dependencies + node 24 #79
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
Merged
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
d203b29
build: use latest @shiftcode dependencies
mumenthalers 4d039fa
build: use latest @shiftcode dependencies
mumenthalers 5c83272
build: use GitHub Token for publish
mumenthalers 4eeada0
build: simplify copy-version script
mumenthalers 253d87b
build(release): next version [skip_build]
actions-user c844d33
build: use prettier.config.js config file
mumenthalers 1dad298
build: update lint-staged simplify config and remove unused libs
mumenthalers c409c35
build: remove jest and use vitest
mumenthalers ab3d40b
build: allow peer dep pr7
mumenthalers 6f049b6
test: add test for svg registry service
mumenthalers eb01784
build(release): next version [skip_build]
actions-user 0fa209f
feat(logger): expose `withErrorHandlerFn` to add global error handler
mumenthalers be26d31
feat(logger): `withCustomLogTransport` feature function
mumenthalers 18732ef
refactor: remove own package import
mumenthalers 7906c4c
build(release): next version [skip_build]
actions-user 24a8b81
fix(components): change to correct peer dep
michaelwittwer 1c36866
build(release): next version [skip_build]
actions-user 48d10dc
fix(tooltip): add missing input alias for disabled property
mumenthalers e702b36
build(release): next version [skip_build]
actions-user e7cc7de
ci(main): update action versions and use specific tokens
mumenthalers a5bac7c
feat: use node.js v24
mumenthalers 50beb3a
docs(readme): specify runtime details
mumenthalers 7f70af9
feat: use latest @shiftcode dependencies
mumenthalers da5881f
feat: use latest @shiftcode dependencies
mumenthalers 047517a
feat: use latest @shiftcode dependencies
mumenthalers 61cad27
build(release): next version [skip_build]
actions-user ce88aa4
ci: update lerna configuration
mumenthalers 6ba528f
docs(readme): update lib version compatibility for Angular 21
mumenthalers f32f440
build(scripts): fix error message / log statements in copy-version.ts
mumenthalers dd5271c
build(scripts): fix tsconfig
mumenthalers f1a8f61
refactor(logger): rename `withErrorHandlerFn` to `withErrorHandler`
mumenthalers 863c2f2
docs(readme): fix formatting in target runtime section
mumenthalers 22dc2e4
docs(readme): add section on global error handler integration
mumenthalers b3a2312
build(release): next version [skip_build]
actions-user 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 was deleted.
Oops, something went wrong.
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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| npx lerna exec --concurrency 1 --stream lint-staged && npx lint-staged | ||
| npx lint-staged | ||
|
mumenthalers marked this conversation as resolved.
|
||
This file was deleted.
Oops, something went wrong.
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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| lts/jod | ||
| lts/krypton | ||
|
mumenthalers marked this conversation as resolved.
|
||
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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 |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {} |
File renamed without changes.
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 |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| /** | ||
| * @see https://github.com/lint-staged/lint-staged?tab=readme-ov-file#typescript | ||
| * @type { import('lint-staged').Configuration } | ||
| */ | ||
| const config = { | ||
| 'package.json': ['npx sort-package-json'], | ||
| '*': ['eslint --fix --cache', 'npx prettier --write --ignore-unknown'], | ||
| } | ||
|
|
||
| export default config |
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 |
|---|---|---|
| @@ -1,10 +1,11 @@ | ||
| { | ||
| "name": "@shiftcode/styleguide", | ||
| "version": "15.0.0-pr7.1", | ||
| "private": true, | ||
| "type": "module", | ||
| "scripts": { | ||
| "lint": "eslint --fix --cache ./src", | ||
| "lint:ci": "eslint ./src", | ||
| "lint:staged": "eslint --fix --cache" | ||
| }, | ||
| "version": "14.0.0" | ||
| } | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| /** | ||
| * @see https://commitlint.js.org/reference/configuration.html | ||
| * @type { import('@commitlint/types').UserConfig } | ||
| */ | ||
| const config = { | ||
| extends: ['@commitlint/config-angular'], | ||
| rules: { | ||
| 'header-max-length': [2, 'always', 100], | ||
| }, | ||
| } | ||
|
|
||
| export default config |
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 was deleted.
Oops, something went wrong.
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
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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 |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| /** | ||
| * @see https://github.com/lint-staged/lint-staged?tab=readme-ov-file#typescript | ||
| * @type { import('lint-staged').Configuration } | ||
| */ | ||
| const config = { | ||
| 'package.json': ['npx sort-package-json'], | ||
| '*': ['eslint --fix --cache', 'npx prettier --write --ignore-unknown'], | ||
| } | ||
|
|
||
| export default config |
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 |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| import { provideHttpClient } from '@angular/common/http' | ||
| import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing' | ||
| import { DOCUMENT } from '@angular/core' | ||
| import { TestBed } from '@angular/core/testing' | ||
| import { beforeEach, describe, expect, test } from 'vitest' | ||
|
|
||
| import { SvgRegistry } from './svg-registry.service' | ||
|
|
||
| const MOCK_SVG = '<svg xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="5"/></svg>' | ||
| const MOCK_SVG_URL = '/assets/icon.svg' | ||
|
|
||
| describe('SvgRegistry', () => { | ||
| let service: SvgRegistry | ||
| let httpMock: HttpTestingController | ||
|
|
||
| beforeEach(() => { | ||
| TestBed.configureTestingModule({ | ||
| providers: [provideHttpClient(), provideHttpClientTesting()], | ||
| }) | ||
| service = TestBed.inject(SvgRegistry) | ||
| httpMock = TestBed.inject(HttpTestingController) | ||
| }) | ||
|
|
||
| describe('createSvgElementFromString', () => { | ||
| test('creates an SVGElement with default attributes', () => { | ||
| const doc = TestBed.inject(DOCUMENT) | ||
| const svg = SvgRegistry.createSvgElementFromString(MOCK_SVG, doc) | ||
|
|
||
| expect(svg).toBeInstanceOf(SVGElement) | ||
| expect(svg.getAttribute('fit')).toBe('') | ||
| expect(svg.getAttribute('height')).toBe('100%') | ||
| expect(svg.getAttribute('width')).toBe('100%') | ||
| expect(svg.getAttribute('preserveAspectRatio')).toBe('xMidYMid meet') | ||
| expect(svg.getAttribute('focusable')).toBe('false') | ||
| }) | ||
|
|
||
| test('removes style tags from svg', () => { | ||
| const doc = TestBed.inject(DOCUMENT) | ||
| const svgWithStyle = '<svg><style>.cls { fill: red; }</style><circle cx="10" cy="10" r="5"/></svg>' | ||
| const svg = SvgRegistry.createSvgElementFromString(svgWithStyle, doc) | ||
|
|
||
| expect(svg.querySelectorAll('style').length).toBe(0) | ||
| expect(svg.querySelector('circle')).toBeTruthy() | ||
| }) | ||
|
|
||
| test('throws when no svg element found', () => { | ||
| const doc = TestBed.inject(DOCUMENT) | ||
| expect(() => SvgRegistry.createSvgElementFromString('<div>not svg</div>', doc)).toThrow('Could not find svg') | ||
| }) | ||
| }) | ||
|
|
||
| describe('getFromUrl', () => { | ||
| test('fetches svg from url and returns an SVGElement', async () => { | ||
| const promise = service.getFromUrl(MOCK_SVG_URL) | ||
| httpMock.expectOne(MOCK_SVG_URL).flush(MOCK_SVG) | ||
|
|
||
| const svg = await promise | ||
| expect(svg).toBeInstanceOf(SVGElement) | ||
| expect(svg.getAttribute('height')).toBe('100%') | ||
| httpMock.verify() | ||
| }) | ||
|
|
||
| test('caches the request and returns a clone on subsequent calls', async () => { | ||
| const promise1 = service.getFromUrl(MOCK_SVG_URL) | ||
| const promise2 = service.getFromUrl(MOCK_SVG_URL) | ||
| httpMock.expectOne(MOCK_SVG_URL).flush(MOCK_SVG) | ||
|
|
||
| const [svg1, svg2] = await Promise.all([promise1, promise2]) | ||
| expect(svg1).not.toBe(svg2) | ||
| expect(svg1.outerHTML).toBe(svg2.outerHTML) | ||
| httpMock.verify() | ||
| }) | ||
| }) | ||
| }) |
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 |
|---|---|---|
| @@ -1,10 +1,12 @@ | ||
| { | ||
| "extends": "./tsconfig.lib.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./", | ||
| "baseUrl": ".", | ||
| "paths": { | ||
| "@shiftcode/ngx-core": ["../core/src/public-api.ts"] | ||
| }, | ||
| "types": ["jest", "node"] | ||
| } | ||
| "types": ["node"] | ||
| }, | ||
| "include": ["**/*.ts"], | ||
| "exclude": [] | ||
| } |
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 |
|---|---|---|
| @@ -1,6 +1,9 @@ | ||
| { | ||
| "extends": "../../tsconfig.spec.json", | ||
| "compilerOptions": { | ||
| "types": ["jest", "node"] | ||
| "paths": { | ||
| "@shiftcode/ngx-core": ["../core/src/public-api.ts"] | ||
| }, | ||
| "types": ["node"] | ||
| } | ||
| } |
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.
Uh oh!
There was an error while loading. Please reload this page.