diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..918c6df --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,32 @@ +name: "publish to npm" +on: workflow_dispatch +jobs: + main: + runs-on: ubuntu-latest + steps: + - name: ⬇️ Checkout repo + uses: actions/checkout@v2 + with: + token: ${{ secrets.ACCESS_TOKEN }} + fetch-depth: 0 + + - name: ⎔ Setup node + # sets up the .npmrc file to publish to npm + uses: actions/setup-node@v2 + with: + node-version: "14" + registry-url: "https://registry.npmjs.org" + + - name: 📥 Download deps + uses: bahmutov/npm-install@v1 + with: + useLockFile: false + + - name: Configure git user + run: | + git config --global user.email ${{ github.actor }}@users.noreply.github.com + git config --global user.name ${{ github.actor }} + - name: ▶️ Run release + run: npm run release + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index 1e63e80..6781ac2 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "beaver-logger", + "name": "@krakenjs/beaver-logger", "version": "4.0.35", "description": "Client side logger.", "main": "dist/beaver-logger.js", @@ -98,8 +98,8 @@ "sync-browser-mocks": "^1.0.44" }, "dependencies": { - "belter": "^1.0.17", - "cross-domain-utils": "^2.0.36", - "zalgo-promise": "^1.0.26" + "@krakenjs/belter": "^2.0.0", + "@krakenjs/cross-domain-utils": "^3.0.0", + "@krakenjs/zalgo-promise": "^2.0.0" } } diff --git a/src/http.js b/src/http.js index 51a25de..e665cee 100644 --- a/src/http.js +++ b/src/http.js @@ -1,8 +1,8 @@ /* @flow */ -import { ZalgoPromise } from 'zalgo-promise/src'; -import { request, noop } from 'belter/src'; -import { isSameDomain, assertSameDomain, type CrossDomainWindowType } from 'cross-domain-utils/src'; +import { ZalgoPromise } from '@krakenjs/zalgo-promise/src'; +import { request, noop } from '@krakenjs/belter/src'; +import { isSameDomain, assertSameDomain, type CrossDomainWindowType } from '@krakenjs/cross-domain-utils/src'; import { canUseSendBeacon, isAmplitude, sendBeacon } from './util'; diff --git a/src/logger.js b/src/logger.js index 10190aa..3f1af5c 100644 --- a/src/logger.js +++ b/src/logger.js @@ -1,7 +1,7 @@ /* @flow */ -import { ZalgoPromise } from 'zalgo-promise/src'; -import { isBrowser, promiseDebounce, noop, safeInterval, objFilter } from 'belter/src'; +import { ZalgoPromise } from '@krakenjs/zalgo-promise/src'; +import { isBrowser, promiseDebounce, noop, safeInterval, objFilter } from '@krakenjs/belter/src'; import { DEFAULT_LOG_LEVEL, LOG_LEVEL_PRIORITY, AUTO_FLUSH_LEVEL, FLUSH_INTERVAL, AMPLITUDE_URL } from './config'; import { LOG_LEVEL, PROTOCOL } from './constants'; diff --git a/src/util.js b/src/util.js index 9d1f3bf..1934710 100644 --- a/src/util.js +++ b/src/util.js @@ -1,6 +1,6 @@ /* @flow */ -import { type SameDomainWindowType } from 'cross-domain-utils/src'; +import { type SameDomainWindowType } from '@krakenjs/cross-domain-utils/src'; import { AMPLITUDE_URL } from './config'; import type { Payload } from './types';