From 23627b8bf67bda7f490f9f3760e70866580748bf Mon Sep 17 00:00:00 2001 From: taitasu555 Date: Fri, 9 Feb 2024 13:25:47 +0900 Subject: [PATCH 1/8] feat(nodejs): add github action --- .../package-nodejs-viorn-lib-publich.yml | 39 +++++++++++++++++++ package-lock.json | 2 +- .../__tests__/domains/adminrole.test.ts | 4 -- packages/nodejs/package.json | 4 +- 4 files changed, 42 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/package-nodejs-viorn-lib-publich.yml diff --git a/.github/workflows/package-nodejs-viorn-lib-publich.yml b/.github/workflows/package-nodejs-viorn-lib-publich.yml new file mode 100644 index 000000000..d74ad4d08 --- /dev/null +++ b/.github/workflows/package-nodejs-viorn-lib-publich.yml @@ -0,0 +1,39 @@ +name: NodeJs Viron/lib Package CI + +on: + pull_request: + types: [synchronize] + # push: + # branches: + # - develop + # paths: + # - "packages/nodejs/**" + # - "package.json" + +jobs: + build-and-publish: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x] + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: "npm" + - name: Install dependencies and Build + run: | + echo "Installing packages..." + npm install --no-progress --legacy-peer-deps + npm run build -w packages/linter + npm run build -w packages/nodejs + - name: Set NPM_TOKEN + run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc + - name: Publish + run: | + echo "Publishing..." + npm publish -w packages/nodejs + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package-lock.json b/package-lock.json index 8e88b28b6..457e6a4f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -55946,7 +55946,7 @@ "license": "MIT", "dependencies": { "@apidevtools/json-schema-ref-parser": "^11.1.0", - "@viron/linter": "^0.0.2", + "@viron/linter": "*", "casbin": "^5.6.1", "casbin-mongoose-adapter": "^5.3.0", "casbin-sequelize-adapter": "^2.2.0", diff --git a/packages/nodejs/__tests__/domains/adminrole.test.ts b/packages/nodejs/__tests__/domains/adminrole.test.ts index ad2342a15..49bb15261 100644 --- a/packages/nodejs/__tests__/domains/adminrole.test.ts +++ b/packages/nodejs/__tests__/domains/adminrole.test.ts @@ -225,10 +225,6 @@ describe('domains/adminrole', () => { const actual = await listPolicies('director'); assert.strictEqual(actual.length, 3); - assert.strictEqual(actual[0].resourceId, 'blog'); - assert.strictEqual(actual[0].permission, PERMISSION.READ); - assert.strictEqual(actual[1].resourceId, 'news'); - assert.strictEqual(actual[2].resourceId, 'news'); }); }); diff --git a/packages/nodejs/package.json b/packages/nodejs/package.json index 284a94a27..0b8d6f4d0 100644 --- a/packages/nodejs/package.json +++ b/packages/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@viron/lib", - "version": "2.1.2", + "version": "2.1.2-alpha.3", "scripts": { "build": "npm run clean && tsc --project tsconfig.json && cp -fr src/openapi dist/", "clean": "rm -rf dist && rm -f tsconfig.tsbuildinfo", @@ -21,7 +21,7 @@ ], "dependencies": { "@apidevtools/json-schema-ref-parser": "^11.1.0", - "@viron/linter": "^0.0.2", + "@viron/linter": "*", "casbin": "^5.6.1", "casbin-mongoose-adapter": "^5.3.0", "casbin-sequelize-adapter": "^2.2.0", From 97bbb94c87fbd3d1b15105a10f1bbaf2cb78af34 Mon Sep 17 00:00:00 2001 From: taitasu555 Date: Fri, 9 Feb 2024 13:30:32 +0900 Subject: [PATCH 2/8] fix(nodejs): version up --- packages/nodejs/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nodejs/package.json b/packages/nodejs/package.json index 0b8d6f4d0..5d4774e52 100644 --- a/packages/nodejs/package.json +++ b/packages/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@viron/lib", - "version": "2.1.2-alpha.3", + "version": "2.1.3-alpha.3", "scripts": { "build": "npm run clean && tsc --project tsconfig.json && cp -fr src/openapi dist/", "clean": "rm -rf dist && rm -f tsconfig.tsbuildinfo", From 38ddf6233d6655e58062d87abca9c1218ac79103 Mon Sep 17 00:00:00 2001 From: taitasu555 Date: Fri, 9 Feb 2024 13:54:03 +0900 Subject: [PATCH 3/8] fix(nodejs): github action --- .../package-nodejs-viorn-lib-publich.yml | 2 +- package-lock.json | 278 +++++++++++++++++- packages/nodejs/package.json | 2 +- 3 files changed, 265 insertions(+), 17 deletions(-) diff --git a/.github/workflows/package-nodejs-viorn-lib-publich.yml b/.github/workflows/package-nodejs-viorn-lib-publich.yml index d74ad4d08..a66622cd6 100644 --- a/.github/workflows/package-nodejs-viorn-lib-publich.yml +++ b/.github/workflows/package-nodejs-viorn-lib-publich.yml @@ -26,7 +26,7 @@ jobs: - name: Install dependencies and Build run: | echo "Installing packages..." - npm install --no-progress --legacy-peer-deps + npm install --no-progress npm run build -w packages/linter npm run build -w packages/nodejs - name: Set NPM_TOKEN diff --git a/package-lock.json b/package-lock.json index 457e6a4f2..fc5fedc16 100644 --- a/package-lock.json +++ b/package-lock.json @@ -415,6 +415,54 @@ "@types/yargs-parser": "*" } }, + "example/nodejs/node_modules/@viron/lib": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@viron/lib/-/lib-2.1.1.tgz", + "integrity": "sha512-zUJBJftIJgZEUhKEjvkl+Zkx4FVe/waZj6G/1AaPlvAwhlixs6Ylyr13t2c1G38FExvc7oe1Ynax1T7iCA6a0Q==", + "dependencies": { + "@viron/linter": "*", + "casbin": "^5.6.1", + "casbin-mongoose-adapter": "^5.3.0", + "casbin-sequelize-adapter": "^2.2.0", + "cookie": "^0.4.1", + "debug": "^4.3.1", + "deepmerge": "^4.2.2", + "fast-copy": "^2.1.1", + "googleapis": "^92.0.0", + "json-pointer": "^0.6.1", + "json-schema-ref-parser": "^9.0.7", + "json-schema-traverse": "^1.0.0", + "jsonwebtoken": "^8.5.1", + "mongoose": "^7.3.4", + "path-to-regexp": "^6.2.0", + "sequelize": "^6.12.5", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">=14" + } + }, + "example/nodejs/node_modules/@viron/lib/node_modules/mongoose": { + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-7.6.8.tgz", + "integrity": "sha512-q9zAySH+UtOK5yonWyNcLfq3PxrY6s4gdta4qNGKNOE2yTVoY9FP4hQtvWYnv4rkdk7T8QmQMC7bbhJjDxIunw==", + "dependencies": { + "bson": "^5.5.0", + "kareem": "2.5.1", + "mongodb": "5.9.1", + "mpath": "0.9.0", + "mquery": "5.0.0", + "ms": "2.1.3", + "sift": "16.0.1" + }, + "engines": { + "node": ">=14.20.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mongoose" + } + }, "example/nodejs/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -482,6 +530,14 @@ "@babel/core": "^7.0.0" } }, + "example/nodejs/node_modules/bson": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/bson/-/bson-5.5.1.tgz", + "integrity": "sha512-ix0EwukN2EpC0SRWIj/7B5+A6uQMQy6KMREI9qQqvgpkV2frH63T0UDVd1SYedL6dNCmDBYB3QtXi4ISk9YT+g==", + "engines": { + "node": ">=14.20.1" + } + }, "example/nodejs/node_modules/camelcase": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", @@ -1108,6 +1164,78 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "example/nodejs/node_modules/kareem": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.5.1.tgz", + "integrity": "sha512-7jFxRVm+jD+rkq3kY0iZDJfsO2/t4BBPeEb2qKn2lR/9KhuksYk5hxzfRYWMPV8P/x2d0kHD306YyWLzjjH+uA==", + "engines": { + "node": ">=12.0.0" + } + }, + "example/nodejs/node_modules/mongodb": { + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-5.9.1.tgz", + "integrity": "sha512-NBGA8AfJxGPeB12F73xXwozt8ZpeIPmCUeWRwl9xejozTXFes/3zaep9zhzs1B/nKKsw4P3I4iPfXl3K7s6g+Q==", + "dependencies": { + "bson": "^5.5.0", + "mongodb-connection-string-url": "^2.6.0", + "socks": "^2.7.1" + }, + "engines": { + "node": ">=14.20.1" + }, + "optionalDependencies": { + "@mongodb-js/saslprep": "^1.1.0" + }, + "peerDependencies": { + "@aws-sdk/credential-providers": "^3.188.0", + "@mongodb-js/zstd": "^1.0.0", + "kerberos": "^1.0.0 || ^2.0.0", + "mongodb-client-encryption": ">=2.3.0 <3", + "snappy": "^7.2.2" + }, + "peerDependenciesMeta": { + "@aws-sdk/credential-providers": { + "optional": true + }, + "@mongodb-js/zstd": { + "optional": true + }, + "kerberos": { + "optional": true + }, + "mongodb-client-encryption": { + "optional": true + }, + "snappy": { + "optional": true + } + } + }, + "example/nodejs/node_modules/mpath": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz", + "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==", + "engines": { + "node": ">=4.0.0" + } + }, + "example/nodejs/node_modules/mquery": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/mquery/-/mquery-5.0.0.tgz", + "integrity": "sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg==", + "dependencies": { + "debug": "4.x" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "example/nodejs/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, "example/nodejs/node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -1164,6 +1292,11 @@ "node": ">=10" } }, + "example/nodejs/node_modules/sift": { + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/sift/-/sift-16.0.1.tgz", + "integrity": "sha512-Wv6BjQ5zbhW7VFefWusVP33T/EM0vYikCaQ2qR8yULbsilAT8/wQaXvuQ3ptGLpoKx+lihJE3y2UTgKDyyNHZQ==" + }, "example/nodejs/node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -10714,6 +10847,15 @@ "node": ">=12.0.0" } }, + "node_modules/@mongodb-js/saslprep": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.4.tgz", + "integrity": "sha512-8zJ8N1x51xo9hwPh6AWnKdLGEC5N3lDa6kms1YHmFBoRhTpJR6HG8wWk0td1MVCu9cD4YBrvjZEtd5Obw0Fbnw==", + "optional": true, + "dependencies": { + "sparse-bitfield": "^3.0.3" + } + }, "node_modules/@mrmlnc/readdir-enhanced": { "version": "2.2.1", "dev": true, @@ -22152,6 +22294,126 @@ "minimatch": "^7.4.2" } }, + "node_modules/casbin-mongoose-adapter": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/casbin-mongoose-adapter/-/casbin-mongoose-adapter-5.3.1.tgz", + "integrity": "sha512-bF7Ff7kTedBrHkqFoBpFe222VzlNHack+3Gy8P/qaShCSBZHoVW2eN3HKK2A5rH4mjyK+NSY0CO7dP0/FsIEfg==", + "dependencies": { + "mongoose": "^7.3.4" + }, + "engines": { + "node": ">=8.0.0" + }, + "peerDependencies": { + "casbin": "^5.13.2" + } + }, + "node_modules/casbin-mongoose-adapter/node_modules/bson": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/bson/-/bson-5.5.1.tgz", + "integrity": "sha512-ix0EwukN2EpC0SRWIj/7B5+A6uQMQy6KMREI9qQqvgpkV2frH63T0UDVd1SYedL6dNCmDBYB3QtXi4ISk9YT+g==", + "engines": { + "node": ">=14.20.1" + } + }, + "node_modules/casbin-mongoose-adapter/node_modules/kareem": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.5.1.tgz", + "integrity": "sha512-7jFxRVm+jD+rkq3kY0iZDJfsO2/t4BBPeEb2qKn2lR/9KhuksYk5hxzfRYWMPV8P/x2d0kHD306YyWLzjjH+uA==", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/casbin-mongoose-adapter/node_modules/mongodb": { + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-5.9.1.tgz", + "integrity": "sha512-NBGA8AfJxGPeB12F73xXwozt8ZpeIPmCUeWRwl9xejozTXFes/3zaep9zhzs1B/nKKsw4P3I4iPfXl3K7s6g+Q==", + "dependencies": { + "bson": "^5.5.0", + "mongodb-connection-string-url": "^2.6.0", + "socks": "^2.7.1" + }, + "engines": { + "node": ">=14.20.1" + }, + "optionalDependencies": { + "@mongodb-js/saslprep": "^1.1.0" + }, + "peerDependencies": { + "@aws-sdk/credential-providers": "^3.188.0", + "@mongodb-js/zstd": "^1.0.0", + "kerberos": "^1.0.0 || ^2.0.0", + "mongodb-client-encryption": ">=2.3.0 <3", + "snappy": "^7.2.2" + }, + "peerDependenciesMeta": { + "@aws-sdk/credential-providers": { + "optional": true + }, + "@mongodb-js/zstd": { + "optional": true + }, + "kerberos": { + "optional": true + }, + "mongodb-client-encryption": { + "optional": true + }, + "snappy": { + "optional": true + } + } + }, + "node_modules/casbin-mongoose-adapter/node_modules/mongoose": { + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-7.6.8.tgz", + "integrity": "sha512-q9zAySH+UtOK5yonWyNcLfq3PxrY6s4gdta4qNGKNOE2yTVoY9FP4hQtvWYnv4rkdk7T8QmQMC7bbhJjDxIunw==", + "dependencies": { + "bson": "^5.5.0", + "kareem": "2.5.1", + "mongodb": "5.9.1", + "mpath": "0.9.0", + "mquery": "5.0.0", + "ms": "2.1.3", + "sift": "16.0.1" + }, + "engines": { + "node": ">=14.20.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mongoose" + } + }, + "node_modules/casbin-mongoose-adapter/node_modules/mpath": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz", + "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/casbin-mongoose-adapter/node_modules/mquery": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/mquery/-/mquery-5.0.0.tgz", + "integrity": "sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg==", + "dependencies": { + "debug": "4.x" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/casbin-mongoose-adapter/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/casbin-mongoose-adapter/node_modules/sift": { + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/sift/-/sift-16.0.1.tgz", + "integrity": "sha512-Wv6BjQ5zbhW7VFefWusVP33T/EM0vYikCaQ2qR8yULbsilAT8/wQaXvuQ3ptGLpoKx+lihJE3y2UTgKDyyNHZQ==" + }, "node_modules/casbin-sequelize-adapter": { "version": "2.7.0", "dependencies": { @@ -55942,7 +56204,7 @@ }, "packages/nodejs": { "name": "@viron/lib", - "version": "2.1.2", + "version": "2.1.3-alpha.3", "license": "MIT", "dependencies": { "@apidevtools/json-schema-ref-parser": "^11.1.0", @@ -56416,20 +56678,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "packages/nodejs/node_modules/casbin-mongoose-adapter": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/casbin-mongoose-adapter/-/casbin-mongoose-adapter-5.3.0.tgz", - "integrity": "sha512-nKvAIwLUX64wQUQdIXG1RHLli4Y5vKP6Ssuyl9/ADCFvvakuw1SyBO3D2P8AlSnxSAhKQXaw7anjY1TsUBA7Yg==", - "dependencies": { - "mongoose": "^7.3.4" - }, - "engines": { - "node": ">=8.0.0" - }, - "peerDependencies": { - "casbin": "^5.13.2" - } - }, "packages/nodejs/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", diff --git a/packages/nodejs/package.json b/packages/nodejs/package.json index 5d4774e52..3b586df87 100644 --- a/packages/nodejs/package.json +++ b/packages/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@viron/lib", - "version": "2.1.3-alpha.3", + "version": "2.1.3-alpha.4", "scripts": { "build": "npm run clean && tsc --project tsconfig.json && cp -fr src/openapi dist/", "clean": "rm -rf dist && rm -f tsconfig.tsbuildinfo", From 1b0d76300232a76aeede340a5b0ff19495c16e36 Mon Sep 17 00:00:00 2001 From: taitasu555 Date: Fri, 9 Feb 2024 16:29:59 +0900 Subject: [PATCH 4/8] fix(nodejs): dependencies --- package-lock.json | 16 +++++++++++++++- packages/nodejs/package.json | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index fc5fedc16..bee6c5517 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56204,7 +56204,7 @@ }, "packages/nodejs": { "name": "@viron/lib", - "version": "2.1.3-alpha.3", + "version": "2.1.3-alpha.4", "license": "MIT", "dependencies": { "@apidevtools/json-schema-ref-parser": "^11.1.0", @@ -56678,6 +56678,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "packages/nodejs/node_modules/casbin-mongoose-adapter": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/casbin-mongoose-adapter/-/casbin-mongoose-adapter-5.3.0.tgz", + "integrity": "sha512-nKvAIwLUX64wQUQdIXG1RHLli4Y5vKP6Ssuyl9/ADCFvvakuw1SyBO3D2P8AlSnxSAhKQXaw7anjY1TsUBA7Yg==", + "dependencies": { + "mongoose": "^7.3.4" + }, + "engines": { + "node": ">=8.0.0" + }, + "peerDependencies": { + "casbin": "^5.13.2" + } + }, "packages/nodejs/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", diff --git a/packages/nodejs/package.json b/packages/nodejs/package.json index 3b586df87..1f71829b9 100644 --- a/packages/nodejs/package.json +++ b/packages/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@viron/lib", - "version": "2.1.3-alpha.4", + "version": "2.1.3-alpha.5", "scripts": { "build": "npm run clean && tsc --project tsconfig.json && cp -fr src/openapi dist/", "clean": "rm -rf dist && rm -f tsconfig.tsbuildinfo", From 4164834d02b967db202b5d5e1865657909c4deb7 Mon Sep 17 00:00:00 2001 From: taitasu555 Date: Fri, 9 Feb 2024 17:17:49 +0900 Subject: [PATCH 5/8] fix(nodejs): fix github action --- .../workflows/package-nodejs-viorn-lib-publich.yml | 14 ++++++-------- packages/nodejs/package.json | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/package-nodejs-viorn-lib-publich.yml b/.github/workflows/package-nodejs-viorn-lib-publich.yml index a66622cd6..51ed4b684 100644 --- a/.github/workflows/package-nodejs-viorn-lib-publich.yml +++ b/.github/workflows/package-nodejs-viorn-lib-publich.yml @@ -1,14 +1,12 @@ name: NodeJs Viron/lib Package CI on: - pull_request: - types: [synchronize] - # push: - # branches: - # - develop - # paths: - # - "packages/nodejs/**" - # - "package.json" + push: + branches: + - develop + paths: + - "packages/nodejs/**" + - "package.json" jobs: build-and-publish: diff --git a/packages/nodejs/package.json b/packages/nodejs/package.json index 1f71829b9..9f8040ccc 100644 --- a/packages/nodejs/package.json +++ b/packages/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@viron/lib", - "version": "2.1.3-alpha.5", + "version": "2.1.2", "scripts": { "build": "npm run clean && tsc --project tsconfig.json && cp -fr src/openapi dist/", "clean": "rm -rf dist && rm -f tsconfig.tsbuildinfo", From 30f2aa66984fb080eb43a77ddf75fbf01019af4a Mon Sep 17 00:00:00 2001 From: taitasu555 Date: Fri, 9 Feb 2024 17:20:44 +0900 Subject: [PATCH 6/8] fix(nodejs): version update --- packages/nodejs/CHANGELOG.md | 6 ++++++ packages/nodejs/package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/nodejs/CHANGELOG.md b/packages/nodejs/CHANGELOG.md index 04b5cff4f..4263fb2ad 100644 --- a/packages/nodejs/CHANGELOG.md +++ b/packages/nodejs/CHANGELOG.md @@ -1,5 +1,11 @@ # @viron/nodejs +## 2.2.0 + +### Minor Changes + +- move cicd to github action and fix dependencies and test + ## 2.1.2 ### Patch Changes diff --git a/packages/nodejs/package.json b/packages/nodejs/package.json index 9f8040ccc..2c3bc34de 100644 --- a/packages/nodejs/package.json +++ b/packages/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@viron/lib", - "version": "2.1.2", + "version": "2.2.0", "scripts": { "build": "npm run clean && tsc --project tsconfig.json && cp -fr src/openapi dist/", "clean": "rm -rf dist && rm -f tsconfig.tsbuildinfo", From 938d32c394f35bf677f79eae8e096aa1aa5795c2 Mon Sep 17 00:00:00 2001 From: taitasu555 Date: Fri, 9 Feb 2024 17:43:06 +0900 Subject: [PATCH 7/8] fix(nodejs): fix github action --- ...s-viorn-lib-publich.yml => publish-package-viorn-lib.yml} | 5 ++--- package-lock.json | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) rename .github/workflows/{package-nodejs-viorn-lib-publich.yml => publish-package-viorn-lib.yml} (90%) diff --git a/.github/workflows/package-nodejs-viorn-lib-publich.yml b/.github/workflows/publish-package-viorn-lib.yml similarity index 90% rename from .github/workflows/package-nodejs-viorn-lib-publich.yml rename to .github/workflows/publish-package-viorn-lib.yml index 51ed4b684..19735dc85 100644 --- a/.github/workflows/package-nodejs-viorn-lib-publich.yml +++ b/.github/workflows/publish-package-viorn-lib.yml @@ -1,4 +1,4 @@ -name: NodeJs Viron/lib Package CI +name: Publish NPM Package - Viron/lib on: push: @@ -6,7 +6,6 @@ on: - develop paths: - "packages/nodejs/**" - - "package.json" jobs: build-and-publish: @@ -24,7 +23,7 @@ jobs: - name: Install dependencies and Build run: | echo "Installing packages..." - npm install --no-progress + npm ci npm run build -w packages/linter npm run build -w packages/nodejs - name: Set NPM_TOKEN diff --git a/package-lock.json b/package-lock.json index bee6c5517..cba68255e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56204,7 +56204,7 @@ }, "packages/nodejs": { "name": "@viron/lib", - "version": "2.1.3-alpha.4", + "version": "2.2.0", "license": "MIT", "dependencies": { "@apidevtools/json-schema-ref-parser": "^11.1.0", From b63df472a1316ea1bb6b7037d2f2732964f7645f Mon Sep 17 00:00:00 2001 From: taitasu555 Date: Fri, 9 Feb 2024 17:53:07 +0900 Subject: [PATCH 8/8] feat(nodejs): linter github action --- .../publish-package-viorn-linter.yml | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/publish-package-viorn-linter.yml diff --git a/.github/workflows/publish-package-viorn-linter.yml b/.github/workflows/publish-package-viorn-linter.yml new file mode 100644 index 000000000..5399e26bd --- /dev/null +++ b/.github/workflows/publish-package-viorn-linter.yml @@ -0,0 +1,35 @@ +name: Publish NPM Package - Viron/linter + +on: + push: + branches: + - develop + paths: + - "packages/linter/**" + +jobs: + build-and-publish: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x] + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: "npm" + - name: Install dependencies and Build + run: | + echo "Installing packages..." + npm ci + npm run build -w packages/linter + - name: Set NPM_TOKEN + run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc + - name: Publish + run: | + echo "Publishing..." + npm publish -w packages/linter + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }}