Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

css variables api next #727

Closed
wants to merge 59 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
80f963d
[INTERNAL] Enable CI for branches next, main
RandomByte Nov 23, 2021
7207bab
[INTERNAL] Bump @ui5/logger from 2.0.1 to 3.0.0-next.0
RandomByte Nov 29, 2021
0e11b69
[FIX] Bundler: Sort raw modules by default
matz3 Nov 26, 2021
ea1b022
[INTERNAL] Enhance replaceVersion task to handle ${project.version} p…
larskissel Dec 2, 2021
34f3c2e
[INTERNAL] Enable buildThemes for libraries without .library
larskissel Nov 29, 2021
b84d263
In-range update of npm dependencies
RandomByte Dec 14, 2021
a9992d0
[INTERNAL] Bump @ui5/logger from 3.0.0-next.0 to 3.0.0-alpha.0
RandomByte Dec 14, 2021
b0bce28
[INTERNAL] Bump @ui5/fs from 2.0.6 to 3.0.0-alpha.0
RandomByte Dec 14, 2021
995587e
Release 3.0.0-alpha.0
RandomByte Dec 14, 2021
9a76541
[INTERNAL] Bump @ui5/logger from 3.0.0-alpha.0 to 3.0.1-alpha.0
RandomByte Dec 14, 2021
c110dbc
[INTERNAL] Bump @ui5/fs from 3.0.0-alpha.0 to 3.0.0-alpha.1
RandomByte Jan 13, 2022
a3af604
[FEATURE] Add minify task and processor (#666)
RandomByte Jan 17, 2022
04072a2
In-range update of npm dependencies
RandomByte Jan 17, 2022
9744c15
In-range update of npm dependencies
RandomByte Jan 19, 2022
02f9160
[INTERNAL] Align JSdoc generation with npm 8 workspace setup
RandomByte Dec 16, 2021
f27513a
[FIX] generateResourcesJson: Analyze debug bundles (#669)
matz3 Jan 20, 2022
de5837c
[BREAKING] moduleBundler: Always default to `optimize: true` (#685)
matz3 Jan 20, 2022
f84bcf2
[INTERNAL] Fix tests failing in npm workspace environment
RandomByte Jan 21, 2022
1689f13
[INTERNAL] minify: Omit .js.map from build results
matz3 Jan 18, 2022
9608c51
[FIX] generateResourcesJson: Don't list resources omitted from build …
matz3 Jan 19, 2022
23fa5a7
[INTERNAL] Update tests
matz3 Jan 20, 2022
268dd16
[BREAKING] generateResourcesJson: Make 'dependencies' parameter manda…
matz3 Jan 20, 2022
26084d1
In-range update of npm dependencies
RandomByte Jan 21, 2022
dbf6c06
[BREAKING] Require Node.js >= 16.13.2 / npm >= 8
matz3 Jan 24, 2022
50e2c7c
[INTERNAL] Upgrade ESlint / Use ES2021
matz3 Jan 24, 2022
e749b6a
[FEATURE] Support ES2021 language features
matz3 Jan 24, 2022
6f4588b
[FIX] Bundler: Ensure reproducibility for bundles with multiple parts…
matz3 Jan 25, 2022
4427686
In-range update of npm dependencies
RandomByte Jan 25, 2022
d25290c
[INTERNAL] Bump @ui5/logger from 3.0.1-alpha.0 to 3.0.1-alpha.1
matz3 Jan 25, 2022
0188af5
[INTERNAL] Bump @ui5/fs from 3.0.0-alpha.1 to 3.0.0-alpha.2
matz3 Jan 25, 2022
fa628b5
Release 3.0.0-alpha.1
matz3 Jan 25, 2022
034dd43
[INTERNAL] npm release: Add missing CHANGELOG file
matz3 Jan 28, 2022
a0d4bc2
[FEATURE] replaceVersion/Copyright: Also process test-resources (#693)
matz3 Feb 14, 2022
3b51c1b
[INTERNAL] Upgrade espree to v9.3.1
matz3 Feb 22, 2022
8a20c42
[FEATURE] Generate source maps for bundles (#695)
RandomByte Feb 23, 2022
37e1e3c
In-range update of npm dependencies
RandomByte Feb 23, 2022
af075ed
[FIX] XMLTemplateAnalyzer: Analyze core:require of FragmentDefinition
matz3 Feb 9, 2022
0c9fec6
[INTERNAL] Remove unused expected build results
matz3 Feb 23, 2022
6b84314
[INTERNAL] git-chglog: Fix mutli-release-branch setup
RandomByte Feb 24, 2022
e599806
[INTERNAL] generateFlexChangesBundle: Fix minUI5Version check for UI5…
thuyboehm Feb 21, 2022
9955a0c
Release 3.0.0-alpha.2
RandomByte Feb 25, 2022
1b7f93f
[FIX] LocatorResourcePool: Wait for resources in prepare step (#719)
flovogt Mar 9, 2022
a43f9ba
In-range update of npm dependencies
RandomByte Mar 9, 2022
860b392
[INTERNAL] minify task: Add more test cases
matz3 Feb 24, 2022
23e4752
[INTERNAL] moduleBundler: Fix JSDoc returns type
matz3 Feb 24, 2022
6ce2d6f
[INTERNAL] Remove unused commented code
matz3 Feb 24, 2022
f63a1d7
[INTERNAL] generateBundle: Add unit test
matz3 Feb 24, 2022
77a59d8
[INTERNAL] moduleBundler: Fix 'sourceMap' option default
matz3 Feb 25, 2022
debcb9e
[INTERNAL] minifier: Add missing 'options' parameter
matz3 Feb 25, 2022
8b09c64
[INTERNAL] generateBundle: Fix empty bundle, add more tests
matz3 Feb 25, 2022
7e05d64
[INTERNAL] generateBundle: Fix ReaderCollection name
matz3 Feb 25, 2022
4132eee
[INTERNAL] generateBundle: Add test for exception
matz3 Feb 25, 2022
34399d8
[INTERNAL] Enhance generateStandaloneAppBundle tests
matz3 Mar 8, 2022
3e43342
[INTERNAL] Add tests for error handling
matz3 Mar 9, 2022
35cebf1
[INTERNAL] Refactor code to create moduleNameMapping
matz3 Mar 9, 2022
daa2943
[INTERNAL] minifier: Adopt default param handling
matz3 Mar 10, 2022
81c00cf
[INTERNAL] replaceVersion: Also process css files
matz3 Mar 10, 2022
ebb93f5
Release 3.0.0-alpha.3
matz3 Mar 10, 2022
f11ffa9
[FEAT]: enable build with CSS variables
flovogt Mar 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .chglog/release-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ template: RELEASE.tpl.md
info:
repository_url: https://github.com/SAP/ui5-builder
options:
tag_filter_pattern: '^v[^012]' # For release notes ignore versions below v3 to that we always compare the _last v3+_ tag with the current release
commits:
filters:
Type:
Expand Down
9 changes: 4 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
module.exports = {
"env": {
"node": true,
"es6": true
},
"parserOptions": {
"ecmaVersion": 8
"es2021": true
},
"extends": ["eslint:recommended", "google"],
"plugins": [
Expand Down Expand Up @@ -48,7 +45,9 @@ module.exports = {
"valid-jsdoc": 0,
// jsdoc/check-examples is temporarily set to "warn" as the rule causes issues in our CI
// See: https://github.com/gajus/eslint-plugin-jsdoc/issues/508
"jsdoc/check-examples": 1,
// Starting with ESLint v8, it needs to be disabled as it currently can't be supported
// See: https://github.com/eslint/eslint/issues/14745
"jsdoc/check-examples": 0,
"jsdoc/check-param-names": 2,
"jsdoc/check-tag-names": 2,
"jsdoc/check-types": 2,
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@ name: "CodeQL"

on:
push:
branches: [ master ]
branches:
- master
- main
- next
pull_request:
branches: [ master ]
branches:
- master
- main
- next

# Execute at least once per week to get new findings without active development taking place
schedule:
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@ name: GitHub CI

on:
push:
branches: [ master ]
branches:
- master
- main
- next
pull_request:
branches: [ master ]
branches:
- master
- main
- next

jobs:
test:
Expand All @@ -14,10 +20,10 @@ jobs:

- uses: actions/checkout@v2

- name: Use Node.js LTS 14.x
- name: Use Node.js LTS 16.x
uses: actions/setup-node@v2.4.1
with:
node-version: 14.x
node-version: 16.x

- name: Install dependencies
run: npm ci
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/reuse-compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@ name: REUSE

on:
push:
branches: [ master ]
branches:
- master
- main
- next
pull_request:
branches: [ master ]
branches:
- master
- main
- next

jobs:
compliance-check:
Expand Down
66 changes: 65 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,67 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

A list of unreleased changes can be found [here](https://github.com/SAP/ui5-builder/compare/v2.11.2...HEAD).
A list of unreleased changes can be found [here](https://github.com/SAP/ui5-builder/compare/v3.0.0-alpha.3...HEAD).

<a name="v3.0.0-alpha.3"></a>
## [v3.0.0-alpha.3] - 2022-03-10
### Bug Fixes
- **LocatorResourcePool:** Wait for resources in prepare step ([#719](https://github.com/SAP/ui5-builder/issues/719)) [`1b7f93f`](https://github.com/SAP/ui5-builder/commit/1b7f93f4988340d7a6575be3191a02e6c295ebd0)


<a name="v3.0.0-alpha.2"></a>
## [v3.0.0-alpha.2] - 2022-02-25
### Bug Fixes
- **XMLTemplateAnalyzer:** Analyze core:require of FragmentDefinition [`af075ed`](https://github.com/SAP/ui5-builder/commit/af075edf784d9f1ba162a34f0bf150dbcbc0f479)

### Features
- Generate source maps for bundles ([#695](https://github.com/SAP/ui5-builder/issues/695)) [`8a20c42`](https://github.com/SAP/ui5-builder/commit/8a20c4257a1ebe4d613b0595be93cd45d900f580)
- **replaceVersion/Copyright:** Also process test-resources ([#693](https://github.com/SAP/ui5-builder/issues/693)) [`a0d4bc2`](https://github.com/SAP/ui5-builder/commit/a0d4bc2a80d61e042786207af4bdbda6c3ddfe31)


<a name="v3.0.0-alpha.1"></a>
## [v3.0.0-alpha.1] - 2022-01-25
### Breaking Changes
- Require Node.js >= 16.13.2 / npm >= 8 [`dbf6c06`](https://github.com/SAP/ui5-builder/commit/dbf6c0694693070f73e9f96edef90f094d5bf721)
- **generateResourcesJson:** Make 'dependencies' parameter mandatory [`268dd16`](https://github.com/SAP/ui5-builder/commit/268dd16091c515ec0c922ea23af437d9aa8bf3ea)
- **moduleBundler:** Always default to `optimize: true` ([#685](https://github.com/SAP/ui5-builder/issues/685)) [`de5837c`](https://github.com/SAP/ui5-builder/commit/de5837c43449ea61deae3b2f02f9973f3fa37992)

### Bug Fixes
- **Bundler:** Ensure reproducibility for bundles with multiple parts ([#689](https://github.com/SAP/ui5-builder/issues/689)) [`6f4588b`](https://github.com/SAP/ui5-builder/commit/6f4588b3eb687178e557ac4fb36481104f9681a0)
- **generateResourcesJson:** Don't list resources omitted from build result [`9608c51`](https://github.com/SAP/ui5-builder/commit/9608c5177f86494ba689d2e799b4378fec9ed6fa)
- **generateResourcesJson:** Analyze debug bundles ([#669](https://github.com/SAP/ui5-builder/issues/669)) [`f27513a`](https://github.com/SAP/ui5-builder/commit/f27513a259b30d39e260790781b6d435b4ab088b)

### Features
- Support ES2021 language features [`e749b6a`](https://github.com/SAP/ui5-builder/commit/e749b6ae0838f923b27dd0d7d34da2174c433f5f)
- Add minify task and processor ([#666](https://github.com/SAP/ui5-builder/issues/666)) [`a3af604`](https://github.com/SAP/ui5-builder/commit/a3af604ff0a12fb9241dcd105cf0aec8d718a299)

### BREAKING CHANGE

Support for older Node.js and npm releases has been dropped.
Only Node.js v16.13.2 and npm v8 or higher are supported.

The following tasks have been removed:
- createDebugFiles
- uglify

The following processors have been removed:
- debugFileCreator
- resourceCopier
- uglifier

As a replacement, the new 'minify' task and 'minifier' processor can be
used.

Note: The minify task is executed earlier, before the bundling
process takes place. Existing 'beforeTask' and 'afterTask' configuration of
custom tasks might need to be adapted to cater for this change.


<a name="v3.0.0-alpha.0"></a>
## [v3.0.0-alpha.0] - 2021-12-14
### Bug Fixes
- **Bundler:** Sort raw modules by default [`0e11b69`](https://github.com/SAP/ui5-builder/commit/0e11b6965a1d2e63a96e9b738e38975b5ac755bc)


<a name="v2.11.2"></a>
## [v2.11.2] - 2021-11-17
Expand Down Expand Up @@ -633,6 +693,10 @@ to load the custom bundle file instead.
- Add ability to configure component preloads and custom bundles [`2241e5f`](https://github.com/SAP/ui5-builder/commit/2241e5ff98fd95f1f80cc74959655ae7a9c660e7)


[v3.0.0-alpha.3]: https://github.com/SAP/ui5-builder/compare/v3.0.0-alpha.2...v3.0.0-alpha.3
[v3.0.0-alpha.2]: https://github.com/SAP/ui5-builder/compare/v3.0.0-alpha.1...v3.0.0-alpha.2
[v3.0.0-alpha.1]: https://github.com/SAP/ui5-builder/compare/v3.0.0-alpha.0...v3.0.0-alpha.1
[v3.0.0-alpha.0]: https://github.com/SAP/ui5-builder/compare/v2.11.2...v3.0.0-alpha.0
[v2.11.2]: https://github.com/SAP/ui5-builder/compare/v2.11.1...v2.11.2
[v2.11.1]: https://github.com/SAP/ui5-builder/compare/v2.11.0...v2.11.1
[v2.11.0]: https://github.com/SAP/ui5-builder/compare/v2.10.0...v2.11.0
Expand Down
20 changes: 7 additions & 13 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,18 @@ trigger:

strategy:
matrix:
linux_node_10:
linux_node_lts_16:
imageName: 'ubuntu-20.04'
node_version: 10.x
linux_node_lts_12:
imageName: 'ubuntu-20.04'
node_version: 12.x
linux_node_lts_14:
imageName: 'ubuntu-20.04'
node_version: 14.x
node_version: 16.x
linux_node_latest:
imageName: 'ubuntu-20.04'
node_version: 16.x
node_version: 17.x
mac_node_latest:
imageName: 'macOS-10.15'
node_version: 16.x
imageName: 'macOS-11'
node_version: 17.x
windows_node_latest:
imageName: 'windows-2019'
node_version: 16.x
imageName: 'windows-2022'
node_version: 17.x

pool:
vmImage: $(imageName)
Expand Down
20 changes: 4 additions & 16 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ module.exports = {
*/
bootstrapHtmlTransformer: "./lib/processors/bootstrapHtmlTransformer",
/**
* @type {import('./lib/processors/debugFileCreator')}
* @type {import('./lib/processors/minifier')}
*/
debugFileCreator: "./lib/processors/debugFileCreator",
minifier: "./lib/processors/minifier",
/**
* @type {import('./lib/processors/libraryLessGenerator')}
*/
Expand All @@ -53,10 +53,6 @@ module.exports = {
* @type {import('./lib/processors/manifestCreator')}
*/
manifestCreator: "./lib/processors/manifestCreator",
/**
* @type {import('./lib/processors/resourceCopier')}
*/
resourceCopier: "./lib/processors/resourceCopier",
/**
* @type {import('./lib/processors/nonAsciiEscaper')}
*/
Expand All @@ -69,10 +65,6 @@ module.exports = {
* @type {import('./lib/processors/themeBuilder')}
*/
themeBuilder: "./lib/processors/themeBuilder",
/**
* @type {import('./lib/processors/uglifier')}
*/
uglifier: "./lib/processors/uglifier",
/**
* @type {import('./lib/processors/versionInfoGenerator')}
*/
Expand Down Expand Up @@ -121,9 +113,9 @@ module.exports = {
*/
buildThemes: "./lib/tasks/buildThemes",
/**
* @type {import('./lib/tasks/createDebugFiles')}
* @type {import('./lib/tasks/minify')}
*/
createDebugFiles: "./lib/tasks/createDebugFiles",
minify: "./lib/tasks/minify",
/**
* @type {import('./lib/tasks/jsdoc/executeJsdocSdkTransformation')}
*/
Expand Down Expand Up @@ -160,10 +152,6 @@ module.exports = {
* @type {import('./lib/tasks/transformBootstrapHtml')}
*/
transformBootstrapHtml: "./lib/tasks/transformBootstrapHtml",
/**
* @type {import('./lib/tasks/uglify')}
*/
uglify: "./lib/tasks/uglify",
/**
* @type {import('./lib/tasks/taskRepository')}
*/
Expand Down
1 change: 0 additions & 1 deletion jsdoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"./jsdoc-plugin"
],
"opts": {
"template": "node_modules/docdash/",
"encoding": "utf8",
"destination": "jsdocs/",
"recurse": true,
Expand Down
23 changes: 22 additions & 1 deletion lib/builder/BuildContext.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,44 @@
const ResourceTagCollection = require("@ui5/fs").ResourceTagCollection;
const ProjectBuildContext = require("./ProjectBuildContext");

// Note: When adding standard tags, always update the public documentation in TaskUtil
// (Type "module:@ui5/builder.tasks.TaskUtil~StandardBuildTags")
const GLOBAL_TAGS = Object.freeze({
IsDebugVariant: "ui5:IsDebugVariant",
HasDebugVariant: "ui5:HasDebugVariant",
});

/**
* Context of a build process
*
* @private
* @memberof module:@ui5/builder.builder
*/
class BuildContext {
constructor({rootProject}) {
constructor({rootProject, options = {}}) {
if (!rootProject) {
throw new Error(`Missing parameter 'rootProject'`);
}
this.rootProject = rootProject;
this.projectBuildContexts = [];
this._resourceTagCollection = new ResourceTagCollection({
allowedTags: Object.values(GLOBAL_TAGS)
});
this.options = options;
}

getRootProject() {
return this.rootProject;
}

getOption(key) {
return this.options[key];
}

createProjectContext({project, resources}) {
const projectBuildContext = new ProjectBuildContext({
buildContext: this,
globalTags: GLOBAL_TAGS,
project,
resources
});
Expand All @@ -34,6 +51,10 @@ class BuildContext {
return ctx.executeCleanupTasks();
}));
}

getResourceTagCollection() {
return this._resourceTagCollection;
}
}

module.exports = BuildContext;
20 changes: 13 additions & 7 deletions lib/builder/ProjectBuildContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ const ResourceTagCollection = require("@ui5/fs").ResourceTagCollection;

// Note: When adding standard tags, always update the public documentation in TaskUtil
// (Type "module:@ui5/builder.tasks.TaskUtil~StandardBuildTags")
const STANDARD_TAGS = Object.freeze({
const STANDARD_TAGS = {
OmitFromBuildResult: "ui5:OmitFromBuildResult",
IsBundle: "ui5:IsBundle"
});
IsBundle: "ui5:IsBundle",
};

/**
* Build context of a single project. Always part of an overall
Expand All @@ -15,8 +15,8 @@ const STANDARD_TAGS = Object.freeze({
* @memberof module:@ui5/builder.builder
*/
class ProjectBuildContext {
constructor({buildContext, project, resources}) {
if (!buildContext || !project || !resources) {
constructor({buildContext, globalTags, project, resources}) {
if (!buildContext || !globalTags || !project || !resources) {
throw new Error(`One or more mandatory parameters are missing`);
}
this._buildContext = buildContext;
Expand All @@ -26,17 +26,23 @@ class ProjectBuildContext {
cleanup: []
};

this.STANDARD_TAGS = STANDARD_TAGS;
this.STANDARD_TAGS = Object.assign({}, STANDARD_TAGS, globalTags);
Object.freeze(this.STANDARD_TAGS);

this._resourceTagCollection = new ResourceTagCollection({
allowedTags: Object.values(this.STANDARD_TAGS)
allowedTags: Object.values(this.STANDARD_TAGS),
superCollection: this._buildContext.getResourceTagCollection()
});
}

isRootProject() {
return this._project === this._buildContext.getRootProject();
}

getOption(key) {
return this._buildContext.getOption(key);
}

registerCleanupTask(callback) {
this.queues.cleanup.push(callback);
}
Expand Down
Loading