Skip to content

Commit

Permalink
chore: add optional dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
barmac committed Jul 17, 2023
1 parent 3948b38 commit 009fa7c
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 9 deletions.
38 changes: 38 additions & 0 deletions THIRD_PARTY_NOTICES
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ This project incorporates components from the projects listed below. The origina
243. @bpmn-io/element-template-chooser@1.0.0 (https://github.com/bpmn-io/element-template-chooser.git)
244. @bpmn-io/element-template-icon-renderer@0.5.1 (git+ssh://git@github.com/bpmn-io/element-template-icon-renderer.git)
245. @camunda/example-data-properties-provider@1.1.1
246. vscode-windows-ca-certs@0.3.0 (git+https://github.com/Microsoft/vscode-windows-ca-certs.git)


%% @sentry/node@7.57.0 NOTICES AND INFORMATION BEGIN HERE
Expand Down Expand Up @@ -8070,3 +8071,40 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
==========================================
END OF @camunda/example-data-properties-provider@1.1.1 NOTICES AND INFORMATION


%% vscode-windows-ca-certs@0.3.0 NOTICES AND INFORMATION BEGIN HERE
==========================================
BSD 3-Clause License

Copyright (c) 2016, Stas Ukolov
Copyright (c) Microsoft Corporation

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
==========================================
END OF vscode-windows-ca-certs@0.3.0 NOTICES AND INFORMATION
9 changes: 8 additions & 1 deletion tasks/license-book-handlers/collect-licenses.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,19 @@

const collectAppDependencies = require('./collect-app-dependencies');
const collectClientDependencies = require('./collect-client-dependencies');
const optionalDependencies = require('./optional-dependencies');

module.exports = async function() {
const deps = await Promise.all([
collectAppDependencies(),
collectClientDependencies()
]);

return deps.flat(1);
return addIfNotPresent(deps.flat(1), optionalDependencies);
};

function addIfNotPresent(arr, toAdd) {
const missing = toAdd.filter(d => !arr.find(a => a.packageJson.name === d.packageJson.name));

return arr.concat(missing);
}
1 change: 0 additions & 1 deletion tasks/license-book-handlers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/

module.exports = {
collectClientDependencies: require('./collect-client-dependencies'),
collectLicenses: require('./collect-licenses'),
createLicenseBook: require('./create-license-book'),
generateSummary: require('./generate-summary'),
Expand Down
57 changes: 57 additions & 0 deletions tasks/license-book-handlers/optional-dependencies.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/**
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
* under one or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information regarding copyright
* ownership.
*
* Camunda licenses this file to you under the MIT; you may not use this file
* except in compliance with the MIT License.
*/

/**
* For platform-specific dependencies, we need to collect the information here.
*/
module.exports = [
{
'licenseId': 'BSD-3-Clause',
'licenseText': `BSD 3-Clause License
Copyright (c) 2016, Stas Ukolov
Copyright (c) Microsoft Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.`,
'packageJson': {
'name': 'vscode-windows-ca-certs',
'repository': {
'type': 'git',
'url': 'git+https://github.com/Microsoft/vscode-windows-ca-certs.git'
},
'version': '0.3.0'
}
}
];
8 changes: 1 addition & 7 deletions tasks/send-license-book-summary.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const { Diff2Html: diff2html } = require('diff2html');
const mri = require('mri');

const {
collectClientDependencies,
collectLicenses,
generateSummary,
processLicenses
Expand Down Expand Up @@ -141,12 +140,7 @@ function getPreviousVersion() {
}

async function getSummary() {
const clientDependencies = collectClientDependencies();

const combinedLicenses = await collectLicenses(
{ name: 'app' },
{ name: 'client', filter: name => clientDependencies[name] }
);
const combinedLicenses = await collectLicenses();

const {
processedLicenses
Expand Down

0 comments on commit 009fa7c

Please sign in to comment.