From 074953d5e531d8a58a785093895c491388182e30 Mon Sep 17 00:00:00 2001 From: Kevin Pearson Date: Wed, 15 Nov 2023 12:13:14 -0800 Subject: [PATCH 1/7] chore: Improve documentation formatting --- package-lock.json | 10 ++++++---- package.json | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1702fd31c..3587d8be1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "devDependencies": { "@commitlint/cli": "^17.0.3", "@commitlint/config-conventional": "^17.0.3", - "@firebolt-js/openrpc": "2.1.1", + "@firebolt-js/openrpc": "rdkcentral/firebolt-openrpc#doc-formatting-improvements", "@firebolt-js/schemas": "2.0.0", "@saithodev/semantic-release-backmerge": "^3.2.0", "@semantic-release/changelog": "^6.0.1", @@ -1070,10 +1070,10 @@ "link": true }, "node_modules/@firebolt-js/openrpc": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@firebolt-js/openrpc/-/openrpc-2.1.1.tgz", - "integrity": "sha512-rWwb23ehZpKMQS8TJZiyKo6ziF1Zae/tgDXprTwuwF6vPhHV6vgb/HO1M6o+YI54VDEPDozHCL+IhN+KkT9ucw==", + "version": "2.1.1-next.3", + "resolved": "git+ssh://git@github.com/rdkcentral/firebolt-openrpc.git#769818f35e599cfb7d18f6a362be1777a6603b51", "dev": true, + "license": "Apache-2.0", "dependencies": { "ajv": "^8.3.0", "ajv-formats": "^2.1.0", @@ -16935,6 +16935,7 @@ } }, "src/sdks/core": { + "name": "@firebolt-js/sdk", "version": "1.0.0", "license": "Apache-2.0", "devDependencies": { @@ -16944,6 +16945,7 @@ } }, "src/sdks/manage": { + "name": "@firebolt-js/manage-sdk", "version": "1.0.0", "license": "Apache-2.0", "devDependencies": { diff --git a/package.json b/package.json index 0edb3d3f6..7aeb7ed39 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "devDependencies": { "@commitlint/cli": "^17.0.3", "@commitlint/config-conventional": "^17.0.3", - "@firebolt-js/openrpc": "2.1.1", + "@firebolt-js/openrpc": "rdkcentral/firebolt-openrpc#doc-formatting-improvements", "@firebolt-js/schemas": "2.0.0", "@saithodev/semantic-release-backmerge": "^3.2.0", "@semantic-release/changelog": "^6.0.1", @@ -67,4 +67,4 @@ "sdk" ], "license": "Apache-2.0" -} +} \ No newline at end of file From 86c4217acdf8be2eec5a0b85ade5f1e3fa238479 Mon Sep 17 00:00:00 2001 From: Kevin Pearson Date: Wed, 15 Nov 2023 13:35:08 -0800 Subject: [PATCH 2/7] chore: Fix docs generated in prs --- .github/workflows/release-github.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-github.yml b/.github/workflows/release-github.yml index ca9131e7d..70fb05bd5 100644 --- a/.github/workflows/release-github.yml +++ b/.github/workflows/release-github.yml @@ -54,7 +54,7 @@ jobs: if: github.ref_name != 'main' && github.ref_name != 'next' && github.event_name == 'pull_request' run: | echo "NPM_DIST_TAG=test" >> $GITHUB_ENV - echo "DOCS_TAG=$(node ./src/js/version.mjs branch-to-prerelease ${{ github.head_ref }})" >> $GITHUB_ENV + echo "DOCS_TAG=pr-$(node ./src/js/version.mjs branch-to-prerelease ${{ github.head_ref }})" >> $GITHUB_ENV echo "FEATURE_BRANCH=${{ github.head_ref }}" >> $GITHUB_ENV - name: Release mono-artifact to GitHub if: (github.ref_name != 'main' && github.event_name != 'pull_request') || github.event_name == 'workflow_dispatch' @@ -100,7 +100,7 @@ jobs: cd /tmp git clone https://rdkcentral:$GITHUB_TOKEN@github.com/rdkcentral/firebolt.git ./firebolt-docs - name: Release docs to GitHub.io - if: steps.check_build.outputs.files_exists == 'true' && (github.ref_name == 'main' || github.ref_name == 'next' || github.event_name != 'pull_request') + if: steps.check_build.outputs.files_exists == 'true' && (github.ref_name == 'main' || github.ref_name == 'next' || github.event_name == 'pull_request') env: GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_PAT }} # <-- Allows semantic-release-bot to push changes to protected branches run: | From b0e2ce1bb987abdc1f428e19d9bb5de8a3f5ae64 Mon Sep 17 00:00:00 2001 From: Kevin Pearson Date: Thu, 16 Nov 2023 13:32:24 -0800 Subject: [PATCH 3/7] chore: Improve documentation formatting --- package.json | 5 +++-- src/sdks/core/package.json | 4 +++- src/sdks/manage/package.json | 4 +++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 7aeb7ed39..60aebbf38 100644 --- a/package.json +++ b/package.json @@ -23,14 +23,15 @@ "test:setup": "npm run test:setup --workspaces", "test": "npm run test:setup && NODE_OPTIONS=--experimental-vm-modules npx --config=jest.config.json --detectOpenHandles jest", "clean": "rm -rf dist && npm run clean --workspaces", - "dist": "npm run fs:setup && npm run validate:each && npm run compile && npm run specification && npm run version && npm run dist:notest --workspaces && npm run test", + "dist": "npm run fs:setup && npm run validate:each && npm run compile && npm run specification && npm run version && npm run dist:notest --workspaces && npm run prettier && npm run test", "specification": "node ./src/js/version-specification/index.mjs --source ./src/json/firebolt-specification.json", "specification:report": "node ./src/js/version-specification/index.mjs --source ./dist/firebolt-specification.json --report", "version": "node ./src/js/version.mjs sync", "dev:setup": "husky install", "publish:docs": "node ./src/js/github.io/index.mjs --output", "release-notes": "npx semantic-release --dry-run --repository-url git@github.com:rdkcentral/firebolt-apis.git --plugins @semantic-release/commit-analyzer,@semantic-release/release-notes-generator", - "prepack": "npm run dist" + "prepack": "npm run dist", + "prettier": "npm run prettier --workspaces" }, "repository": { "type": "git", diff --git a/src/sdks/core/package.json b/src/sdks/core/package.json index 250710d17..fe7a4cce2 100644 --- a/src/sdks/core/package.json +++ b/src/sdks/core/package.json @@ -25,7 +25,8 @@ "test:setup": "rm -rf test/transpiled-suite && npx tsc --target es6 --moduleResolution node --outDir test/transpiled-suite", "test": "npm run test:setup && NODE_OPTIONS=--experimental-vm-modules npx --config=jest.config.json --detectOpenHandles jest", "prepack": "node ../../js/version.mjs validate && npm run broilerplate", - "broilerplate": "rm ./CONTRIBUTING.md && cp ../../../CONTRIBUTING.md ./CONTRIBUTING.md && rm ./LICENSE && cp ../../../LICENSE ./LICENSE && rm ./NOTICE && cp ../../../NOTICE ./NOTICE" + "broilerplate": "rm ./CONTRIBUTING.md && cp ../../../CONTRIBUTING.md ./CONTRIBUTING.md && rm ./LICENSE && cp ../../../LICENSE ./LICENSE && rm ./NOTICE && cp ../../../NOTICE ./NOTICE", + "prettier": "prettier dist/**/*.mjs --write --parser babel && prettier dist/**/*.md --write --parser markdown" }, "repository": { "type": "git", @@ -40,6 +41,7 @@ "devDependencies": { "jest": "^28.1.0", "jest-environment-jsdom": "^28.1.3", + "prettier": "^3.1.0", "typescript": "^4.6.4" }, "keywords": [ diff --git a/src/sdks/manage/package.json b/src/sdks/manage/package.json index 204a0a036..e855947b6 100644 --- a/src/sdks/manage/package.json +++ b/src/sdks/manage/package.json @@ -25,7 +25,8 @@ "test:setup": "rm -rf test/transpiled-suite && npx tsc --target es6 --moduleResolution node --outDir test/transpiled-suite", "test": "npm run test:setup && NODE_OPTIONS=--experimental-vm-modules npx --config=jest.config.json --detectOpenHandles jest", "prepack": "node ../../js/version.mjs validate && npm run broilerplate", - "broilerplate": "rm ./CONTRIBUTING.md && cp ../../../CONTRIBUTING.md ./CONTRIBUTING.md && rm ./LICENSE && cp ../../../LICENSE ./LICENSE && rm ./NOTICE && cp ../../../NOTICE ./NOTICE" + "broilerplate": "rm ./CONTRIBUTING.md && cp ../../../CONTRIBUTING.md ./CONTRIBUTING.md && rm ./LICENSE && cp ../../../LICENSE ./LICENSE && rm ./NOTICE && cp ../../../NOTICE ./NOTICE", + "prettier": "prettier dist/**/*.mjs --write --parser babel && prettier dist/**/*.md --write --parser markdown" }, "repository": { "type": "git", @@ -40,6 +41,7 @@ "devDependencies": { "jest": "^28.1.0", "jest-environment-jsdom": "^28.1.3", + "prettier": "^3.1.0", "typescript": "^4.6.4" }, "keywords": [ From 475ad771f853b2a62d556824c1243606a35963f6 Mon Sep 17 00:00:00 2001 From: Kevin Pearson Date: Thu, 16 Nov 2023 13:33:45 -0800 Subject: [PATCH 4/7] chore: Improve documentation formatting --- .prettierrc.json | 4 ++++ package-lock.json | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 .prettierrc.json diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 000000000..00fbdb185 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,4 @@ +{ + "semi": false, + "singleQuote": true +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 3587d8be1..e88ca860c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10786,6 +10786,21 @@ "node": ">= 0.8.0" } }, + "node_modules/prettier": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz", + "integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/pretty-format": { "version": "28.1.3", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", @@ -16941,6 +16956,7 @@ "devDependencies": { "jest": "^28.1.0", "jest-environment-jsdom": "^28.1.3", + "prettier": "^3.1.0", "typescript": "^4.6.4" } }, @@ -16951,6 +16967,7 @@ "devDependencies": { "jest": "^28.1.0", "jest-environment-jsdom": "^28.1.3", + "prettier": "^3.1.0", "typescript": "^4.6.4" } } From e9f228e31b0b7dbf6f15a424d5ce3b53bf74e159 Mon Sep 17 00:00:00 2001 From: Kevin Pearson Date: Thu, 16 Nov 2023 13:50:19 -0800 Subject: [PATCH 5/7] chore: Improve documentation formatting --- package.json | 5 ++--- src/sdks/core/package.json | 4 ++-- src/sdks/manage/package.json | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 60aebbf38..7aeb7ed39 100644 --- a/package.json +++ b/package.json @@ -23,15 +23,14 @@ "test:setup": "npm run test:setup --workspaces", "test": "npm run test:setup && NODE_OPTIONS=--experimental-vm-modules npx --config=jest.config.json --detectOpenHandles jest", "clean": "rm -rf dist && npm run clean --workspaces", - "dist": "npm run fs:setup && npm run validate:each && npm run compile && npm run specification && npm run version && npm run dist:notest --workspaces && npm run prettier && npm run test", + "dist": "npm run fs:setup && npm run validate:each && npm run compile && npm run specification && npm run version && npm run dist:notest --workspaces && npm run test", "specification": "node ./src/js/version-specification/index.mjs --source ./src/json/firebolt-specification.json", "specification:report": "node ./src/js/version-specification/index.mjs --source ./dist/firebolt-specification.json --report", "version": "node ./src/js/version.mjs sync", "dev:setup": "husky install", "publish:docs": "node ./src/js/github.io/index.mjs --output", "release-notes": "npx semantic-release --dry-run --repository-url git@github.com:rdkcentral/firebolt-apis.git --plugins @semantic-release/commit-analyzer,@semantic-release/release-notes-generator", - "prepack": "npm run dist", - "prettier": "npm run prettier --workspaces" + "prepack": "npm run dist" }, "repository": { "type": "git", diff --git a/src/sdks/core/package.json b/src/sdks/core/package.json index fe7a4cce2..155505b44 100644 --- a/src/sdks/core/package.json +++ b/src/sdks/core/package.json @@ -16,7 +16,7 @@ "slice": "npx firebolt-openrpc slice -i ../../../dist/firebolt-open-rpc.json --sdk ./sdk.config.json -o ./dist/firebolt-core-open-rpc.json", "docs": "npx firebolt-openrpc docs --input ./dist/firebolt-core-open-rpc.json --output build/docs/markdown --as-path", "wiki": "npx firebolt-openrpc docs --input ./dist/firebolt-core-open-rpc.json --output build/docs/markdown", - "dist:notest": "npm run clean && npm run slice && npm run validate && npm run sdk && npm run docs && npm run dist:copy && echo 'Firebolt Core SDK /dist/ is ready.\n'", + "dist:notest": "npm run clean && npm run slice && npm run validate && npm run sdk && npm run docs && npm run prettier && npm run dist:copy && echo 'Firebolt Core SDK /dist/ is ready.\n'", "dist:copy": "npm run dist:copy:sdk && npm run dist:copy:docs", "dist:copy:sdk": "mkdirp ./dist && cp -R build/javascript/src dist/lib && cp ./dist/firebolt-core-open-rpc.json ../../../dist/firebolt-core-open-rpc.json", "dist:copy:docs": "mkdirp ./dist && cp -R build/docs/markdown dist/docs", @@ -26,7 +26,7 @@ "test": "npm run test:setup && NODE_OPTIONS=--experimental-vm-modules npx --config=jest.config.json --detectOpenHandles jest", "prepack": "node ../../js/version.mjs validate && npm run broilerplate", "broilerplate": "rm ./CONTRIBUTING.md && cp ../../../CONTRIBUTING.md ./CONTRIBUTING.md && rm ./LICENSE && cp ../../../LICENSE ./LICENSE && rm ./NOTICE && cp ../../../NOTICE ./NOTICE", - "prettier": "prettier dist/**/*.mjs --write --parser babel && prettier dist/**/*.md --write --parser markdown" + "prettier": "prettier build/**/*.mjs --write --parser babel && prettier build/**/*.md --write --parser markdown" }, "repository": { "type": "git", diff --git a/src/sdks/manage/package.json b/src/sdks/manage/package.json index e855947b6..6e68acfd3 100644 --- a/src/sdks/manage/package.json +++ b/src/sdks/manage/package.json @@ -16,7 +16,7 @@ "slice": "npx firebolt-openrpc slice -i ../../../dist/firebolt-open-rpc.json --sdk ./sdk.config.json -o ./dist/firebolt-manage-open-rpc.json", "docs": "npx firebolt-openrpc docs --input ./dist/firebolt-manage-open-rpc.json --output build/docs/markdown --as-path", "wiki": "npx firebolt-openrpc docs --input ./dist/firebolt-manage-open-rpc.json --output build/docs/markdown", - "dist:notest": "npm run clean && npm run slice && npm run validate && npm run sdk && npm run docs && npm run dist:copy && echo 'Firebolt Manage SDK /dist/ is ready.\n'", + "dist:notest": "npm run clean && npm run slice && npm run validate && npm run sdk && npm run docs && npm run prettier && npm run dist:copy && echo 'Firebolt Manage SDK /dist/ is ready.\n'", "dist:copy": "npm run dist:copy:sdk && npm run dist:copy:docs", "dist:copy:sdk": "mkdirp ./dist && cp -R build/javascript/src dist/lib && cp ./dist/firebolt-manage-open-rpc.json ../../../dist/firebolt-manage-open-rpc.json", "dist:copy:docs": "mkdirp ./dist && cp -R build/docs/markdown dist/docs", @@ -26,7 +26,7 @@ "test": "npm run test:setup && NODE_OPTIONS=--experimental-vm-modules npx --config=jest.config.json --detectOpenHandles jest", "prepack": "node ../../js/version.mjs validate && npm run broilerplate", "broilerplate": "rm ./CONTRIBUTING.md && cp ../../../CONTRIBUTING.md ./CONTRIBUTING.md && rm ./LICENSE && cp ../../../LICENSE ./LICENSE && rm ./NOTICE && cp ../../../NOTICE ./NOTICE", - "prettier": "prettier dist/**/*.mjs --write --parser babel && prettier dist/**/*.md --write --parser markdown" + "prettier": "prettier build/**/*.mjs --write --parser babel && prettier build/**/*.md --write --parser markdown" }, "repository": { "type": "git", From 53ece9a063524f9968222b41451db531e9332dd8 Mon Sep 17 00:00:00 2001 From: Kevin Pearson Date: Mon, 27 Nov 2023 09:13:48 -0800 Subject: [PATCH 6/7] chore: Doc formatting --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index e88ca860c..9cbcc1ce5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1071,7 +1071,7 @@ }, "node_modules/@firebolt-js/openrpc": { "version": "2.1.1-next.3", - "resolved": "git+ssh://git@github.com/rdkcentral/firebolt-openrpc.git#769818f35e599cfb7d18f6a362be1777a6603b51", + "resolved": "git+ssh://git@github.com/rdkcentral/firebolt-openrpc.git#ea68aff7ae432562c4157862ecc373a7d2ffdb2b", "dev": true, "license": "Apache-2.0", "dependencies": { From 09e20fcab045eba20446fdca2138cfc673cabdc2 Mon Sep 17 00:00:00 2001 From: Kevin Pearson Date: Wed, 29 Nov 2023 16:49:47 -0800 Subject: [PATCH 7/7] chore: Doc formatting --- package-lock.json | 8 ++++---- package.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9cbcc1ce5..05ac3fde3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "devDependencies": { "@commitlint/cli": "^17.0.3", "@commitlint/config-conventional": "^17.0.3", - "@firebolt-js/openrpc": "rdkcentral/firebolt-openrpc#doc-formatting-improvements", + "@firebolt-js/openrpc": "2.2.0", "@firebolt-js/schemas": "2.0.0", "@saithodev/semantic-release-backmerge": "^3.2.0", "@semantic-release/changelog": "^6.0.1", @@ -1070,10 +1070,10 @@ "link": true }, "node_modules/@firebolt-js/openrpc": { - "version": "2.1.1-next.3", - "resolved": "git+ssh://git@github.com/rdkcentral/firebolt-openrpc.git#ea68aff7ae432562c4157862ecc373a7d2ffdb2b", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@firebolt-js/openrpc/-/openrpc-2.2.0.tgz", + "integrity": "sha512-G/TBlLiPI7MbSWtynCwlw2+mq8flTsI1qPiMAgeskLa9WdMdZJGVXKq3A8ItIpT2XzbO/PsokEQhlCw9O/DzHQ==", "dev": true, - "license": "Apache-2.0", "dependencies": { "ajv": "^8.3.0", "ajv-formats": "^2.1.0", diff --git a/package.json b/package.json index 7aeb7ed39..4ab27e1dd 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "devDependencies": { "@commitlint/cli": "^17.0.3", "@commitlint/config-conventional": "^17.0.3", - "@firebolt-js/openrpc": "rdkcentral/firebolt-openrpc#doc-formatting-improvements", + "@firebolt-js/openrpc": "2.2.0", "@firebolt-js/schemas": "2.0.0", "@saithodev/semantic-release-backmerge": "^3.2.0", "@semantic-release/changelog": "^6.0.1", @@ -67,4 +67,4 @@ "sdk" ], "license": "Apache-2.0" -} \ No newline at end of file +}