Skip to content

Commit 97bdf20

Browse files
committed
feat(*): update Angular, Drop dialog support, move from scss to css
BREAKING CHANGE: Clients need to update to Angular 20 in order to use this version. As I wrote last october in #3, Dialog and Popup support were finally dropped. Only the "inline" mode is supported from now on. Additionally, probably irrelevant for clients, this library switched from scss to css which simplifies the build process.
1 parent 08f15be commit 97bdf20

84 files changed

Lines changed: 5395 additions & 10103 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/publish.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ jobs:
4040

4141
- name: Build library
4242
run: |
43-
npm run build:lib:linux
44-
npm run build:css:linux
43+
npm run build
4544
4645
- name: Release
4746
env:

.lintstagedrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"eslint --fix --cache",
88
"prettier --write --cache"
99
],
10-
"*.scss": [
10+
"*.css": [
1111
"prettier --write --cache"
1212
]
1313
}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ The MIT License
22

33
Copyright (c) 2014-2016 Daniel YK Pan.
44
Copyright (c) 2020 Daniel Moncada.
5-
Copyright (c) 2024 NetWin.
5+
Copyright (c) 2024-2025 NetWin.
66

77
Permission is hereby granted, free of charge, to any person obtaining a copy
88
of this software and associated documentation files (the "Software"), to deal

angular.json

