From cfc5bef69ab29610e938ad1273eae31ceb20ac1b Mon Sep 17 00:00:00 2001 From: Max Vedernikov Date: Mon, 19 Feb 2024 15:16:50 +0700 Subject: [PATCH 1/4] Create npm-publish.yml --- .github/workflows/npm-publish.yml | 33 +++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..6cdebaf --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,33 @@ +# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created +# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages + +name: Node.js Package + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - run: npm ci + - run: npm test + + publish-npm: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + registry-url: https://registry.npmjs.org/ + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} From 0cf3fa9af487d147225c82bd41eae25d0c6d54a1 Mon Sep 17 00:00:00 2001 From: Max Vedernikov Date: Mon, 19 Feb 2024 15:40:54 +0700 Subject: [PATCH 2/4] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7e75d19..3a582c4 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@agoda-com/devfeedback", + "name": "agoda-devfeedback", "exports": { "require": "./lib/cjs/index.js", "import": "./lib/esm/index.js" From 01bbd3181a7a803499054440fc4b4cfcefe4bec6 Mon Sep 17 00:00:00 2001 From: Max Vedernikov Date: Mon, 19 Feb 2024 15:41:59 +0700 Subject: [PATCH 3/4] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 15638a3..bebdedf 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# @agoda-com/devfeedback +# agoda-devfeedback This is a JavaScript/TypeScript package to collect metrics that relate to developers' experience. @@ -7,13 +7,13 @@ This is a JavaScript/TypeScript package to collect metrics that relate to develo Install the package: ```bash -npm install --save-dev @agoda-com/devfeedback +npm install --save-dev agoda-devfeedback ``` or ```bash -yarn add --dev @agoda-com/devfeedback +yarn add --dev agoda-devfeedback ``` Please note that when an error happens, the package will put the error message to `devfeedback.log` file in the current working directory. From 0075c92ae716647fe635fbe9466fc2822e123d26 Mon Sep 17 00:00:00 2001 From: Max Vedernikov Date: Mon, 19 Feb 2024 15:44:27 +0700 Subject: [PATCH 4/4] Update BUILD_TIME.md --- BUILD_TIME.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BUILD_TIME.md b/BUILD_TIME.md index d756fc3..6094141 100644 --- a/BUILD_TIME.md +++ b/BUILD_TIME.md @@ -1,6 +1,6 @@ # Build Time (Compilation Time) -Requires `@agoda-com/devfeedback` version 1.0.0 or later. +Requires `agoda-devfeedback` version 1.0.0 or later. ## Usage @@ -11,7 +11,7 @@ Requires `@agoda-com/devfeedback` version 1.0.0 or later. If you use **Webpack**, you can add the following to your `webpack.config.js` file: ```javascript -const { WebpackBuildStatsPlugin } = require('@agoda-com/devfeedback'); +const { WebpackBuildStatsPlugin } = require('agoda-devfeedback'); module.exports = { // ... @@ -27,7 +27,7 @@ module.exports = { If you use **Vite** you can add the following to your `vite.config.js` file: ```javascript -import { viteBuildStatsPlugin } from '@agoda-com/devfeedback'; +import { viteBuildStatsPlugin } from 'agoda-devfeedback'; export default defineConfig({ // ...