From 0fc435f5d2cbd2378a0c8238f939f4eb403f8351 Mon Sep 17 00:00:00 2001 From: Max Guriev Date: Tue, 15 Apr 2025 17:17:37 -0700 Subject: [PATCH 1/4] reset to version 2.2.0 --- .github/ISSUE_TEMPLATE/bug_report.md | 24 -------- .github/ISSUE_TEMPLATE/feature_request.md | 20 ------ .github/workflows/pr-checks.yml | 75 +++++++++++++++++++++++ .github/workflows/publish.yml | 55 +++++++++++++++++ .gitignore | 5 +- package.json | 9 ++- 6 files changed, 142 insertions(+), 46 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/workflows/pr-checks.yml create mode 100644 .github/workflows/publish.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 0c87a41..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: bug -assignees: dan-lampman - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 7e9ec76..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: enhancement -assignees: dan-lampman - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml new file mode 100644 index 0000000..e1c184b --- /dev/null +++ b/.github/workflows/pr-checks.yml @@ -0,0 +1,75 @@ +# This workflow will run each time a PR is opened or updated + +name: CI Checks + +on: push + +env: + NODE_VERSION: 20 + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: "Checkout" + uses: actions/checkout@v4 + - name: "Setup" + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + registry-url: https://npm.pkg.github.com/ + cache: "yarn" + - name: "Build" + run: | + yarn --frozen-lockfile --prefer-offline + yarn build + - name: "Build storybook" + run: yarn build-storybook + + test: + runs-on: ubuntu-latest + steps: + - name: "Checkout" + uses: actions/checkout@v4 + - name: "Setup" + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + registry-url: https://npm.pkg.github.com/ + cache: "yarn" + - name: "Install dependencies" + run: yarn --frozen-lockfile --prefer-offline + - name: "Run tests" + run: yarn test + + check-types: + runs-on: ubuntu-latest + steps: + - name: "Checkout" + uses: actions/checkout@v4 + - name: "Setup" + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + registry-url: https://npm.pkg.github.com/ + cache: "yarn" + - name: "Install dependencies" + run: yarn --frozen-lockfile --prefer-offline + - name: "Check types" + run: yarn check-types + + lint: + runs-on: ubuntu-latest + steps: + - name: "Checkout" + uses: actions/checkout@v4 + - name: "Setup" + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + registry-url: https://npm.pkg.github.com/ + cache: "yarn" + - name: "Install dependencies" + run: yarn --frozen-lockfile --prefer-offline + - name: "Lint" + run: yarn lint \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..c3fd186 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,55 @@ +name: NPM publish + +on: + push: + branches: + - main + +env: + NODE_VERSION: 20 + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write # allow GITHUB_TOKEN to publish packages + steps: + - name: "Checkout" + uses: actions/checkout@v4 + - name: "Setup" + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + registry-url: https://npm.pkg.github.com/ + - name: "Build" + run: | + yarn + yarn build + - uses: JS-DevTools/npm-publish@v3 + id: publish + with: + token: ${{ secrets.GITHUB_TOKEN }} + registry: "https://npm.pkg.github.com" + outputs: + type: ${{ steps.publish.outputs.type }} + + create-release: + runs-on: ubuntu-latest + needs: publish + if: needs.publish.outputs.type + permissions: + contents: write + steps: + - name: "Checkout" + uses: actions/checkout@v4 + - name: "Get package version" + id: package-version + uses: martinbeentjes/npm-get-version-action@v1.3.1 + - name: "Create release" + uses: ncipollo/release-action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + tag: v${{ steps.package-version.outputs.current-version }} + commit: "main" + generateReleaseNotes: true \ No newline at end of file diff --git a/.gitignore b/.gitignore index 1f5514c..e1cf723 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ node_modules coverage -.nyc_output \ No newline at end of file +.nyc_output + +# IDEA +.idea diff --git a/package.json b/package.json index ff5af82..61c60e2 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,15 @@ { +<<<<<<< Updated upstream "author:": "Dan L ", "main": "./src/api.js", "name": "impulse-api", "description": "A quick and efficient Api with Express under the hood.", +======= + "author:": "Ada Support", + "main": "./src/api.js", + "name": "impulse-api", + "description": "Fork of a legacy dependency", +>>>>>>> Stashed changes "license": "MIT", "pre-commit": [ "lint", @@ -40,6 +47,6 @@ }, "repository": { "type": "git", - "url": "https://github.com/dan-lampman/impulse-api.git" + "url": "https://github.com/AdaSupport/impulse-api.git" } } From 16c9e0cf6267a939d192dd12ecfda4c104198a3a Mon Sep 17 00:00:00 2001 From: Max Guriev Date: Tue, 15 Apr 2025 17:39:14 -0700 Subject: [PATCH 2/4] fix merge --- package.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/package.json b/package.json index 61c60e2..e35bb8c 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,12 @@ { -<<<<<<< Updated upstream "author:": "Dan L ", "main": "./src/api.js", "name": "impulse-api", "description": "A quick and efficient Api with Express under the hood.", -======= "author:": "Ada Support", "main": "./src/api.js", "name": "impulse-api", "description": "Fork of a legacy dependency", ->>>>>>> Stashed changes "license": "MIT", "pre-commit": [ "lint", From 5b7b08466291ae6f9c5e1809600ddbabcfd10884 Mon Sep 17 00:00:00 2001 From: Max Guriev Date: Wed, 16 Apr 2025 10:13:13 -0700 Subject: [PATCH 3/4] update github actions --- .github/workflows/pr-checks.yml | 46 +++++---------------------------- .github/workflows/publish.yml | 4 --- 2 files changed, 6 insertions(+), 44 deletions(-) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index e1c184b..0bd2ea1 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -8,24 +8,6 @@ env: NODE_VERSION: 20 jobs: - build: - runs-on: ubuntu-latest - steps: - - name: "Checkout" - uses: actions/checkout@v4 - - name: "Setup" - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - registry-url: https://npm.pkg.github.com/ - cache: "yarn" - - name: "Build" - run: | - yarn --frozen-lockfile --prefer-offline - yarn build - - name: "Build storybook" - run: yarn build-storybook - test: runs-on: ubuntu-latest steps: @@ -36,27 +18,11 @@ jobs: with: node-version: ${{ env.NODE_VERSION }} registry-url: https://npm.pkg.github.com/ - cache: "yarn" + cache: "npm" - name: "Install dependencies" - run: yarn --frozen-lockfile --prefer-offline + run: npm install --from-lock-file - name: "Run tests" - run: yarn test - - check-types: - runs-on: ubuntu-latest - steps: - - name: "Checkout" - uses: actions/checkout@v4 - - name: "Setup" - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - registry-url: https://npm.pkg.github.com/ - cache: "yarn" - - name: "Install dependencies" - run: yarn --frozen-lockfile --prefer-offline - - name: "Check types" - run: yarn check-types + run: npm test lint: runs-on: ubuntu-latest @@ -68,8 +34,8 @@ jobs: with: node-version: ${{ env.NODE_VERSION }} registry-url: https://npm.pkg.github.com/ - cache: "yarn" + cache: "npm" - name: "Install dependencies" - run: yarn --frozen-lockfile --prefer-offline + run: npm install --from-lock-file - name: "Lint" - run: yarn lint \ No newline at end of file + run: npm run lint \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c3fd186..25bd1c2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,10 +22,6 @@ jobs: with: node-version: ${{ env.NODE_VERSION }} registry-url: https://npm.pkg.github.com/ - - name: "Build" - run: | - yarn - yarn build - uses: JS-DevTools/npm-publish@v3 id: publish with: From 94725bc8fd39b83d2479e8530884225a3e1438fa Mon Sep 17 00:00:00 2001 From: Max Guriev Date: Wed, 16 Apr 2025 10:24:36 -0700 Subject: [PATCH 4/4] fix package.json --- package.json | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index e35bb8c..68f9544 100644 --- a/package.json +++ b/package.json @@ -1,17 +1,18 @@ { - "author:": "Dan L ", + "author:": "Ada Engineers", "main": "./src/api.js", "name": "impulse-api", "description": "A quick and efficient Api with Express under the hood.", - "author:": "Ada Support", + "author": { + "name": "Ada Support" + }, "main": "./src/api.js", "name": "impulse-api", "description": "Fork of a legacy dependency", "license": "MIT", - "pre-commit": [ - "lint", - "test" - ], + "publishConfig": { + "registry": "https://npm.pkg.github.com" + }, "scripts": { "lint": "eslint --ignore-path .gitignore .", "test": "nyc --reporter=lcov --reporter=text-summary mocha",