Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite library to fix vulnerable dependencies #19

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

22 changes: 0 additions & 22 deletions .eslintrc

This file was deleted.

33 changes: 11 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,19 @@
name: Node.js Package
name: Publish Package to npmjs
on:
release:
types: [created]
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: '14'
registry-url: 'https://registry.npmjs.org'
- run: npm install
# - run: npm publish --access public
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# # Setup .npmrc file to publish to GitHub Packages
# - uses: actions/setup-node@v2
# with:
# registry-url: 'https://npm.pkg.github.com'
# scope: '@getbrevo'
# # Publish to GitHub Packages
# - run: npm publish
# env:
# NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
scope: "@getbrevo"
- run: yarn install --frozen-lockfile
- run: yarn publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Test
on:
pull_request:
branches:
- "*"
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 20.12.0
- name: Install dependencies
run: yarn install
- name: Generate API file
run: yarn generate
- name: Check generated files match
uses: tj-actions/verify-changed-files@v19
with:
files: |
src/Brevo.ts
fail-if-changed: true
fail-message: "Generate API file is different to the committed one. Please run `yarn generate` and commit the changes."
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ wwwroot/*.js
node_modules
typings
dist
.DS_Store
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.github
23 changes: 0 additions & 23 deletions .openapi-generator-ignore

This file was deleted.

Loading