Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
omercnet authored Dec 26, 2023
1 parent c40fccf commit e6e5cd9
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 129 deletions.
45 changes: 9 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- init # TODO: remove this branch

env:
NODE_VERSION: 18.12
NODE_VERSION: 20

jobs:
build:
Expand All @@ -21,13 +21,8 @@ jobs:
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: https://npm.pkg.github.com/
# Skip post-install scripts here, as a malicious
# script could steal NODE_AUTH_TOKEN.
- name: Install dependencies
run: npm ci --ignore-scripts
env:
CI: true
# NODE_AUTH_TOKEN: ${{ secrets.CI_NPM_READ_ORG }}
run: npm ci
- name: Building Lib
run: npm run build:lib
- name: Building Demo App
Expand All @@ -43,13 +38,8 @@ jobs:
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: https://npm.pkg.github.com/
# Skip post-install scripts here, as a malicious
# script could steal NODE_AUTH_TOKEN.
- name: Install dependencies
run: npm ci --ignore-scripts
env:
CI: true
# NODE_AUTH_TOKEN: ${{ secrets.CI_NPM_READ_ORG }}
run: npm ci
- name: Linting
run: npm run lint
- name: Format check
Expand All @@ -61,16 +51,11 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
# Skip post-install scripts here, as a malicious
# script could steal NODE_AUTH_TOKEN.
- name: Install dependencies
run: npm ci --ignore-scripts
env:
CI: true
NODE_AUTH_TOKEN: ${{ secrets.CI_NPM_READ_ORG }}
run: npm ci
- name: Gitleaks
run: npm run leaks
shell: bash
Expand All @@ -85,13 +70,8 @@ jobs:
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: https://npm.pkg.github.com/
# Skip post-install scripts here, as a malicious
# script could steal NODE_AUTH_TOKEN.
- name: Install dependencies
run: npm ci --ignore-scripts
env:
CI: true
# NODE_AUTH_TOKEN: ${{ secrets.CI_NPM_READ_ORG }}
run: npm ci
- name: Testing
run: npm run test
- name: Coverage check
Expand All @@ -108,19 +88,12 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: https://npm.pkg.github.com/
# Skip post-install scripts here, as a malicious
# script could steal NODE_AUTH_TOKEN.
- name: Install dependencies
run: npm ci --ignore-scripts
env:
CI: true
NODE_AUTH_TOKEN: ${{ secrets.CI_NPM_READ_ORG }}
# `npm rebuild` will run all those post-install scripts for us.
- run: npm rebuild && npm run prepare --if-present
run: npm ci
- name: License validation
shell: bash
run: ./thirdPartyLicenseCollector_linux_amd64 -npm-project ./projects/angular-sdk -npm-node-modules . # We are checking the
run: ./thirdPartyLicenseCollector_linux_amd64 -npm-project ./projects/angular-sdk -npm-node-modules .
16 changes: 2 additions & 14 deletions .github/workflows/publish-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,15 @@ on:
- init # TODO: remove this branch

env:
NODE_VERSION: 16.14
NODE_VERSION: 20

jobs:
publish:
name: 📢 Publish Next
permissions:
packages: write
contents: write
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
Expand All @@ -39,14 +33,8 @@ jobs:
yarn version --new-version ${NEW_VERSION}
cat package.json
- name: Install dependencies
run: npm ci --ignore-scripts
env:
CI: true
NODE_AUTH_TOKEN: ${{ secrets.CI_NPM_READ_ORG }}
# `npm rebuild` will run all those post-install scripts for us.
- run: npm rebuild && npm run prepare --if-present
run: npm ci
- name: Publish to NPM Package Registry
run: npm publish --access=public --tag next
env:
CI: true
NODE_AUTH_TOKEN: ${{ secrets.CI_NPM_REGISTRY }}
17 changes: 3 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,14 @@ name: 📢 publish
on:
push:
tags:
- 'release/**'
- "release/**"

env:
NODE_VERSION: 16.14
NODE_VERSION: 20

jobs:
publish:
name: 📢 Publish
permissions:
packages: write
contents: read
runs-on: ubuntu-latest

steps:
Expand All @@ -22,16 +19,8 @@ jobs:
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: https://registry.npmjs.org/
# Skip post-install scripts here, as a malicious
# script could steal NODE_AUTH_TOKEN.
- name: Install dependencies
run: npm ci --ignore-scripts
env:
CI: true
NODE_AUTH_TOKEN: ${{ secrets.CI_NPM_READ_ORG }}
# `npm rebuild` will run all those post-install scripts for us.
- run: npm rebuild && npm run prepare --if-present

