Skip to content

Commit

Permalink
fix: int package
Browse files Browse the repository at this point in the history
  • Loading branch information
Pornchai committed Dec 24, 2024
1 parent 10fe1d2 commit 5058353
Show file tree
Hide file tree
Showing 6 changed files with 10,210 additions and 11 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: Release

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Install dependencies
run: yarn
- run: yarn build

release:
name: Semantic Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install dependencies for release
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org/'
cache: 'yarn'
- name: Install dependencies
run: yarn
- name: Semantic Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish package to NPM 📦
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Test

on:
pull_request:
branches:
- main

jobs:
test:
strategy:
matrix:
node-version: [18.x]
name: Node
runs-on: ubuntu-latest
steps:
- name: Checkout ${{ matrix.node-version }}
uses: actions/checkout@v3

- name: Setup and Test ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'

- name: Install node modules
shell: bash
run: yarn

- name: Build
shell: bash
run: yarn build

- name: Unit testing and collect coverage
shell: bash
run: yarn test
18 changes: 18 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"dryRun": false,
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
["@semantic-release/npm", { "npmPublish": false }],
[
"@semantic-release/git",
{
"assets": ["CHANGELOG.md", "package.json"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
"@semantic-release/github"
],
"branches": ["main"]
}
23 changes: 16 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "medusa-plugin-auth",
"version": "1.11.1",
"version": "1.0.0",
"description": "Social authentication plugin for medusajs 1.x",
"keywords": [
"social",
Expand All @@ -25,9 +25,9 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/adrien2p/medusa-plugins.git"
"url": "git+https://github.com/xponential-asia/medusa-xpo-auth-plugins.git"
},
"author": "Adrien de Peretti <adrien.deperetti@gmail.com",
"author": "Xponential",
"files": [
"api",
"utils",
Expand All @@ -46,12 +46,15 @@
"test:ci": "yarn add -D @medusajs/medusa@${MEDUSAJS_VERSION} && yarn run test"
},
"peerDependencies": {
"@medusajs/medusa": ">=1.16.x",
"passport": "^0.6.0",
"typeorm": "*"
},
"devDependencies": {
"@medusajs/medusa": ">=1.17.x",
"@medusajs/medusa": "1.20.0",
"@medusajs/types": "1.11.13",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/npm": "^12.0.1",
"@types/express": "^4.17.17",
"@types/jest": "^29.1.2",
"@types/passport-auth0": "^1.0.9",
Expand All @@ -61,10 +64,13 @@
"@types/passport-linkedin-oauth2": "^1.5.6",
"@types/passport-oauth2": "^1.4.15",
"jest": "^29.1.2",
"npm-run-all": "^4.1.5",
"passport": "^0.6.0",
"ts-jest": "^29.0.3",
"semantic-release": "^24.2.0",
"ts-jest": "^29.2.5",
"ts-node": "^8.6.2",
"typeorm": "^0.3.15"
"typeorm": "^0.3.15",
"typescript": "^5.7.2"
},
"dependencies": {
"@superfaceai/passport-twitter-oauth2": "^1.1.0",
Expand Down Expand Up @@ -109,5 +115,8 @@
"setupFilesAfterEnv": [
"<rootDir>/../setup-tests.js"
]
},
"publishConfig": {
"registry": "https://registry.npmjs.org/"
}
}
14 changes: 10 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"declaration": true,
"declarationMap": true,
Expand All @@ -10,8 +9,15 @@
"esModuleInterop": true,
"outDir": ".",
"rootDir": "src",
"baseUrl": "./"
"baseUrl": "./",
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"moduleResolution": "node",
"target": "es2017",
"sourceMap": true,
"skipLibCheck": true,
"incremental": false
},
"include": ["src"],
"exclude": ["**/node_modules", "**/__tests__/*", "**/__e2e__/*"],
}
"exclude": ["**/node_modules", "**/__tests__/*", "**/__e2e__/*"]
}
Loading

0 comments on commit 5058353

Please sign in to comment.