Skip to content

Commit

Permalink
Update Angular 11 (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
jfcere authored Nov 26, 2020
1 parent 88b9b44 commit 08f9cd9
Show file tree
Hide file tree
Showing 20 changed files with 1,793 additions and 1,814 deletions.
3 changes: 1 addition & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
Expand Down Expand Up @@ -127,7 +126,7 @@
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "lib/tsconfig.lib.json",
"project": "lib/ng-package.json"
Expand Down
2 changes: 1 addition & 1 deletion demo/browserslist
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major version
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not dead
Expand Down
4 changes: 2 additions & 2 deletions demo/src/app/cheat-sheet/markdown/lists-dot.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
1. First ordered list item
2. Another item
⋅⋅* Unordered sub-list.
⋅⋅* Unordered sub-list.
1. Actual numbers don't matter, just that it's a number
⋅⋅1. Ordered sub-list
⋅⋅1. Ordered sub-list
4. And another item.

⋅⋅⋅You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).
Expand Down
4 changes: 2 additions & 2 deletions demo/src/app/cheat-sheet/markdown/lists.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
1. First ordered list item
2. Another item
* Unordered sub-list.
* Unordered sub-list.
1. Actual numbers don't matter, just that it's a number
1. Ordered sub-list
1. Ordered sub-list
4. And another item.

You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).
Expand Down
2 changes: 1 addition & 1 deletion demo/src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* BROWSER POLYFILLS
*/