run: npm ci
- name: Publish to NPM Package Registry
run: npm publish --access=public
env:
Expand Down
127 changes: 62 additions & 65 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,67 +1,64 @@
{
"name": "@descope/angular-sdk",
"version": "0.0.2",
"license": "MIT",
"engines": {
"node": "^16.14.0 || ^18.10.0",
"npm": ">= 8.1.0"
},
"scripts": {
"ng": "ng",
"start": "ng serve",
"prepare": "husky install",
"format-lint": "pretty-quick --staged --ignore-path .gitignore && lint-staged",
"prebuild:ci": "node scripts/setversion/setversion.js",
"build:ci": "npm run build:lib",
"build:lib": "ng build angular-sdk",
"build:app": "ng build demo-app",
"watch": "ng build --watch --configuration development",
"test": "jest --config jest.config.js",
"lint": "ng lint",
"format": "prettier . -w --ignore-path .gitignore",
"format-check": "prettier . --check --ignore-path .gitignore",
"leaks": "bash ./scripts/gitleaks/gitleaks.sh"
},
"lint-staged": {
"+(src|test|examples)/**/*.{js,ts,html}": [
"npm run lint"
]
},
"private": true,
"devDependencies": {
"@angular-devkit/build-angular": "^16.2.6",
"@angular-eslint/builder": "16.3.1",
"@angular-eslint/eslint-plugin": "16.3.1",
"@angular-eslint/eslint-plugin-template": "16.3.1",
"@angular-eslint/schematics": "16.3.1",
"@angular-eslint/template-parser": "16.3.1",
"@angular/animations": "^16.2.9",
"@angular/cli": "^16.2.6",
"@angular/common": "^16.2.9",
"@angular/compiler": "^16.2.9",
"@angular/compiler-cli": "^16.2.9",
"@angular/core": "^16.2.9",
"@angular/forms": "^16.2.9",
"@angular/platform-browser": "^16.2.9",
"@angular/platform-browser-dynamic": "^16.2.9",
"@angular/router": "^16.2.9",
"@descope/web-component": "3.0.0",
"@types/jest": "^29.5.5",
"@typescript-eslint/eslint-plugin": "6.11.0",
"@typescript-eslint/parser": "6.11.0",
"eslint": "^8.51.0",
"eslint-plugin-prettier": "^4.2.1",
"husky": "^8.0.3",
"jest": "^29.7.0",
"jest-preset-angular": "^13.1.2",
"lint-staged": "^15.2.0",
"ng-mocks": "^14.11.0",
"ng-packagr": "^16.2.3",
"prettier": "2.8.8",
"pretty-quick": "^3.1.3",
"rxjs": "~7.8.1",
"tslib": "^2.6.2",
"typescript": "~5.1.6",
"zone.js": "~0.13.0"
}
"name": "@descope/angular-sdk",
"version": "0.0.2",
"license": "MIT",
"engines": {
"node": "^16.14.0 || ^18.10.0",
"npm": ">= 8.1.0"
},
"scripts": {
"ng": "ng",
"start": "ng serve",
"prepare": "husky install",
"format-lint": "pretty-quick --staged --ignore-path .gitignore && lint-staged",
"prebuild:ci": "node scripts/setversion/setversion.js",
"build:ci": "npm run build:lib",
"build:lib": "ng build angular-sdk",
"build:app": "ng build demo-app",
"watch": "ng build --watch --configuration development",
"test": "jest --config jest.config.js",
"lint": "ng lint",
"format": "prettier . -w --ignore-path .gitignore",
"format-check": "prettier . --check --ignore-path .gitignore",
"leaks": "bash ./scripts/gitleaks/gitleaks.sh"
},
"lint-staged": {
"+(src|test|examples)/**/*.{js,ts,html}": ["npm run lint"]
},
"devDependencies": {
"@angular-devkit/build-angular": "^16.2.6",
"@angular-eslint/builder": "16.3.1",
"@angular-eslint/eslint-plugin": "16.3.1",
"@angular-eslint/eslint-plugin-template": "16.3.1",
"@angular-eslint/schematics": "16.3.1",
"@angular-eslint/template-parser": "16.3.1",
"@angular/animations": "^16.2.9",
"@angular/cli": "^16.2.6",
"@angular/common": "^16.2.9",
"@angular/compiler": "^16.2.9",
"@angular/compiler-cli": "^16.2.9",
"@angular/core": "^16.2.9",
"@angular/forms": "^16.2.9",
"@angular/platform-browser": "^16.2.9",
"@angular/platform-browser-dynamic": "^16.2.9",
"@angular/router": "^16.2.9",
"@descope/web-component": "3.0.0",
"@types/jest": "^29.5.5",
"@typescript-eslint/eslint-plugin": "6.11.0",
"@typescript-eslint/parser": "6.11.0",
"eslint": "^8.51.0",
"eslint-plugin-prettier": "^4.2.1",
"husky": "^8.0.3",
"jest": "^29.7.0",
"jest-preset-angular": "^13.1.2",
"lint-staged": "^15.2.0",
"ng-mocks": "^14.11.0",
"ng-packagr": "^16.2.3",
"prettier": "2.8.8",
"pretty-quick": "^3.1.3",
"rxjs": "~7.8.1",
"tslib": "^2.6.2",
"typescript": "~5.1.6",
"zone.js": "~0.13.0"
}
}

0 comments on commit e6e5cd9

Please sign in to comment.