Skip to content

Commit

Permalink
chore(release): release 12.0.0-beta.1
Browse files Browse the repository at this point in the history
  • Loading branch information
huaweidevcloud committed Jun 3, 2021
1 parent cc77ca4 commit 9ffa4e6
Show file tree
Hide file tree
Showing 21 changed files with 86 additions and 61 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ To see more in [devui.design](https://devui.design/home).

## Angular Support

Now supports Angular <font color=red>`^11.0.0`</font>
Now supports Angular <font color=red>`^12.0.0-beta.1`</font>

## Getting Started

Expand Down
2 changes: 1 addition & 1 deletion README_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ DevUI Design设计系统包含了DevUI规则、设计语言和最佳实践的资

## Angular版本

当前支持的angular版本<font color=red>`^11.0.0`</font>
当前支持的angular版本<font color=red>`^12.0.0-beta.1`</font>

## 快速开始

Expand Down
3 changes: 2 additions & 1 deletion devui/form/services/d-validate-sync.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { Injectable } from '@angular/core';
import { AbstractControl } from '@angular/forms';
import { Subscription } from 'rxjs';

const resolvedPromise = (() => Promise.resolve(null))();
function resolvedPromiseFunc() { return Promise.resolve(null); }
const resolvedPromise = resolvedPromiseFunc();
@Injectable({ providedIn: 'root' })
export class DValidateSyncService {

Expand Down
4 changes: 2 additions & 2 deletions devui/mention/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ const properties = [

const isBrowser = typeof window !== 'undefined';
const isFirefox = isBrowser && window['mozInnerScreenX'] != null;
const _parseInt = value => {
function _parseInt(value) {
return parseInt(value, 10);
};
}

export function getCaretCoordinates(element, position, options?) {
if (!isBrowser) {
Expand Down
12 changes: 6 additions & 6 deletions devui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-devui",
"version": "11.3.0",
"version": "12.0.0-beta.1",
"license": "MIT",
"description": "DevUI components based on Angular",
"keywords": [
Expand All @@ -17,7 +17,7 @@
"url": "https://github.com/DevCloudFE/ng-devui/issues"
},
"dependencies": {
"@angular/cdk": "^11.0.0",
"@angular/cdk": "^12.0.0",
"date-fns": "^1.30.1",
"lodash-es": "^4.17.11",
"@popperjs/core": "^2.5.4",
Expand All @@ -26,9 +26,9 @@
"tslib": "^2.0.0"
},
"peerDependencies": {
"@angular/animations": "^11.0.0",
"@angular/common": "^11.0.0",
"@angular/core": "^11.0.0",
"@angular/forms": "^11.0.0"
"@angular/animations": "^12.0.0",
"@angular/common": "^12.0.0",
"@angular/core": "^12.0.0",
"@angular/forms": "^12.0.0"
}
}
2 changes: 1 addition & 1 deletion devui/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ import 'classlist.js'; // Run `npm install --save classlist.js`.
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
import 'zone.js'; // Included with Angular CLI.

/***************************************************************************************************
* APPLICATION IMPORTS
Expand Down
4 changes: 2 additions & 2 deletions devui/test.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
/* tslint:disable:ordered-imports*/
import 'zone.js/dist/zone';
import 'zone.js';
import 'zone.js/dist/long-stack-trace-zone';
import 'zone.js/dist/proxy';
import 'zone.js/dist/sync-test';
import 'zone.js/dist/jasmine-patch';
import 'zone.js/dist/async-test';
import 'zone.js/dist/fake-async-test';

// import 'zone.js/dist/zone-testing';
// import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
Expand Down
2 changes: 1 addition & 1 deletion devui/tree/demo/draggable/draggable.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class DraggableComponent implements OnInit {
return new Promise((resovle) => {
console.log('dragNodeId: ' + dragNodeId);
console.log('dropNodeId: ' + dropNodeId);
resovle();
resovle(undefined);
});
}

Expand Down
2 changes: 1 addition & 1 deletion devui/version.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { Version } from '@angular/core';

export const VERSION = new Version('11.3.0');
export const VERSION = new Version('12.0.0-beta.1');
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@
"build:devui:ivy": "node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng build devui-lib"
},
"dependencies": {
"@angular/animations": "~11.2.7",
"@angular/cdk": "^11.2.6",
"@angular/common": "~11.2.7",
"@angular/compiler": "~11.2.7",
"@angular/core": "~11.2.7",
"@angular/forms": "~11.2.7",
"@angular/platform-browser": "~11.2.7",
"@angular/platform-browser-dynamic": "~11.2.7",
"@angular/router": "~11.2.7",
"@angular/animations": "~12.0.3",
"@angular/cdk": "^12.0.2",
"@angular/common": "~12.0.3",
"@angular/compiler": "~12.0.3",
"@angular/core": "~12.0.3",
"@angular/forms": "~12.0.3",
"@angular/platform-browser": "~12.0.3",
"@angular/platform-browser-dynamic": "~12.0.3",
"@angular/router": "~12.0.3",
"@devui-design/icons": "^1.2.0",
"@ngx-translate/core": "^13.0.0",
"@ngx-translate/http-loader": "^6.0.0",
Expand All @@ -59,14 +59,14 @@
"marked": "^2.0.0",
"@popperjs/core": "^2.5.4",
"web-animations-js": "^2.3.2",
"zone.js": "~0.10.2"
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-builders/custom-webpack": "^11.0.0",
"@angular-devkit/build-angular": "~0.1102.6",
"@angular/cli": "^11.2.6",
"@angular/compiler-cli": "~11.2.7",
"@angular/language-service": "^11.2.7",
"@angular-builders/custom-webpack": "^12.0.0",
"@angular-devkit/build-angular": "~12.0.3",
"@angular/cli": "^12.0.3",
"@angular/compiler-cli": "~12.0.3",
"@angular/language-service": "^12.0.3",
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@types/jasmine": "~3.6.0",
Expand All @@ -87,7 +87,7 @@
"karma-junit-reporter": "^2.0.1",
"lint-staged": "^9.2.3",
"markdown-loader": "^5.1.0",
"ng-packagr": "11.2.4",
"ng-packagr": "^12.0.0",
"ngx-build-plus": "^8.1.5",
"patch-package": "^6.2.2",
"postcss": "^8.2.4",
Expand All @@ -102,7 +102,7 @@
"stylelint-scss": "^3.17.0",
"ts-node": "~7.0.0",
"tslint": "~6.1.0",
"typescript": "~4.0.7"
"typescript": "~4.2.4"
},
"lint-staged": {
"devui/**/*.ts": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/node_modules/ng-packagr/lib/styles/stylesheet-processor-worker.js b/node_modules/ng-packagr/lib/styles/stylesheet-processor-worker.js
index 0dae92e..6854a35 100644
index f8ae209..7b18a6f 100644
--- a/node_modules/ng-packagr/lib/styles/stylesheet-processor-worker.js
+++ b/node_modules/ng-packagr/lib/styles/stylesheet-processor-worker.js
@@ -93,6 +93,7 @@ function optimizeCss(filePath, css, browsers, cssUrl) {
@@ -121,6 +121,7 @@ function optimizeCss(filePath, css, browsers, cssUrl) {
},
],
}));
Expand Down
15 changes: 15 additions & 0 deletions patches/sass-loader+11.0.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/node_modules/sass-loader/dist/utils.js b/node_modules/sass-loader/dist/utils.js
index 5e69f94..77fc7c1 100644
--- a/node_modules/sass-loader/dist/utils.js
+++ b/node_modules/sass-loader/dist/utils.js
@@ -92,8 +92,8 @@ function isProductionLikeMode(loaderContext) {

function proxyCustomImporters(importers, loaderContext) {
return [].concat(importers).map(importer => function proxyImporter(...args) {
- this.webpackLoaderContext = loaderContext;
- return importer.apply(this, args);
+ const self = { ...this, webpackLoaderContext: loaderContext }
+ return importer.apply(self, args);
});
}
/**
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
const path = require('path');
const ts = require('typescript');
const AngularCompilerPlugin = require('@ngtools/webpack').AngularCompilerPlugin;
const AngularCompilerPlugin = require('@ngtools/webpack').AngularWebpackPlugin;
const readConfiguration = require('@angular/compiler-cli').readConfiguration;
const ES6_ONLY_THIRD_PARTY_LIST = require('./es6-only-third-party-list');

function getAngularCompilerTsConfigPath(config) {
const angularCompilerPlugin = config.plugins.filter(plugin => plugin instanceof AngularCompilerPlugin).pop();
if (angularCompilerPlugin) {
return angularCompilerPlugin.options.tsConfigPath;
return angularCompilerPlugin.pluginOptions.tsconfig;
}
return undefined;
}
Expand All @@ -17,7 +17,7 @@ function getTsconfigCompileTarget(tsconfigPath) {
}

function webpackConfigAddBabel2ES5(config, list = []) {
const tsconfigPath = getAngularCompilerTsConfigPath(config) || 'tsconfig.base.json';
const tsconfigPath = getAngularCompilerTsConfigPath(config) || 'tsconfig.json';
const target = getTsconfigCompileTarget(tsconfigPath);
if (target === ts.ScriptTarget.ES5) {
config.module.rules.push({
Expand Down
12 changes: 6 additions & 6 deletions scripts/less-importer/webpack-config-less-loader-importer.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
const AngularCompilerPlugin = require('@ngtools/webpack').AngularCompilerPlugin;
const AngularCompilerPlugin = require('@ngtools/webpack').AngularWebpackPlugin;
const pathAlias = require('./get-path-alias-from-tsconfig');

function getAngularCompilerTsConfigPath(config) {
const angularCompilerPlugin = config.plugins.filter(plugin => plugin instanceof AngularCompilerPlugin).pop();
if (angularCompilerPlugin) {
return angularCompilerPlugin.options.tsConfigPath;
return angularCompilerPlugin.pluginOptions.tsconfig;
}
return undefined;
}
function webpackConfigSassImporterAlias(config) {
const tsconfigPath = getAngularCompilerTsConfigPath(config) || 'tsconfig.base.json';
const tsconfigPath = getAngularCompilerTsConfigPath(config) || 'tsconfig.json';
[{
ruleTest: /\.less$/,
ruleTest: /\.(?:less)$/i,
loaderName: 'less-loader'
}].forEach(({ruleTest, loaderName}) => {
config.module.rules.filter(rule => rule.test + '' === ruleTest + '').forEach((styleRule) => {
if (styleRule) {
var insertPosition = styleRule.use.findIndex(loaderUse => loaderUse.loader === loaderName
var insertPosition = styleRule.rules[1].use.findIndex(loaderUse => loaderUse.loader === loaderName
|| loaderUse.loader === require.resolve(loaderName));
if (insertPosition > -1) {
styleRule.use.splice(insertPosition + 1, 0, {
styleRule.rules[1].use.splice(insertPosition + 1, 0, {
loader: require.resolve('./less-alias-replacer-loader'),
options: {
aliasMap: pathAlias(tsconfigPath)
Expand Down
16 changes: 10 additions & 6 deletions scripts/sass-importer/webpack-config-sass-loader-importer.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
const AngularCompilerPlugin = require('@ngtools/webpack').AngularCompilerPlugin;
const AngularCompilerPlugin = require('@ngtools/webpack').AngularWebpackPlugin;
const getTsConfigAlias = require('./get-tsconfig-alias');

function getAngularCompilerTsConfigPath(config) {
const angularCompilerPlugin = config.plugins.filter(plugin => plugin instanceof AngularCompilerPlugin).pop();
if (angularCompilerPlugin) {
return angularCompilerPlugin.options.tsConfigPath;
return angularCompilerPlugin.pluginOptions.tsconfig;
}
return undefined;
}
function webpackConfigSassImporterAlias(config) {
const tsconfigPath = getAngularCompilerTsConfigPath(config) || 'tsconfig.base.json';
const tsconfigPath = getAngularCompilerTsConfigPath(config) || 'tsconfig.json';
[{
ruleTest: /\.scss$|\.sass$/,
ruleTest: /\.(?:sass)$/i,
loaderName: 'sass-loader'
},
{
ruleTest: /\.(?:scss)$/i,
loaderName: 'sass-loader'
}].forEach(({ruleTest, loaderName}) => {
config.module.rules.filter(rule => rule.test + '' === ruleTest + '').forEach((styleRule) => {
if (styleRule) {
var insertPosition = styleRule.use.findIndex(loaderUse => loaderUse.loader === loaderName
var insertPosition = styleRule.rules[1].use.findIndex(loaderUse => loaderUse.loader === loaderName
|| loaderUse.loader === require.resolve(loaderName));
if (insertPosition > -1) {
styleRule.use[insertPosition].options.sassOptions.importer = [
styleRule.rules[1].use[insertPosition].options.sassOptions.importer = [
getTsConfigAlias(tsconfigPath)
];
}
Expand Down
17 changes: 11 additions & 6 deletions scripts/themeable/webpack-config-add-theme.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
function webpackConfigAddThemeSupportForIE(config) {
[{
ruleTest: /\.scss$|\.sass$/,
ruleTest: /\.(?:sass)$/i,
loaderName: 'sass-loader'
}, {
ruleTest: /\.less$/,
},
{
ruleTest: /\.(?:scss)$/i,
loaderName: 'sass-loader'
},
{
ruleTest: /\.(?:less)$/i,
loaderName: 'less-loader'
}].forEach(({ ruleTest, loaderName }) => {
config.module.rules.filter(rule => rule.test + '' === ruleTest + '').forEach((styleRule) => {
if (styleRule) {
var insertPosition = styleRule.use.findIndex(loaderUse => loaderUse.loader === loaderName
var insertPosition = styleRule.rules[1].use.findIndex(loaderUse => loaderUse.loader === loaderName
|| loaderUse.loader === require.resolve(loaderName));
if (insertPosition > -1) {
styleRule.use.splice(insertPosition, 0, {
styleRule.rules[1].use.splice(insertPosition, 0, {
loader: 'postcss-loader',
options: {
sourceMap: styleRule.use[insertPosition].options.sourceMap,
sourceMap: styleRule.rules[1].use[insertPosition].options.sourceMap,
postcssOptions: {
plugins: [
require('./add-origin-varvalue'),
Expand Down
2 changes: 1 addition & 1 deletion src/app/component/getStarted-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

### Angular版本

当前支持的Angular版本 <font color=red>`^11.0.0`</font>
当前支持的Angular版本 <font color=red>`^12.0.0-beta.1`</font>

### 1. 创建一个项目

Expand Down
2 changes: 1 addition & 1 deletion src/app/component/getStarted-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ For details about how to use this function, see the following StackBlitz demonst

### Angular version

The supported Angular version is <font color=red>`^11.0.0`</font>.
The supported Angular version is <font color=red>`^12.0.0-beta.1`</font>.

### 1. Create a project

Expand Down
2 changes: 1 addition & 1 deletion src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ export const environment = {
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
2 changes: 1 addition & 1 deletion src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
import 'zone.js'; // Included with Angular CLI.

/***************************************************************************************************
* APPLICATION IMPORTS
Expand Down
2 changes: 1 addition & 1 deletion src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { getTestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
import 'zone.js/dist/zone-testing';
import 'zone.js/testing';

declare const require: any;

Expand Down

0 comments on commit 9ffa4e6

Please sign in to comment.