Skip to content

Commit ee50f6e

Browse files
feat(ref: no-ref): update ng 19
* fix(ref: no-ref): updage ng 19 * fix(ref: no-ref): update ng 19 * fix(ref: no-ref): update ng 19 * fix(ref: no-ref): add ngxtension
1 parent 60a7b7e commit ee50f6e

20 files changed

+101
-83
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/tmp
66
/out-tsc
77
/bazel-out
8-
8+
/cypress/screenshots
99
# Node
1010
/node_modules
1111
npm-debug.log

.stylelintignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/tmp
44
/out-tsc
55
/bazel-out
6-
/src/styles.scss
6+
77

88
# Node
99
/node_modules

.stylelintrc.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": ["stylelint-config-recommended-scss"],
33
"customSyntax": "postcss-scss",
4-
"plugins": ["stylelint-prettier"],
4+
"plugins": ["stylelint-scss", "stylelint-prettier"],
55
"rules": {
66
"no-empty-source": null,
77
"scss/comment-no-empty": null,
@@ -12,6 +12,12 @@
1212
{
1313
"ignoreTypes": ["/^mat-/", "markdown", ":host", ":root"]
1414
}
15+
],
16+
"scss/at-rule-no-unknown": [
17+
true,
18+
{
19+
"ignoreAtRules": ["tailwind"]
20+
}
1521
]
1622
}
1723
}

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 19.0.0(2024-11-21)
2+
3+
### Feature
4+
5+
- update ng 19.x
6+
17
# 18.0.4(2024-10-25)
28

39
### Feature

bun.lockb

47.6 KB
Binary file not shown.

eslint.config.js

