From a3d930f6697f0039b797c66f122f99b6463da28b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A1=E8=89=B2?= Date: Thu, 9 Nov 2023 11:33:04 +0800 Subject: [PATCH] build: bump angular 17 (#26) --- .github/workflows/ci.yml | 23 +++--- .gitignore | 27 ++++--- .nvmrc | 2 +- README.md | 1 + angular.json | 32 ++------ karma.conf.js | 101 +++++++++++++------------ lib/index.ts | 2 +- lib/ng-package.json | 2 +- lib/package.json | 4 +- lib/{public_api.ts => public-api.ts} | 0 lib/src/highlight-js.directive.ts | 10 +-- lib/test.ts | 6 -- lib/tsconfig.lib.json | 4 +- package.json | 60 +++++++-------- src/app/components/demo.component.html | 4 +- src/assets/forkme.png | Bin 7791 -> 0 bytes src/environments/environment.prod.ts | 3 - src/environments/environment.ts | 8 -- src/index.html | 6 +- src/main.ts | 7 -- tsconfig.app.json | 8 +- tsconfig.json | 1 + tsconfig.spec.json | 9 ++- 23 files changed, 147 insertions(+), 173 deletions(-) rename lib/{public_api.ts => public-api.ts} (100%) delete mode 100644 lib/test.ts delete mode 100644 src/assets/forkme.png delete mode 100644 src/environments/environment.prod.ts delete mode 100644 src/environments/environment.ts diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69acf6a..d04cfcd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,11 +28,16 @@ jobs: cmd: install - name: run - run: | - yarn run test - cat ./coverage/lcov.info | ./node_modules/.bin/codecov - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + run: yarn run test + + - uses: codecov/codecov-action@v3 + name: upload + with: + token: ${{ secrets.CODECOV_TOKEN }} + flags: unittests + files: ./coverage/cobertura-coverage.xml + fail_ci_if_error: true + verbose: true lint: runs-on: ubuntu-latest @@ -60,12 +65,12 @@ jobs: - name: build run: | - node --max_old_space_size=5120 ./node_modules/@angular/cli/bin/ng build --base-href /ngx-highlight-js/ - cp ./dist/index.html ./dist/404.html - ls ./dist + node ./node_modules/@angular/cli/bin/ng build --base-href /ngx-highlight-js/ + cp ./dist/browser/index.html ./dist/browser/404.html + ls ./dist/browser - name: deploy-to-gh-pages uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./dist + publish_dir: ./dist/browser diff --git a/.gitignore b/.gitignore index 7a9d8f0..1f94fbe 100644 --- a/.gitignore +++ b/.gitignore @@ -1,18 +1,18 @@ # See http://help.github.com/ignore-files/ for more about ignoring files. -# compiled output +# Compiled output /dist /tmp /out-tsc -/publish -/yarn.lock -/.angular/cache +/bazel-out -# dependencies +# Node /node_modules +npm-debug.log +yarn-error.log # IDEs and editors -/.idea +.idea/ .project .classpath .c9/ @@ -20,23 +20,26 @@ .settings/ *.sublime-workspace -# IDE - VSCode +# Visual Studio Code .vscode/* !.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json +.history/* -# misc -/.sass-cache +# Miscellaneous +/.angular/cache +.sass-cache/ /connect.lock /coverage /libpeerconnection.log -npm-debug.log -yarn-error.log testem.log /typings -# System Files +# System files .DS_Store Thumbs.db + +/publish +/yarn.lock diff --git a/.nvmrc b/.nvmrc index 6b17d22..3e558c9 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -14.16.1 +18.12.0 diff --git a/README.md b/README.md index d08405f..3d8dff0 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ Angular for syntax highlighting with highlight.js [![NPM version](https://img.shields.io/npm/v/ngx-highlight-js.svg)](https://www.npmjs.com/package/ngx-highlight-js) [![Ci](https://github.com/cipchk/ngx-highlight-js/workflows/Ci/badge.svg)](https://github.com/cipchk/ngx-highlight-js/actions) +[![codecov](https://codecov.io/github/cipchk/ngx-highlight-js/graph/badge.svg?token=FI8lMVH3bN)](https://codecov.io/github/cipchk/ngx-highlight-js) ## Demo diff --git a/angular.json b/angular.json index 4d88083..abec15b 100644 --- a/angular.json +++ b/angular.json @@ -14,15 +14,15 @@ } }, "root": "", - "sourceRoot": "src", + "sourceRoot": "", "prefix": "app", "architect": { "build": { - "builder": "@angular-devkit/build-angular:browser", + "builder": "@angular-devkit/build-angular:application", "options": { "outputPath": "dist", "index": "src/index.html", - "main": "src/main.ts", + "browser": "src/main.ts", "polyfills": [ "zone.js" ], @@ -49,21 +49,12 @@ "maximumError": "4kb" } ], - "fileReplacements": [ - { - "replace": "src/environments/environment.ts", - "with": "src/environments/environment.prod.ts" - } - ], "outputHashing": "all" }, "development": { - "buildOptimizer": false, "optimization": false, - "vendorChunk": true, "extractLicenses": false, - "sourceMap": true, - "namedChunks": true + "sourceMap": true } }, "defaultConfiguration": "production" @@ -72,10 +63,10 @@ "builder": "@angular-devkit/build-angular:dev-server", "configurations": { "production": { - "browserTarget": "ngx-highlight-js:build:production" + "buildTarget": "ngx-highlight-js:build:production" }, "development": { - "browserTarget": "ngx-highlight-js:build:development" + "buildTarget": "ngx-highlight-js:build:development" } }, "defaultConfiguration": "development" @@ -83,19 +74,17 @@ "test": { "builder": "@angular-devkit/build-angular:karma", "options": { - "main": "lib/test.ts", + "karmaConfig": "./karma.conf.js", "polyfills": [ "zone.js", "zone.js/testing" ], "tsConfig": "tsconfig.spec.json", - "karmaConfig": "karma.conf.js", "scripts": [ "src/assets/highlight.min.js" ], "include": [ - "../lib/test.ts", - "../lib/**/*.spec.ts" + "lib/**/*.spec.ts" ] } }, @@ -112,10 +101,5 @@ } } } - }, - "cli": { - "schematicCollections": [ - "@angular-eslint/schematics" - ] } } diff --git a/karma.conf.js b/karma.conf.js index 5ccad91..91ca45a 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -1,50 +1,51 @@ -// Karma configuration file, see link for more information -// https://karma-runner.github.io/1.0/config/configuration-file.html - -module.exports = function (config) { - config.set({ - basePath: '', - frameworks: ['jasmine', '@angular-devkit/build-angular'], - plugins: [ - require('karma-jasmine'), - require('karma-chrome-launcher'), - require('karma-jasmine-html-reporter'), - require('karma-coverage'), - require('@angular-devkit/build-angular/plugins/karma') - ], - client: { - jasmine: { - // you can add configuration options for Jasmine here - // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html - // for example, you can disable the random execution with `random: false` - // or set a specific seed with `seed: 4321` - }, - clearContext: false // leave Jasmine Spec Runner output visible in browser - }, - jasmineHtmlReporter: { - suppressAll: true // removes the duplicated traces - }, - coverageReporter: { - dir: require('path').join(__dirname, './coverage'), - subdir: '.', - reporters: [ - { type: 'html' }, - { type: 'text-summary' } - ] - }, - reporters: ['progress', 'kjhtml'], - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: true, - browsers: ['Chrome'], - singleRun: false, - restartOnFileChange: true, - customLaunchers: { - ChromeHeadlessCI: { - base: 'ChromeHeadless', - flags: ['--no-sandbox'], - }, - } - }); -}; +// Karma configuration file, see link for more information +// https://karma-runner.github.io/1.0/config/configuration-file.html + +module.exports = function (config) { + config.set({ + basePath: '', + frameworks: ['jasmine', '@angular-devkit/build-angular'], + plugins: [ + require('karma-jasmine'), + require('karma-chrome-launcher'), + require('karma-jasmine-html-reporter'), + require('karma-coverage'), + require('@angular-devkit/build-angular/plugins/karma') + ], + client: { + jasmine: { + // you can add configuration options for Jasmine here + // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html + // for example, you can disable the random execution with `random: false` + // or set a specific seed with `seed: 4321` + }, + clearContext: false // leave Jasmine Spec Runner output visible in browser + }, + jasmineHtmlReporter: { + suppressAll: true // removes the duplicated traces + }, + coverageReporter: { + dir: require('path').join(__dirname, './coverage'), + subdir: '.', + reporters: [ + { type: 'html' }, + { type: 'text-summary' }, + { type: 'cobertura' }, + ] + }, + reporters: ['progress', 'kjhtml'], + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: ['Chrome'], + singleRun: false, + restartOnFileChange: true, + customLaunchers: { + ChromeHeadlessCI: { + base: 'ChromeHeadless', + flags: ['--no-sandbox'], + }, + } + }); +}; diff --git a/lib/index.ts b/lib/index.ts index 4aaf8f9..7e1a213 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -1 +1 @@ -export * from './public_api'; +export * from './public-api'; diff --git a/lib/ng-package.json b/lib/ng-package.json index 89a102f..ba22fde 100644 --- a/lib/ng-package.json +++ b/lib/ng-package.json @@ -3,7 +3,7 @@ "dest": "../publish", "deleteDestPath": true, "lib": { - "entryFile": "public_api.ts" + "entryFile": "public-api.ts" }, "allowedNonPeerDependencies": ["tslib", "angular", "highlight.js"] } diff --git a/lib/package.json b/lib/package.json index ddc290a..258d6f4 100644 --- a/lib/package.json +++ b/lib/package.json @@ -1,6 +1,6 @@ { "name": "ngx-highlight-js", - "version": "16.1.0", + "version": "17.0.0", "description": "Angular for syntax highlighting with highlight.js", "keywords": [ "highlight", @@ -21,6 +21,6 @@ }, "homepage": "https://cipchk.github.io/ngx-highlight-js/", "dependencies": { - "highlight.js": "^11.0.0" + "highlight.js": "^11.9.0" } } diff --git a/lib/public_api.ts b/lib/public-api.ts similarity index 100% rename from lib/public_api.ts rename to lib/public-api.ts diff --git a/lib/src/highlight-js.directive.ts b/lib/src/highlight-js.directive.ts index dc2165b..4cad612 100644 --- a/lib/src/highlight-js.directive.ts +++ b/lib/src/highlight-js.directive.ts @@ -103,10 +103,8 @@ export class HighlightJsDirective implements AfterViewInit, OnDestroy { ngOnDestroy(): void { this.destroy(); - this.destroyMutation(); - if (this.modelValue$) { - this.modelValue$.unsubscribe(); - } + this.observer?.disconnect(); + this.modelValue$?.unsubscribe(); } private initMutation(): void { @@ -122,8 +120,4 @@ export class HighlightJsDirective implements AfterViewInit, OnDestroy { }); }); } - - private destroyMutation(): void { - this.observer?.disconnect(); - } } diff --git a/lib/test.ts b/lib/test.ts deleted file mode 100644 index 84245b8..0000000 --- a/lib/test.ts +++ /dev/null @@ -1,6 +0,0 @@ -// This file is required by karma.conf.js and loads recursively all the .spec and framework files -import { getTestBed } from '@angular/core/testing'; -import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; - -// First, initialize the Angular testing environment. -getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting()); diff --git a/lib/tsconfig.lib.json b/lib/tsconfig.lib.json index 26391b1..c04115c 100644 --- a/lib/tsconfig.lib.json +++ b/lib/tsconfig.lib.json @@ -4,12 +4,12 @@ "alwaysStrict": true, "inlineSources": true, "strictFunctionTypes": true, - "stripInternal": true + "stripInternal": true, + "declarationMap": false }, "files": ["./src/highlight-js.module.ts"], "include": ["**/*.ts"], "angularCompilerOptions": { - "enableIvy": true, "compilationMode": "partial" } } diff --git a/package.json b/package.json index 28d9815..6bac52e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ngx-highlight-js", - "version": "16.1.0", + "version": "17.0.0", "description": "Angular for syntax highlighting with highlight.js", "keywords": [ "highlight", @@ -21,48 +21,46 @@ }, "homepage": "https://cipchk.github.io/ngx-highlight-js/", "scripts": { - "analyze": "ng b --stats-json --source-map", "lint": "ng lint", - "test": "ng t --no-progress --browsers=ChromeHeadlessCI --code-coverage --no-watch", + "test": "ng t --no-progress --code-coverage --no-watch --browsers=ChromeHeadless", "build": "node scripts/build.js", - "release:next": "npm run build && cd publish && npm publish --access public --tag next", - "release": "npm run build && cd publish && npm publish --access public" + "release": "npm run build && cd publish && npm publish --access public", + "release:next": "npm run build && cd publish && npm publish --access public --tag next" }, "dependencies": { - "@angular/animations": "^16.0.0", - "@angular/common": "^16.0.0", - "@angular/compiler": "^16.0.0", - "@angular/core": "^16.0.0", - "@angular/forms": "^16.0.0", - "@angular/platform-browser": "^16.0.0", - "@angular/platform-browser-dynamic": "^16.0.0", - "@angular/router": "^16.0.0", + "@angular/animations": "^17.0.0", + "@angular/common": "^17.0.0", + "@angular/compiler": "^17.0.0", + "@angular/core": "^17.0.0", + "@angular/forms": "^17.0.0", + "@angular/platform-browser": "^17.0.0", + "@angular/platform-browser-dynamic": "^17.0.0", + "@angular/router": "^17.0.0", "rxjs": "~7.8.0", "tslib": "^2.3.0", - "zone.js": "~0.13.0", + "zone.js": "~0.14.2", "highlight.js": "^11.0.0" }, "devDependencies": { - "@angular-devkit/build-angular": "^16.0.3", - "@angular/cli": "~16.0.3", - "@angular/compiler-cli": "^16.0.0", - "@types/jasmine": "~4.3.0", - "jasmine-core": "~4.6.0", + "@angular-devkit/build-angular": "^17.0.0", + "@angular/cli": "^17.0.0", + "@angular/compiler-cli": "^17.0.0", + "@types/jasmine": "~5.1.0", + "jasmine-core": "~5.1.0", "karma": "~6.4.0", "karma-chrome-launcher": "~3.2.0", "karma-coverage": "~2.2.0", "karma-jasmine": "~5.1.0", - "karma-jasmine-html-reporter": "~2.0.0", - "typescript": "~5.0.2", - "@angular-eslint/builder": "^16.0.3", - "@angular-eslint/eslint-plugin": "^16.0.3", - "@angular-eslint/eslint-plugin-template": "^16.0.3", - "@angular-eslint/schematics": "^16.0.3", - "@angular-eslint/template-parser": "^16.0.3", - "@typescript-eslint/eslint-plugin": "^5.59.8", - "@typescript-eslint/parser": "^5.59.8", - "codecov": "^3.8.3", - "eslint": "^8.42.0", - "ng-packagr": "^16.0.1" + "karma-jasmine-html-reporter": "~2.1.0", + "typescript": "~5.2.2", + "@angular-eslint/builder": "^17.0.0", + "@angular-eslint/eslint-plugin": "^17.0.0", + "@angular-eslint/eslint-plugin-template": "^17.0.0", + "@angular-eslint/schematics": "^17.0.0", + "@angular-eslint/template-parser": "^17.0.0", + "@typescript-eslint/eslint-plugin": "^6.10.0", + "@typescript-eslint/parser": "^6.10.0", + "eslint": "^8.53.0", + "ng-packagr": "^17.0.0" } } diff --git a/src/app/components/demo.component.html b/src/app/components/demo.component.html index 4258906..7e7d8c8 100644 --- a/src/app/components/demo.component.html +++ b/src/app/components/demo.component.html @@ -21,11 +21,11 @@
2、Import the `HighlightJsModule` in to your root `AppModule`.
3、Add highlight.js

Load the highlight.js and theme css in page.

diff --git a/src/assets/forkme.png b/src/assets/forkme.png deleted file mode 100644 index 146ef8a800602169cf78c686fc5a6d138a76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~9#738oT^<-xFVJWPRxwILzX-zyZFN@y$!1Xdlpy*+T-itfZ_lgW)KhyaxU z)-?ADhlWRJ*!Z&OC@3r}p7LIyNPi*~x-kXmw3U{X!P3xBNE>AeB80jS@1B~1DDK4M znIM=-gvWb@DtBTC4h|MfCBi$56&V?6KdxN$H&L%1_+4s zCsN@wQ(;SUvyHnGCr_|fDAJ!ug;O*I3Ab{0VmxB6n1TqV5{%`6c(1K<&}=~Txx&#W zf~iD!%2>hjxx&ZLow%!~hZ_CR_)IXB2u~R6_`pE_Deg|ZbH_F+l#11#i0Q5h@%u)) z+Z{j0+o7SM1L#hShP9=#DTn}-h^Ye0DKptH1J+9hFbv9DK4{#ajc&uiSB82jD@Q;C==V{xV$ku`ZxdrQsp!y_ZZO*fl=fbPVCsYH0fST5%3 zYODL%o!bL1I~p21FDZmaCC;&Rw036RsOM?`ji - Fork me on GitHub + Fork me on GitHub diff --git a/src/main.ts b/src/main.ts index 641943d..6507bb6 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,14 +1,7 @@ -import { enableProdMode } from '@angular/core'; -import { environment } from './environments/environment'; - import { bootstrapApplication } from '@angular/platform-browser'; import { AppComponent } from './app/app.component'; import { HighlightJsConfig, HIGHLIGHTJS_CONFIG } from 'ngx-highlight-js'; -if (environment.production) { - enableProdMode(); -} - bootstrapApplication(AppComponent, { providers: [{ provide: HIGHLIGHTJS_CONFIG, useValue: { lang: 'html' } as HighlightJsConfig }], }).catch((err) => console.error(err)); diff --git a/tsconfig.app.json b/tsconfig.app.json index 84f1f99..374cc9d 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -5,6 +5,10 @@ "outDir": "./out-tsc/app", "types": [] }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"] + "files": [ + "src/main.ts" + ], + "include": [ + "src/**/*.d.ts" + ] } diff --git a/tsconfig.json b/tsconfig.json index b4363b6..0b56a38 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,6 +10,7 @@ "noPropertyAccessFromIndexSignature": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, + "esModuleInterop": true, "sourceMap": true, "declaration": false, "downlevelIteration": true, diff --git a/tsconfig.spec.json b/tsconfig.spec.json index a0bad79..57f6f1d 100644 --- a/tsconfig.spec.json +++ b/tsconfig.spec.json @@ -3,8 +3,11 @@ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "./out-tsc/spec", - "types": ["jasmine"] + "types": [ + "jasmine" + ] }, - "files": ["lib/test.ts"], - "include": ["lib/**/*.spec.ts", "lib/**/*.d.ts"] + "include": [ + "lib/**/*.spec.ts" + ] }