Skip to content

Commit

Permalink
lets see
Browse files Browse the repository at this point in the history
  • Loading branch information
mo9a7i committed Apr 7, 2023
1 parent 13aa7d5 commit 3d8ccdd
Show file tree
Hide file tree
Showing 12 changed files with 4,249 additions and 106 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
14 changes: 14 additions & 0 deletions .changeset/popular-trainers-play.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"swarmapp-api": minor
---

# Change Typescript CI/CD Workflow

## Change Summary 📔

In this push, I'm trying:

- Changeset
- PNPM
- TSUP
- New Github Actions
20 changes: 20 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: CI
on:
push:
branches:
- "**"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 7
- uses: actions/setup-node@v3
with:
node-version: 16.x
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm run lint && pnpm run build
42 changes: 22 additions & 20 deletions .github/workflows/npm-publish.yml → .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,37 @@
name: Publish
on:
release:
types: [created]
push:
branches: [ main ]
pull_request:
branches: [ main ]
branches:
- "main"

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
with:
node-version: 16
- run: npm ci

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
version: 7
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
node-version: 16.x
cache: "pnpm"

- run: pnpm install --frozen-lockfile
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
publish: pnpm run build
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}


release:
needs: publish-npm
needs: build
name: Create Release
runs-on: ubuntu-latest
steps:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,5 @@ dist
node_modules/
coverage/
lib
test/mytest
test/mytest
dist/
58 changes: 12 additions & 46 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,66 +2,32 @@
"name": "swarmapp-api",
"version": "2.3.7",
"description": "A javascript wrapper for swarmapp (foursquare) API",
"main": "./lib/cjs/index.js",
"module": "./lib/esm/index.mjs",
"directories": {
"test": "tests"
},
"main": "lib/index.js",
"module": "lib/index.mjs",
"types": "lib/index.d.ts",
"scripts": {
"test": "jest --coverage",
"clean": "shx rm -rf lib",
"build": "npm run clean && npm run build:esm & npm run build:cjs",
"build:esm": "tsc && shx mv lib/esm/index.js lib/esm/index.mjs",
"build:cjs": "tsc -p ./tsconfig.cjs.json",
"prepack": "npm run build",
"mytest": "node ./test/test.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/6degrees/swarmapp-api.git"
"lint": "tsc",
"build": "pnpm run clean && tsup src/index.ts --format cjs,esm --dts"
},
"keywords": [
"api",
"javascript",
"js",
"swarm",
"swarmapp",
"foursquare",
"wrapper",
"checkin"
],
"repository": {"type": "git", "url": "git+https://github.com/6degrees/swarmapp-api.git"},
"keywords": ["api","javascript","js","swarm","swarmapp","foursquare","wrapper","checkin"],
"author": "Mohannad F. Otaibi",
"license": "ISC",
"bugs": {
"url": "https://github.com/6degrees/swarmapp-api/issues"
},
"bugs": {"url": "https://github.com/6degrees/swarmapp-api/issues"},
"homepage": "https://github.com/6degrees/swarmapp-api#readme",
"dependencies": {
"axios": "^0.26.1",
"dotenv": "^16.0.3",
"form-data": "^4.0.0",
"lodash": "^4.17.21",
"querystring": "^0.2.1"
"lodash": "^4.17.21"
},
"devDependencies": {
"@changesets/cli": "^2.26.1",
"@types/node": "^18.15.11",
"jest": "^29.5.0",
"shx": "^0.3.4",
"tsup": "^6.7.0",
"typescript": "^5.0.3"
},
"files": [
"lib/**/*"
],
"exports": {
".": {
"import": {
"types": "./lib/esm/types/index.d.ts",
"default": "./lib/esm/index.mjs"
},
"require": {
"types": "./lib/cjs/types/index.d.ts",
"default": "./lib/cjs/index.js"
}
}
}
}
}
Loading

0 comments on commit 3d8ccdd

Please sign in to comment.