Skip to content

Commit a3d930f

Browse files
authored
build: bump angular 17 (#26)
1 parent fd0b953 commit a3d930f

23 files changed

+147
-173
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,16 @@ jobs:
2828
cmd: install
2929

3030
- name: run
31-
run: |
32-
yarn run test
33-
cat ./coverage/lcov.info | ./node_modules/.bin/codecov
34-
env:
35-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
31+
run: yarn run test
32+
33+
- uses: codecov/codecov-action@v3
34+
name: upload
35+
with:
36+
token: ${{ secrets.CODECOV_TOKEN }}
37+
flags: unittests
38+
files: ./coverage/cobertura-coverage.xml
39+
fail_ci_if_error: true
40+
verbose: true
3641

3742
lint:
3843
runs-on: ubuntu-latest
@@ -60,12 +65,12 @@ jobs:
6065

6166
- name: build
6267
run: |
63-
node --max_old_space_size=5120 ./node_modules/@angular/cli/bin/ng build --base-href /ngx-highlight-js/
64-
cp ./dist/index.html ./dist/404.html
65-
ls ./dist
68+
node ./node_modules/@angular/cli/bin/ng build --base-href /ngx-highlight-js/
69+
cp ./dist/browser/index.html ./dist/browser/404.html
70+
ls ./dist/browser
6671
6772
- name: deploy-to-gh-pages
6873
uses: peaceiris/actions-gh-pages@v3
6974
with:
7075
github_token: ${{ secrets.GITHUB_TOKEN }}
71-
publish_dir: ./dist
76+
publish_dir: ./dist/browser

.gitignore

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,45 @@
11
# See http://help.github.com/ignore-files/ for more about ignoring files.
22

3-
# compiled output
3+
# Compiled output
44
/dist
55
/tmp
66
/out-tsc
7-
/publish
8-
/yarn.lock
9-
/.angular/cache
7+
/bazel-out
108

11-
# dependencies
9+
# Node
1210
/node_modules
11+
npm-debug.log
12+
yarn-error.log
1313

1414
# IDEs and editors
15-
/.idea
15+
.idea/
1616
.project
1717
.classpath
1818
.c9/
1919
*.launch
2020
.settings/
2121
*.sublime-workspace
2222

23-
# IDE - VSCode
23+
# Visual Studio Code
2424
.vscode/*
2525
!.vscode/settings.json
2626
!.vscode/tasks.json
2727
!.vscode/launch.json
2828
!.vscode/extensions.json
29+
.history/*
2930

30-
# misc
31-
/.sass-cache
31+
# Miscellaneous
32+
/.angular/cache
33+
.sass-cache/
3234
/connect.lock
3335
/coverage
3436
/libpeerconnection.log
35-
npm-debug.log
36-
yarn-error.log
3737
testem.log
3838
/typings
3939

40-
# System Files
40+
# System files
4141
.DS_Store
4242
Thumbs.db
43+
44+
/publish
45+
/yarn.lock

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14.16.1
1+
18.12.0

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Angular for syntax highlighting with highlight.js
33

44
[![NPM version](https://img.shields.io/npm/v/ngx-highlight-js.svg)](https://www.npmjs.com/package/ngx-highlight-js)
55
[![Ci](https://github.com/cipchk/ngx-highlight-js/workflows/Ci/badge.svg)](https://github.com/cipchk/ngx-highlight-js/actions)
6+
[![codecov](https://codecov.io/github/cipchk/ngx-highlight-js/graph/badge.svg?token=FI8lMVH3bN)](https://codecov.io/github/cipchk/ngx-highlight-js)
67

78
## Demo
89

angular.json

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
}
1515
},
1616
"root": "",
17-
"sourceRoot": "src",
17+
"sourceRoot": "",
1818
"prefix": "app",
1919
"architect": {
2020
"build": {
21-
"builder": "@angular-devkit/build-angular:browser",
21+
"builder": "@angular-devkit/build-angular:application",
2222
"options": {
2323
"outputPath": "dist",
2424
"index": "src/index.html",
25-
"main": "src/main.ts",
25+
"browser": "src/main.ts",
2626
"polyfills": [
2727
"zone.js"
2828
],
@@ -49,21 +49,12 @@
4949
"maximumError": "4kb"
5050
}
5151
],
52-
"fileReplacements": [
53-
{
54-
"replace": "src/environments/environment.ts",
55-
"with": "src/environments/environment.prod.ts"
56-
}
57-
],
5852
"outputHashing": "all"
5953
},
6054
"development": {
61-
"buildOptimizer": false,
6255
"optimization": false,
63-
"vendorChunk": true,
6456
"extractLicenses": false,
65-
"sourceMap": true,
66-
"namedChunks": true
57+
"sourceMap": true
6758
}
6859
},
6960
"defaultConfiguration": "production"
@@ -72,30 +63,28 @@
7263
"builder": "@angular-devkit/build-angular:dev-server",
7364
"configurations": {
7465
"production": {
75-
"browserTarget": "ngx-highlight-js:build:production"
66+
"buildTarget": "ngx-highlight-js:build:production"
7667
},
7768
"development": {
78-
"browserTarget": "ngx-highlight-js:build:development"
69+
"buildTarget": "ngx-highlight-js:build:development"
7970
}
8071
},
8172
"defaultConfiguration": "development"
8273
},
8374
"test": {
8475
"builder": "@angular-devkit/build-angular:karma",
8576
"options": {
86-
"main": "lib/test.ts",
77+
"karmaConfig": "./karma.conf.js",
8778
"polyfills": [
8879
"zone.js",
8980
"zone.js/testing"
9081
],
9182
"tsConfig": "tsconfig.spec.json",
92-
"karmaConfig": "karma.conf.js",
9383
"scripts": [
9484
"src/assets/highlight.min.js"
9585
],
9686
"include": [
97-
"../lib/test.ts",
98-
"../lib/**/*.spec.ts"
87+
"lib/**/*.spec.ts"
9988
]
10089
}
10190
},
@@ -112,10 +101,5 @@
112101
}
113102
}
114103
}
115-
},
116-
"cli": {
117-
"schematicCollections": [
118-
"@angular-eslint/schematics"
119-
]
120104
}
121105
}

