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

[IDEA] have libs as bundled packages #64

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
have libs as bundled packages
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
jkowalleck committed Jun 8, 2022
commit 88db080c4e823c3b9216f18dc432b26dd9070db1
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -29,6 +29,9 @@ module.exports = {
parserOptions: {
project: './tsconfig.json'
},
ignorePatterns: [
'packages'
],
env: {
node: true,
browser: true
2 changes: 2 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -106,3 +106,5 @@ jobs:
run: npm run test:node
# test-web:
# TODO via https://github.com/CycloneDX/cyclonedx-javascript-library/issues/51

# TODO test for packages - maybe just `npm ci && npm test` in a matrix?
1 change: 0 additions & 1 deletion .mocharc.js
Original file line number Diff line number Diff line change
@@ -26,7 +26,6 @@ Copyright (c) OWASP Foundation. All Rights Reserved.
module.exports = {
spec: [
'tests',
'libs'
],
recursive: true,
parallel: false, // if true, then some IDEs cannot run it
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -170,5 +170,7 @@ dist

/examples/

/packages/

/reports/
/CI_reports/
23 changes: 23 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -37,7 +37,11 @@
"engines": {
"node": ">=14.0.0"
},
"bundleDependencies": [
"@cyclonedx/cyclonedx-library-universal-node-xml"
],
"dependencies": {
"@cyclonedx/cyclonedx-library-universal-node-xml": "file:packages/universal-node-xml",
"packageurl-js": "^0.0.6"
},
"optionalDependencies": {
File renamed without changes.
File renamed without changes.
39 changes: 39 additions & 0 deletions packages/universal-node-xml/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "@cyclonedx/cyclonedx-library-universal-node-xml",
"description": "Universal XML lib",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/CycloneDX/cyclonedx-javascript-library"
},
"bugs": {
"url": "https://github.com/CycloneDX/cyclonedx-javascript-library/issues"
},
"license": "Apache-2.0",
"author": {
"name": "Jan Kowalleck",
"email": "jan.kowalleck@gmail.com"
},
"contributors": [
{
"name": "Jan Kowalleck",
"email": "jan.kowalleck@gmail.com"
}
],
"type": "commonjs",
"optionalDependencies": {
"xmlbuilder2": "^3.0.2"
},
"devDependencies": {
"xmlbuilder2": "^3.0.2"
},
"types": "./index.d.ts",
"main": "./index.js",
"exports": "./index.js",
"files": [
"index.*",
"stringifiers/*.js",
"!stringifiers/*.spec.js",
"!stringifiers/*.test.js"
]
}
2 changes: 1 addition & 1 deletion src/serialize/xmlSerializer.node.ts
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ Copyright (c) OWASP Foundation. All Rights Reserved.
import { SerializerOptions } from './types'
import { XmlBaseSerializer } from './xmlBaseSerializer'
import { SimpleXml } from './xml/types'
import { stringifyFallback } from '../../libs/universal-node-xml'
import { stringifyFallback } from '@cyclonedx/cyclonedx-library-universal-node-xml'

/**
* XML serializer for node.