Lines changed: 53 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,56 @@
11
{
22
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
33
"version": 1,
4-
"cli": {
5-
"cache": {
6-
"enabled": true,
7-
"path": ".cache",
8-
"environment": "all"
4+
"newProjectRoot": "projects",
5+
"schematics": {
6+
"@schematics/angular:component": {
7+
"type": "component",
8+
"style": "css"
9+
},
10+
"@schematics/angular:directive": {
11+
"type": "directive"
12+
},
13+
"@schematics/angular:service": {
14+
"type": "service"
15+
},
16+
"@schematics/angular:guard": {
17+
"typeSeparator": "."
18+
},
19+
"@schematics/angular:interceptor": {
20+
"typeSeparator": "."
21+
},
22+
"@schematics/angular:module": {
23+
"typeSeparator": "."
24+
},
25+
"@schematics/angular:pipe": {
26+
"typeSeparator": "."
27+
},
28+
"@schematics/angular:resolver": {
29+
"typeSeparator": "."
930
}
1031
},
11-
"newProjectRoot": "projects",
1232
"projects": {
1333
"docs": {
1434
"root": "",
1535
"sourceRoot": "src",
1636
"projectType": "application",
1737
"prefix": "owl",
18-
"schematics": {
19-
"@schematics/angular:component": {
20-
"style": "scss"
21-
}
22-
},
38+
"schematics": {},
2339
"architect": {
2440
"build": {
2541
"builder": "@ng-doc/builder:application",
2642
"options": {
27-
"allowedCommonJsDependencies": ["@ng-doc/core"],
43+
"allowedCommonJsDependencies": [
44+
"@ng-doc/core"
45+
],
2846
"aot": true,
2947
"outputPath": {
3048
"base": "dist/docs"
3149
},
3250
"index": "src/index.html",
33-
"polyfills": ["src/polyfills.ts"],
51+
"polyfills": [
52+
"src/polyfills.ts"
53+
],
3454
"tsConfig": "src/tsconfig.app.json",
3555
"assets": [
3656
{
@@ -51,7 +71,10 @@
5171
"src/favicon.ico",
5272
"src/assets"
5373
],
54-
"styles": ["node_modules/@ng-doc/app/styles/global.css", "src/styles.scss"],
74+
"styles": [
75+
"node_modules/@ng-doc/app/styles/global.css",
76+
"src/styles.css"
77+
],
5578
"scripts": [],
5679
"browser": "src/main.ts"
5780
},
@@ -68,6 +91,7 @@
6891
"sourceMap": false,
6992
"namedChunks": false,
7093
"aot": true,
94+
"hmr": true,
7195
"extractLicenses": true,
7296
"budgets": [
7397
{
@@ -114,15 +138,18 @@
114138
"defaultConfiguration": "development"
115139
},
116140
"extract-i18n": {
117-
"builder": "@angular-devkit/build-angular:extract-i18n",
141+
"builder": "@angular/build:extract-i18n",
118142
"options": {
119143
"buildTarget": "docs:build"
120144
}
121145
},
122146
"lint": {
123147
"builder": "@angular-eslint/builder:lint",
124148
"options": {
125-
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"],
149+
"lintFilePatterns": [
150+
"src/**/*.ts",
151+
"src/**/*.html"
152+
],
126153
"eslintConfig": "./eslint.config.js"
127154
}
128155
}
@@ -135,7 +162,7 @@
135162
"prefix": "owl",
136163
"architect": {
137164
"build": {
138-
"builder": "@angular-devkit/build-angular:ng-packagr",
165+
"builder": "@angular/build:ng-packagr",
139166
"options": {
140167
"project": "projects/picker/ng-package.json"
141168
},
@@ -150,16 +177,22 @@
150177
"defaultConfiguration": "production"
151178
},
152179
"test": {
153-
"builder": "@angular-devkit/build-angular:karma",
180+
"builder": "@angular/build:karma",
154181
"options": {
155182
"tsConfig": "projects/picker/tsconfig.spec.json",
156-
"polyfills": ["zone.js", "zone.js/testing"]
183+
"polyfills": [
184+
"zone.js",
185+
"zone.js/testing"
186+
]
157187
}
158188
},
159189
"lint": {
160190
"builder": "@angular-eslint/builder:lint",
161191
"options": {
162-
"lintFilePatterns": ["projects/picker/src/lib/**/*.ts", "projects/picker/src/lib/**/*.html"],
192+
"lintFilePatterns": [
193+
"projects/picker/src/lib/**/*.ts",
194+
"projects/picker/src/lib/**/*.html"
195+
],
163196
"eslintConfig": "./eslint.config.js"
164197
}
165198
}

eslint.config.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ const tsEslint = require('typescript-eslint');
66
const stylistic = require('@stylistic/eslint-plugin');
77

88
module.exports = tsEslint.config(
9+
{
10+
ignores: ['**/node_modules/', '**/dist/', '**/.angular/', '**/ng-doc/']
11+
},
912
{
1013
files: ['**/*.ts'],
1114
extends: [
@@ -69,11 +72,10 @@ module.exports = tsEslint.config(
6972
'@typescript-eslint/no-explicit-any': 'warn',
7073
// https://typescript-eslint.io/rules/prefer-optional-chain
7174
// Prefer `a?.b?.c` over `a && a.b && a.b.c`
72-
'@typescript-eslint/prefer-optional-chain': 'warn',
75+
'@typescript-eslint/prefer-optional-chain': 'error',
7376
// https://typescript-eslint.io/rules/consistent-type-definitions
7477
// Disables the rule that enforces consistent usage of either "type" or "interface" for type definitions
75-
// TODO: enable again
76-
'@typescript-eslint/consistent-type-definitions': 'off',
78+
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
7779
// https://typescript-eslint.io/rules/explicit-function-return-type
7880
// Require explicit return types on functions and class methods
7981
'@typescript-eslint/explicit-function-return-type': ['warn', { 'allowExpressions': true }],
@@ -85,7 +87,7 @@ module.exports = tsEslint.config(
8587
],
8688
// https://typescript-eslint.io/rules/no-empty-object-type
8789
// Disallow the `{}` type in object type annotations
88-
'@typescript-eslint/no-empty-object-type': 'warn',
90+
'@typescript-eslint/no-empty-object-type': 'error',
8991
// https://typescript-eslint.io/rules/consistent-indexed-object-style
9092
// Disables the rule that enforces consistent usage of either index signature or record types
9193
'@typescript-eslint/consistent-indexed-object-style': 'off',
@@ -97,7 +99,7 @@ module.exports = tsEslint.config(
9799
'@typescript-eslint/no-misused-promises': 'error',
98100
// https://typescript-eslint.io/rules/no-floating-promises
99101
// Disallow floating (unused / unawaited) promises
100-
'@typescript-eslint/no-floating-promises': 'warn',
102+
'@typescript-eslint/no-floating-promises': 'error',
101103
// https://typescript-eslint.io/rules/no-unused-vars
102104
// Disallow unused variables
103105
'@typescript-eslint/no-unused-vars': ['warn', { 'argsIgnorePattern': '^_', 'varsIgnorePattern': '^_' }],

0 commit comments

Comments
 (0)