/** IE10 and IE11 requires the following for NgClass support on SVG elements */
/** IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.

/**
Expand Down
1 change: 1 addition & 0 deletions demo/src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ blockquote {

pre {
&::-webkit-scrollbar {
height: 10px;
width: 10px;
}

Expand Down
2 changes: 1 addition & 1 deletion demo/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../tsconfig.base.json",
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"strictPropertyInitialization": false,
Expand Down
12 changes: 8 additions & 4 deletions lib/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,22 @@ module.exports = function (config) {
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-coverage-istanbul-reporter'),
require('karma-coverage'),
require('karma-jasmine-html-reporter'),
require('karma-junit-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
coverageReporter: {
dir: require('path').join(__dirname, '../coverage'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
subdir: '.',
reporters: [
{ type: 'html' },
{ type: 'lcovonly' },
{ type: 'text-summary' }
]
},
reporters: ['progress', 'kjhtml', 'junit'],
junitReporter: {
Expand Down
16 changes: 8 additions & 8 deletions lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-markdown",
"version": "10.1.1",
"version": "11.0.0-beta.1",
"description": "Angular library that uses marked to parse markdown to html combined with Prism.js for synthax highlights",
"homepage": "https://github.com/jfcere/ngx-markdown",
"license": "MIT",
Expand Down Expand Up @@ -28,15 +28,15 @@
"@types/marked": "^1.1.0",
"emoji-toolkit": "^6.0.1",
"katex": "^0.12.0",
"marked": "^1.1.0",
"prismjs": "^1.20.0",
"marked": "^1.2.0",
"prismjs": "^1.22.0",
"tslib": "^2.0.0"
},
"peerDependencies": {
"@angular/common": "^10.0.0",
"@angular/core": "^10.0.0",
"@angular/platform-browser": "^10.0.0",
"rxjs": "^6.5.5",
"zone.js": "^0.10.3"
"@angular/common": "^11.0.0",
"@angular/core": "^11.0.0",
"@angular/platform-browser": "^11.0.0",
"rxjs": "^6.6.0",
"zone.js": "^0.10.2"
}
}
8 changes: 4 additions & 4 deletions lib/src/markdown.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ElementRef } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { of, throwError } from 'rxjs';
import { first } from 'rxjs/operators';

Expand All @@ -13,7 +13,7 @@ describe('MarkdownComponent', () => {
let component: MarkdownComponent;
let markdownService: MarkdownService;

beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
MarkdownModule.forRoot(),
Expand Down Expand Up @@ -60,7 +60,7 @@ describe('MarkdownComponent', () => {

describe('src', () => {

it('should call render with retreived content when set', async(() => {
it('should call render with retreived content when set', waitForAsync(() => {

const mockSrc = './src-example/file.md';
const mockContent = 'source-content';
Expand Down Expand Up @@ -308,7 +308,7 @@ describe('MarkdownComponent', () => {
expect(markdownService.renderKatex).toHaveBeenCalledWith(compiled, katexOptions);
});

it('should emit `ready` when done parsing', async(() => {
it('should emit `ready` when done parsing', waitForAsync(() => {

const markdown = '# Markdown';
const compiled = '<h1 id="markdown">Markdown</h1>';
Expand Down
4 changes: 2 additions & 2 deletions lib/src/markdown.module.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CommonModule } from '@angular/common';
import { HttpClient, HttpClientModule } from '@angular/common/http';
import { Component, SecurityContext } from '@angular/core';
import { async, TestBed } from '@angular/core/testing';
import { TestBed, waitForAsync } from '@angular/core/testing';

import { MarkdownModule } from './markdown.module';
import { errorSrcWithoutHttpClient, SECURITY_CONTEXT } from './markdown.service';
Expand Down Expand Up @@ -202,7 +202,7 @@ describe('MarkdownModule', () => {

describe('without HttpClient', () => {

beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
CommonModule,
Expand Down
8 changes: 4 additions & 4 deletions lib/src/markdown.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,13 @@ describe('MarkdowService', () => {
const mockRaw = [
'', // wait for line with non-whitespaces
' * list', // find first line with non-whitespaces to set offset
' * sub-list', // keep indent while removing from previous row offset
' * sub-list', // keep indent while removing from previous row offset
].join('\n');

const expected = [
'',
'* list',
' * sub-list',
' * sub-list',
].join('\n');

expect(markdownService.compile(mockRaw)).toBe(parse(expected));
Expand All @@ -146,15 +146,15 @@ describe('MarkdowService', () => {
const mockRaw = [
' ', // first line with only whitespaces should not determine indent offset
' * list', // find first line with non-whitespaces to set offset
' * sub-list', // keep indent while removing from previous row offset
' * sub-list', // keep indent while removing from previous row offset
' ', // keep blank line
' Negative indent', // keep line with negative offset according to first non-whitespaces line indent
' Lorem Ipsum', // keep indent like equals to first non-whitespaces line ident
].join('\n');

const expected = [
'* list',
' * sub-list',
' * sub-list',
'',
'Negative indent',
'Lorem Ipsum',
Expand Down
3 changes: 2 additions & 1 deletion lib/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"extends": "../tsconfig.base.json",
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/lib",
"target": "es2015",
"declaration": true,
"declarationMap": true,
"inlineSources": true,
"types": [
"marked"
Expand Down
3 changes: 3 additions & 0 deletions lib/tsconfig.lib.prod.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
},
Expand Down
2 changes: 1 addition & 1 deletion lib/tsconfig.spec.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../tsconfig.base.json",
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/spec",
"types": [
Expand Down
54 changes: 26 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-markdown",
"version": "10.1.1",
"version": "11.0.0-beta.1",
"description": "Angular library that uses marked to parse markdown to html combined with Prism.js for synthax highlights",
"homepage": "https://github.com/jfcere/ngx-markdown",
"license": "MIT",
Expand Down Expand Up @@ -42,51 +42,49 @@
"publish:lib": "npm publish ./dist/lib"
},
"dependencies": {
"@angular/animations": "~10.0.0",
"@angular/cdk": "~10.0.0",
"@angular/common": "~10.0.0",
"@angular/compiler": "~10.0.0",
"@angular/core": "~10.0.0",
"@angular/flex-layout": "10.0.0-beta.32",
"@angular/forms": "~10.0.0",
"@angular/material": "~10.0.0",
"@angular/platform-browser": "~10.0.0",
"@angular/platform-browser-dynamic": "~10.0.0",
"@angular/router": "~10.0.0",
"@angular/animations": "~11.0.0",
"@angular/cdk": "~11.0.0",
"@angular/common": "~11.0.0",
"@angular/compiler": "~11.0.0",
"@angular/core": "~11.0.0",
"@angular/flex-layout": "11.0.0-beta.33",
"@angular/forms": "~11.0.0",
"@angular/material": "~11.0.0",
"@angular/platform-browser": "~11.0.0",
"@angular/platform-browser-dynamic": "~11.0.0",
"@angular/router": "~11.0.0",
"gumshoejs": "^5.1.2",
"hammerjs": "~2.0.8",
"ngx-markdown": "file:./lib",
"rxjs": "~6.5.5",
"rxjs": "~6.6.0",
"tslib": "^2.0.0",
"web-animations-js": "^2.3.2",
"zone.js": "~0.10.3"
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1000.0",
"@angular-devkit/build-ng-packagr": "~0.1000.0",
"@angular/cli": "~10.0.0",
"@angular/compiler-cli": "~10.0.0",
"@angular/language-service": "~10.0.0",
"@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3",
"@angular-devkit/build-angular": "~0.1100.1",
"@angular/cli": "~11.0.1",
"@angular/compiler-cli": "~11.0.0",
"@angular/language-service": "~11.0.0",
"@types/jasmine": "~3.6.0",
"@types/node": "^12.11.1",
"angular-cli-ghpages": "^0.5.3",
"codelyzer": "^6.0.0-next.1",
"codelyzer": "^6.0.0",
"coveralls": "^2.13.3",
"cpx": "^1.5.0",
"jasmine-core": "~3.5.0",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0",
"karma": "~5.1.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~3.3.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"karma-junit-reporter": "^1.2.0",
"linklocal": "^2.8.2",
"ng-packagr": "~10.0.0",
"ng-packagr": "^11.0.0",
"rimraf": "^2.7.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~3.9.5"
"typescript": "~4.0.2"
}
}
36 changes: 0 additions & 36 deletions tsconfig.base.json

This file was deleted.

Loading

0 comments on commit 08f9cd9

Please sign in to comment.