Skip to content

Commit

Permalink
Merge pull request #9 from jadengis/johndengis/issue-8
Browse files Browse the repository at this point in the history
feat: Add support for Angular 18
  • Loading branch information
jadengis authored Jun 22, 2024
2 parents f8377f1 + a0d16b0 commit f5f37e7
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 70 deletions.
27 changes: 5 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,14 @@ jobs:
build:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: 16
- name: Cache .npm
id: npm-cache
uses: actions/cache@v2
with:
path: |
~/.npm
key: ${{ runner.os }}-npm-module-cache-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-module-cache-
- name: Cache node_modules and .cache
id: node-modules-cache
uses: actions/cache@v2
with:
path: |
./node_modules
~/.cache
key: ${{ runner.os }}-${{ github.ref }}-${{ hashFiles('**/package-lock.json') }}
node-version: 20
cache: 'npm'
- name: Install dependencies
if: steps.node-modules-cache.outputs.cache-hit != 'true'
run: npm install
run: npm ci
- name: Build library
run: npm run build
25 changes: 4 additions & 21 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,14 @@ jobs:
lint:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: 16
- name: Cache .npm
id: npm-cache
uses: actions/cache@v2
with:
path: |
~/.npm
key: ${{ runner.os }}-npm-module-cache-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-module-cache-
- name: Cache node_modules and .cache
id: node-modules-cache
uses: actions/cache@v2
with:
path: |
./node_modules
~/.cache
key: ${{ runner.os }}-${{ github.ref }}-${{ hashFiles('**/package-lock.json') }}
node-version: 20
cache: 'npm'
- name: Install dependencies
if: steps.node-modules-cache.outputs.cache-hit != 'true'
run: npm install
run: npm ci
- name: Lint workspace
run: npm run lint
22 changes: 22 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Publish
on:
push:
tags:
- v*

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
cache: 'npm'

- run: npm ci
- run: npm run build
- run: npm publish --provenance --access public dist/packages/ngx-clarity/
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
27 changes: 5 additions & 22 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,14 @@ jobs:
test:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: 16
- name: Cache .npm
id: npm-cache
uses: actions/cache@v2
with:
path: |
~/.npm
key: ${{ runner.os }}-npm-module-cache-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-module-cache-
- name: Cache node_modules and .cache
id: node-modules-cache
uses: actions/cache@v2
with:
path: |
./node_modules
~/.cache
key: ${{ runner.os }}-${{ github.ref }}-${{ hashFiles('**/package-lock.json') }}
node-version: 20
cache: 'npm'
- name: Install dependencies
if: steps.node-modules-cache.outputs.cache-hit != 'true'
run: npm install
run: npm ci
- name: Run tests
run: npm run test
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,6 @@
"rxjs": "7.8.1",
"tslib": "^2.0.0",
"zone.js": "0.13.1"
}
},
"packageManager": "[email protected]+sha512.0e9d42e92bd2318408ed81eaff2da5f78baf23ee7d12a6eed44a6e2901d0f29d7ab715d1b918ade601f72e769a824d9a5c322383f22bbbda5dd396e79de2a077"
}
8 changes: 4 additions & 4 deletions packages/ngx-clarity/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-clarity",
"version": "2.1.0",
"version": "2.2.0",
"description": "Angular module to add the tracking code for microsoft.clarity.com",
"publishConfig": {
"access": "public"
Expand All @@ -25,11 +25,11 @@
],
"author": {
"name": "John Dengis",
"email": "[email protected]"
"email": "[email protected]"
},
"peerDependencies": {
"@angular/common": ">=15 <18",
"@angular/core": ">=15 <18"
"@angular/common": ">=15 <19",
"@angular/core": ">=15 <19"
},
"dependencies": {
"tslib": "^2.3.0"
Expand Down

0 comments on commit f5f37e7

Please sign in to comment.