Skip to content

Commit

Permalink
chore!: move to krakenjs scope
Browse files Browse the repository at this point in the history
  • Loading branch information
westeezy committed Feb 28, 2022
1 parent 2dd1f9e commit 7f3104a
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 14 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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 }}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "belter",
"name": "@krakenjs/belter",
"version": "1.0.190",
"description": "Utilities.",
"main": "index.js",
Expand Down Expand Up @@ -93,8 +93,8 @@
"standard-version": "^9.3.2"
},
"dependencies": {
"cross-domain-safe-weakmap": "^1",
"cross-domain-utils": "^2",
"zalgo-promise": "^1"
"@krakenjs/cross-domain-safe-weakmap": "^2.0.2",
"@krakenjs/cross-domain-utils": "^3.0.2",
"@krakenjs/zalgo-promise": "^1"
}
}
6 changes: 3 additions & 3 deletions src/dom.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* @flow */
/* eslint max-lines: off */
import { ZalgoPromise } from 'zalgo-promise/src';
import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';
import { linkFrameWindow, isWindowClosed, assertSameDomain,
type SameDomainWindowType, type CrossDomainWindowType } from 'cross-domain-utils/src';
import { WeakMap } from 'cross-domain-safe-weakmap/src';
type SameDomainWindowType, type CrossDomainWindowType } from '@krakenjs/cross-domain-utils/src';
import { WeakMap } from '@krakenjs/cross-domain-safe-weakmap/src';

import { isElement, inlineMemoize, memoize, noop, stringify, capitalizeFirstLetter,
once, extend, safeInterval, uniqueID, arrayFrom, ExtendableError, strHashStr } from './util';
Expand Down
6 changes: 3 additions & 3 deletions src/http.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* @flow */

import { ZalgoPromise } from 'zalgo-promise/src';
import { type SameDomainWindowType } from 'cross-domain-utils/src';
import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';
import { type SameDomainWindowType } from '@krakenjs/cross-domain-utils/src';

type RequestOptionsType = {|
url : string,
Expand Down Expand Up @@ -74,7 +74,7 @@ export function request({ url, method = 'get', headers = {}, json, data, body, w
if (!this.status) {
return reject(new Error(`Request to ${ method.toLowerCase() } ${ url } failed: no response status code.`));
}

const contentType = responseHeaders['content-type'];
const isJSON = contentType && (contentType.indexOf('application/json') === 0 || contentType.indexOf('text/json') === 0);
let responseBody = this.responseText;
Expand Down
4 changes: 2 additions & 2 deletions src/test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* @flow */

import { ZalgoPromise } from 'zalgo-promise/src';
import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';

import { noop, tryCatch, removeFromArray } from './util';

Expand Down Expand Up @@ -29,7 +29,7 @@ export function wrapPromise<T>(method : Wrapper<T>, { timeout = 5000 } : {| time
const exp = { name, handler };
// $FlowFixMe
expected.push(exp);

// $FlowFixMe
return function expectWrapper(...args) : * {
removeFromArray(expected, exp);
Expand Down
4 changes: 2 additions & 2 deletions src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/* @flow */
/* eslint max-lines: 0 */

import { ZalgoPromise } from 'zalgo-promise/src';
import { WeakMap } from 'cross-domain-safe-weakmap/src';
import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';
import { WeakMap } from '@krakenjs/cross-domain-safe-weakmap/src';

import type { CancelableType } from './types';

Expand Down

0 comments on commit 7f3104a

Please sign in to comment.