karma.conf.js

Lines changed: 51 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,51 @@
1-
// Karma configuration file, see link for more information
2-
// https://karma-runner.github.io/1.0/config/configuration-file.html
3-
4-
module.exports = function (config) {
5-
config.set({
6-
basePath: '',
7-
frameworks: ['jasmine', '@angular-devkit/build-angular'],
8-
plugins: [
9-
require('karma-jasmine'),
10-
require('karma-chrome-launcher'),
11-
require('karma-jasmine-html-reporter'),
12-
require('karma-coverage'),
13-
require('@angular-devkit/build-angular/plugins/karma')
14-
],
15-
client: {
16-
jasmine: {
17-
// you can add configuration options for Jasmine here
18-
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19-
// for example, you can disable the random execution with `random: false`
20-
// or set a specific seed with `seed: 4321`
21-
},
22-
clearContext: false // leave Jasmine Spec Runner output visible in browser
23-
},
24-
jasmineHtmlReporter: {
25-
suppressAll: true // removes the duplicated traces
26-
},
27-
coverageReporter: {
28-
dir: require('path').join(__dirname, './coverage'),
29-
subdir: '.',
30-
reporters: [
31-
{ type: 'html' },
32-
{ type: 'text-summary' }
33-
]
34-
},
35-
reporters: ['progress', 'kjhtml'],
36-
port: 9876,
37-
colors: true,
38-
logLevel: config.LOG_INFO,
39-
autoWatch: true,
40-
browsers: ['Chrome'],
41-
singleRun: false,
42-
restartOnFileChange: true,
43-
customLaunchers: {
44-
ChromeHeadlessCI: {
45-
base: 'ChromeHeadless',
46-
flags: ['--no-sandbox'],
47-
},
48-
}
49-
});
50-
};
1+
// Karma configuration file, see link for more information
2+
// https://karma-runner.github.io/1.0/config/configuration-file.html
3+
4+
module.exports = function (config) {
5+
config.set({
6+
basePath: '',
7+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
8+
plugins: [
9+
require('karma-jasmine'),
10+
require('karma-chrome-launcher'),
11+
require('karma-jasmine-html-reporter'),
12+
require('karma-coverage'),
13+
require('@angular-devkit/build-angular/plugins/karma')
14+
],
15+
client: {
16+
jasmine: {
17+
// you can add configuration options for Jasmine here
18+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19+
// for example, you can disable the random execution with `random: false`
20+
// or set a specific seed with `seed: 4321`
21+
},
22+
clearContext: false // leave Jasmine Spec Runner output visible in browser
23+
},
24+
jasmineHtmlReporter: {
25+
suppressAll: true // removes the duplicated traces
26+
},
27+
coverageReporter: {
28+
dir: require('path').join(__dirname, './coverage'),
29+
subdir: '.',
30+
reporters: [
31+
{ type: 'html' },
32+
{ type: 'text-summary' },
33+
{ type: 'cobertura' },
34+
]
35+
},
36+
reporters: ['progress', 'kjhtml'],
37+
port: 9876,
38+
colors: true,
39+
logLevel: config.LOG_INFO,
40+
autoWatch: true,
41+
browsers: ['Chrome'],
42+
singleRun: false,
43+
restartOnFileChange: true,
44+
customLaunchers: {
45+
ChromeHeadlessCI: {
46+
base: 'ChromeHeadless',
47+
flags: ['--no-sandbox'],
48+
},
49+
}
50+
});
51+
};

lib/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from './public_api';
1+
export * from './public-api';

lib/ng-package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"dest": "../publish",
44
"deleteDestPath": true,
55
"lib": {
6-
"entryFile": "public_api.ts"
6+
"entryFile": "public-api.ts"
77
},
88
"allowedNonPeerDependencies": ["tslib", "angular", "highlight.js"]
99
}

lib/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-highlight-js",
3-
"version": "16.1.0",
3+
"version": "17.0.0",
44
"description": "Angular for syntax highlighting with highlight.js",
55
"keywords": [
66
"highlight",
@@ -21,6 +21,6 @@
2121
},
2222
"homepage": "https://cipchk.github.io/ngx-highlight-js/",
2323
"dependencies": {
24-
"highlight.js": "^11.0.0"
24+
"highlight.js": "^11.9.0"
2525
}
2626
}
File renamed without changes.

0 commit comments

Comments
 (0)