+11-6
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,9 @@ module.exports = tseslint.config(
3838
extends: [
3939
// Apply the recommended core rules
4040
eslint.configs.recommended,
41-
// Apply the recommended TypeScript rules
42-
...tseslint.configs.recommended,
43-
// Optionally apply stylistic rules from typescript-eslint that improve code consistency
44-
...tseslint.configs.stylistic,
45-
// Apply the recommended Angular rules
41+
...tseslint.configs.recommendedTypeChecked,
42+
...tseslint.configs.strictTypeChecked,
43+
...tseslint.configs.stylisticTypeChecked,
4644
...angular.configs.tsRecommended,
4745
],
4846
// Set the custom processor which will allow us to have our inline Component templates extracted
@@ -105,7 +103,6 @@ module.exports = tseslint.config(
105103
'no-unused-private-class-members': 'error',
106104
'no-invalid-regexp': 'error',
107105
curly: ['error', 'all'],
108-
'@typescript-eslint/restrict-template-expressions': 'error',
109106
'@typescript-eslint/no-explicit-any': 'off',
110107
'@typescript-eslint/adjacent-overload-signatures': 'error',
111108
'no-console': ['warn'],
@@ -158,6 +155,14 @@ module.exports = tseslint.config(
158155
'@typescript-eslint/unbound-method': 'off',
159156
'import/no-cycle': 'off',
160157
'import/extensions': 'off',
158+
'@typescript-eslint/no-unsafe-call': 'off',
159+
'@typescript-eslint/restrict-template-expressions': [
160+
'error',
161+
{
162+
allowNullish: true,
163+
allowNumber: true,
164+
},
165+
],
161166
},
162167
},
163168
{

package.json

+38-34
Original file line numberDiff line numberDiff line change
@@ -49,61 +49,65 @@
4949
"url": "https://github.com/JsDaddy/ngx-copypaste.git"
5050
},
5151
"dependencies": {
52-
"@angular/animations": "18.2.9",
53-
"@angular/common": "18.2.9",
54-
"@angular/compiler": "18.2.9",
55-
"@angular/core": "18.2.9",
56-
"@angular/forms": "18.2.9",
57-
"@angular/platform-browser": "18.2.9",
58-
"@angular/platform-browser-dynamic": "18.2.9",
59-
"@angular/router": "^18.2.9",
52+
"@angular/animations": "19.0.0",
53+
"@angular/common": "19.0.0",
54+
"@angular/compiler": "19.0.0",
55+
"@angular/core": "19.0.0",
56+
"@angular/forms": "19.0.0",
57+
"@angular/platform-browser": "19.0.0",
58+
"@angular/platform-browser-dynamic": "19.0.0",
59+
"@angular/router": "^19.0.0",
6060
"highlight.js": "^11.10.0",
6161
"ngx-highlightjs": "^12.0.0",
62+
"ngxtension": "^4.1.0",
6263
"rxjs": "7.8.1",
63-
"snyk": "^1.1294.0"
64+
"snyk": "^1.1294.1"
6465
},
6566
"devDependencies": {
66-
"@angular-devkit/build-angular": "18.2.10",
67-
"@angular-eslint/builder": "18.4.0",
68-
"@angular-eslint/eslint-plugin": "18.4.0",
69-
"@angular-eslint/eslint-plugin-template": "18.4.0",
70-
"@angular-eslint/schematics": "18.4.0",
71-
"@angular-eslint/template-parser": "18.4.0",
72-
"@angular/cli": "18.2.10",
73-
"@angular/compiler-cli": "18.2.9",
74-
"@angular/language-service": "18.2.9",
75-
"@commitlint/cli": "19.5.0",
76-
"@commitlint/config-conventional": "19.5.0",
67+
"@angular-devkit/build-angular": "19.0.0",
68+
"@angular-eslint/builder": "18.4.1",
69+
"@angular-eslint/eslint-plugin": "18.4.1",
70+
"@angular-eslint/eslint-plugin-template": "18.4.1",
71+
"@angular-eslint/schematics": "18.4.1",
72+
"@angular-eslint/template-parser": "18.4.1",
73+
"@angular/cli": "19.0.0",
74+
"@angular/compiler-cli": "19.0.0",
75+
"@angular/language-service": "19.0.0",
76+
"@commitlint/cli": "19.6.0",
77+
"@commitlint/config-conventional": "19.6.0",
7778
"@types/jasmine": "~5.1.4",
78-
"@types/node": "22.7.9",
79-
"@typescript-eslint/eslint-plugin": "^8.11.0",
79+
"@types/node": "22.9.1",
80+
"@typescript-eslint/eslint-plugin": "^8.15.0",
8081
"@web/test-runner": "^0.19.0",
81-
"angular-eslint": "^18.4.0",
82-
"cypress": "^13.15.1",
83-
"eslint": "9.13.0",
82+
"angular-eslint": "^18.4.1",
83+
"cypress": "^13.16.0",
84+
"eslint": "9.15.0",
8485
"eslint-config-prettier": "9.1.0",
8586
"eslint-plugin-import": "2.31.0",
8687
"eslint-plugin-json": "4.0.1",
8788
"eslint-plugin-prettier": "5.2.1",
8889
"jasmine-core": "5.4.0",
8990
"jasmine-spec-reporter": "7.0.0",
9091
"lint-staged": "15.2.10",
91-
"ng-packagr": "18.2.1",
92-
"npm-check-updates": "^17.1.6",
93-
"postcss-scss": "4.0.9",
92+
"ng-packagr": "19.0.0",
93+
"npm-check-updates": "^17.1.11",
9494
"prettier": "3.3.3",
95-
"puppeteer": "^23.6.0",
96-
"semantic-release": "24.1.3",
95+
"puppeteer": "^23.9.0",
96+
"semantic-release": "24.2.0",
9797
"semantic-release-export-data": "^1.1.0",
9898
"stylelint": "16.10.0",
9999
"stylelint-config-prettier": "9.0.5",
100100
"stylelint-config-recommended-scss": "14.1.0",
101101
"stylelint-prettier": "5.0.2",
102102
"type-coverage": "^2.29.7",
103-
"typescript": "5.4.5",
104-
"typescript-eslint": "^8.11.0",
105-
"tailwindcss": "^3.4.14",
106-
"bun-types": "^1.1.33"
103+
"typescript": "5.6.3",
104+
"typescript-eslint": "^8.15.0",
105+
"tailwindcss": "^3.4.15",
106+
"bun-types": "^1.1.36",
107+
"postcss": "8.4.49",
108+
"postcss-nesting": "13.0.1",
109+
"cssnano": "7.0.6",
110+
"postcss-scss": "4.0.9"
107111
},
108112
"typeCoverage": {
109113
"atLeast": 92,

postcss.config.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
plugins: {
3+
'postcss-nesting': {},
4+
tailwindcss: {},
5+
autoprefixer: {},
6+
cssnano: { preset: 'default' },
7+
},
8+
};

projects/ngx-copypaste-lib/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-copypaste",
3-
"version": "18.0.2",
3+
"version": "19.0.0",
44
"license": "MIT",
55
"keywords": [
66
"ng2-copypaste",
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
describe('NgxCopyPasteDirective', () => {
22
it('should create an instance', () => {
3-
expect(1).toEqual(1);
3+
void expect(1).toEqual(1);
44
});
55
});

projects/ngx-copypaste-lib/src/lib/ngx-copypaste.directive.ts

+7-5
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,30 @@ export class NgxCopyPasteDirective {
1515
if (select) {
1616
select.removeAllRanges();
1717
}
18-
const element: HTMLElement = this._elementRef.nativeElement;
18+
const element = this._elementRef.nativeElement as HTMLElement;
1919
if (element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement) {
20-
this._elementRef.nativeElement.select();
20+
element.select();
2121
} else {
2222
const range: Range = document.createRange();
23-
range.selectNodeContents(this._elementRef.nativeElement);
23+
range.selectNodeContents(element);
2424
select = window.getSelection();
2525
if (select) {
2626
select.addRange(range);
2727
}
2828
}
2929
this.successCb.emit();
30+
// eslint-disable-next-line @typescript-eslint/no-deprecated
3031
document.execCommand('copy');
3132
}
3233

3334
public async copy(): Promise<void> {
35+
this.copyWithSelection();
3436
try {
35-
if (!navigator.clipboard) {
37+
if (typeof navigator.clipboard === 'undefined') {
3638
this.copyWithSelection();
3739
return;
3840
}
39-
const element: HTMLElement = this._elementRef.nativeElement;
41+
const element = this._elementRef.nativeElement as HTMLElement;
4042
const value =
4143
element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement
4244
? element.value

projects/ngx-copypaste-lib/src/test/copy.cy-spec.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
import { CypressTestMaskModule } from './utils/cypress-test.module';
21
import { CypressTestMaskComponent } from './utils/cypress-test.component';
32

43
describe('Test Date Hh:m0', () => {
54
it('should return value from ctrl+V', () => {
6-
cy.mount(CypressTestMaskComponent, {
7-
imports: [CypressTestMaskModule],
8-
});
5+
cy.mount(CypressTestMaskComponent);
96

107
cy.get('#masked').type('testing').should('have.value', 'testing');
118
cy.get('#btn').click();

projects/ngx-copypaste-lib/src/test/utils/cypress-test.component.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
import { Component } from '@angular/core';
2-
import { FormControl } from '@angular/forms';
2+
import { FormControl, ReactiveFormsModule } from '@angular/forms';
3+
import { NgxCopyPasteDirective } from 'ngx-copypaste';
34

45
@Component({
56
selector: 'jsdaddy-open-source-test',
7+
standalone: true,
8+
imports: [ReactiveFormsModule, NgxCopyPasteDirective],
69
template: `
710
<input id="masked" ngxCopyPaste #cv="copy" (successCb)="copy()" [formControl]="form" />
811
<button (click)="cv.copy()" id="btn">Copy</button>

projects/ngx-copypaste-lib/src/test/utils/cypress-test.module.ts

-12
This file was deleted.

src/app/app.component.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
describe('AppComponent', () => {
22
it('First test', () => {
3-
expect(1).toEqual(1);
3+
void expect(1).toEqual(1);
44
});
55
});

src/app/cards/cards.component.ts

+1-9
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { NgOptimizedImage } from '@angular/common';
33
import { NgxCopyPasteDirective } from 'ngx-copypaste';
44
import { HighlightModule } from 'ngx-highlightjs';
55
import { AssetPipe } from '@libraries/asset/asset.pipe';
6-
import { ColorPipe } from '@open-source/color/color.pipe';
76
import { CardItem } from './cards.type';
87
import { CopiedComponent } from '../shared/copied/copied.component';
98
import { CardType } from './cards.enum';
@@ -14,14 +13,7 @@ import { toSignal } from '@angular/core/rxjs-interop';
1413
@Component({
1514
selector: 'jsdaddy-open-source-cards',
1615
standalone: true,
17-
imports: [
18-
NgOptimizedImage,
19-
NgxCopyPasteDirective,
20-
HighlightModule,
21-
AssetPipe,
22-
ColorPipe,
23-
CopiedComponent,
24-
],
16+
imports: [NgOptimizedImage, NgxCopyPasteDirective, HighlightModule, AssetPipe, CopiedComponent],
2517
providers: [ScrollService],
2618
templateUrl: './cards.component.html',
2719
styleUrls: ['./cards.component.scss'],

src/main.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,7 @@ bootstrapApplication(AppComponent, {
2828
},
2929
},
3030
],
31+
}).catch((err: unknown) => {
3132
// eslint-disable-next-line no-console
32-
}).catch((err) => console.error(err));
33+
console.error(err);
34+
});

src/styles.scss

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use './libraries/styles/scroll-bar';
2+
13
@tailwind base;
24
@tailwind components;
35
@tailwind utilities;

tsconfig.json

+7-4
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,16 @@
2626
"removeComments": true,
2727
"resolveJsonModule": true,
2828
"paths": {
29-
"ngx-copypaste": ["./projects/ngx-copypaste-lib/src/public-api"],
29+
"@libraries/*": ["./src/libraries/*"],
3030
"@open-source/*": ["./src/libraries/open-source/*"],
31-
"@libraries/*": ["./src/libraries/*"]
31+
"ngx-copypaste": ["./projects/ngx-copypaste-lib/src/public-api"]
3232
},
3333
"skipLibCheck": true,
34-
"noImplicitAny": true
34+
"noImplicitAny": true,
35+
"isolatedModules": true
3536
},
3637
"angularCompilerOptions": {
38+
"strictStandalone": true,
3739
"enableI18nLegacyMessageIdFormat": false,
3840
"strictInjectionParameters": true,
3941
"strictInputAccessModifiers": true,
@@ -43,7 +45,8 @@
4345
"extendedDiagnostics": {
4446
"checks": {
4547
"invalidBananaInBox": "error",
46-
"nullishCoalescingNotNullable": "warning"
48+
"nullishCoalescingNotNullable": "warning",
49+
"unusedStandaloneImports": "suppress"
4750
},
4851
"defaultCategory": "suppress"
4952
}

0 commit comments

Comments
 (0)