Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: internxt/sdk CI

on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:

jobs:
test:
Expand All @@ -16,16 +16,20 @@ jobs:
matrix:
node-version: [22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://npm.pkg.github.com'
node-version: '22.x'
cache: yarn

- name: Install dependencies
run: yarn

- name: Build
run: yarn build

- run: yarn
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: yarn run lint && yarn run format && yarn run test
env:
CI: true
- name: Run tests
run: yarn test
36 changes: 0 additions & 36 deletions .github/workflows/code-coverage.yml

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/publish-github.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish package to github package registry
on:
release:
types: [created]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: yarn

- name: Install dependencies
run: yarn

- name: Build
run: yarn build

- name: Set the NPM registry with token
run: |
echo "registry=https://npm.pkg.github.com/" > .npmrc
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc

- name: Publish on GitHub
run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26 changes: 16 additions & 10 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Publish Package to npmjs
on:
release:
types: [published]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -10,21 +12,25 @@ jobs:
id-token: write
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: yarn

- run: |
echo "@internxt:registry=https://npm.pkg.github.com/" > .npmrc
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
- name: Install dependencies
run: yarn

- run: yarn
- run: yarn run build
- name: Build
run: yarn build

# Change the registry to npmjs (to publish)
- run: |
- name: Set the NPM registry with token
run: |
echo "registry=https://registry.npmjs.org/" > .npmrc
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc

- run: npm publish --scope=@internxt --access public
- name: Publish on NPM
run: npm publish --scope=@internxt --access public
25 changes: 0 additions & 25 deletions .github/workflows/publish.yml

This file was deleted.

4 changes: 3 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
yarn lint && yarn format && yarn test && yarn lint-staged
yarn test
yarn lint
yarn lint-staged
6 changes: 2 additions & 4 deletions .npmrc.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
registry=https://registry.yarnpkg.com/

@internxt:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=TOKEN
always-auth=true

@internxt:registry=https://registry.yarnpkg.com/
5 changes: 0 additions & 5 deletions jest.config.js

This file was deleted.

35 changes: 18 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@internxt/sdk",
"author": "Internxt <hello@internxt.com>",
"version": "1.12.6",
"version": "1.13.0",
"description": "An sdk for interacting with Internxt's services",
"repository": {
"type": "git",
Expand All @@ -19,35 +19,36 @@
"types": "dist/index.d.ts",
"scripts": {
"prepare": "husky",
"test": "jest --detectOpenHandles test/",
"test:cov": "jest --coverage",
"build": "tsc",
"test": "vitest run --coverage",
"test:watch": "vitest watch",
"clean": "rimraf dist coverage tsconfig.tsbuildinfo",
"build": "yarn clean && tsc",
"lint": "eslint ./src",
"format": "prettier src/**/*.ts --write",
"format": "prettier --write **/*.{js,jsx,tsx,ts}",
"swagger": "openapi-typescript https://gateway.internxt.com/drive/api-json -o ./src/schema.ts && yarn format"
},
"devDependencies": {
"@internxt/eslint-config-internxt": "2.0.1",
"@internxt/prettier-config": "1.0.2",
"@types/jest": "30.0.0",
"@types/sinon": "21.0.0",
"@internxt/prettier-config": "internxt/prettier-config#v1.0.2",
"@types/node": "25.2.3",
"@vitest/coverage-istanbul": "4.0.18",
"@vitest/spy": "4.0.18",
"eslint": "9.39.2",
"husky": "9.1.7",
"jest": "30.2.0",
"lint-staged": "16.2.7",
"openapi-typescript": "7.10.1",
"prettier": "3.7.4",
"sinon": "21.0.0",
"ts-jest": "29.4.6",
"typescript": "5.9.3"
"openapi-typescript": "7.12.0",
"prettier": "3.8.1",
"rimraf": "6.1.2",
"typescript": "5.9.3",
"vitest": "4.0.18"
},
"dependencies": {
"axios": "1.13.2",
"uuid": "11.1.0"
"axios": "1.13.5",
"uuid": "13.0.0"
},
"lint-staged": {
"*.{js,jsx,tsx,ts}": [
"yarn format"
"prettier --write"
]
}
}
63 changes: 0 additions & 63 deletions src/drive/users/inext.test.ts

This file was deleted.

Loading