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 1702fd31c..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": "2.1.1", + "@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,9 +1070,9 @@ "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.2.0", + "resolved": "https://registry.npmjs.org/@firebolt-js/openrpc/-/openrpc-2.2.0.tgz", + "integrity": "sha512-G/TBlLiPI7MbSWtynCwlw2+mq8flTsI1qPiMAgeskLa9WdMdZJGVXKq3A8ItIpT2XzbO/PsokEQhlCw9O/DzHQ==", "dev": true, "dependencies": { "ajv": "^8.3.0", @@ -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", @@ -16935,20 +16950,24 @@ } }, "src/sdks/core": { + "name": "@firebolt-js/sdk", "version": "1.0.0", "license": "Apache-2.0", "devDependencies": { "jest": "^28.1.0", "jest-environment-jsdom": "^28.1.3", + "prettier": "^3.1.0", "typescript": "^4.6.4" } }, "src/sdks/manage": { + "name": "@firebolt-js/manage-sdk", "version": "1.0.0", "license": "Apache-2.0", "devDependencies": { "jest": "^28.1.0", "jest-environment-jsdom": "^28.1.3", + "prettier": "^3.1.0", "typescript": "^4.6.4" } } diff --git a/package.json b/package.json index 0edb3d3f6..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": "2.1.1", + "@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", diff --git a/src/sdks/core/package.json b/src/sdks/core/package.json index 250710d17..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", @@ -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 build/**/*.mjs --write --parser babel && prettier build/**/*.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..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", @@ -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 build/**/*.mjs --write --parser babel && prettier build/**/*.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": [