Skip to content

Commit

Permalink
Make package public
Browse files Browse the repository at this point in the history
  • Loading branch information
Fryuni committed Jan 15, 2025
1 parent 4b3c8e1 commit ea22917
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Default owners
* @croct-tech/js
* @croct-tech/javascript-maintainer @croct-tech/node-maintainer

# GitHub configurations
/.github/ @croct-tech/infra
2 changes: 1 addition & 1 deletion .github/workflows/check-commit-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check
uses: mristin/[email protected].0
uses: mristin/[email protected].1
with:
allow-one-liners: 'true'
skip-body-check: 'true'
17 changes: 9 additions & 8 deletions .github/workflows/deploy-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
release:
types:
- published
env:
GCLOUD_PROJECT_DEV: "croct-dev"

jobs:
deploy-release:
Expand All @@ -14,10 +12,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://npm.pkg.github.com'
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }}
node-version: 20

- name: Cache dependencies
id: cache-dependencies
Expand Down Expand Up @@ -46,10 +41,16 @@ jobs:
if: ${{ github.event.release.prerelease }}
run: |-
cd build
npm publish --tag next
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc
npm publish --access public --tag next
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish release to NPM
if: ${{ !github.event.release.prerelease }}
run: |-
cd build
npm publish
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc
npm publish --access public
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release notes
name: Release Drafter

on:
push:
Expand All @@ -8,7 +8,7 @@ on:
- '**'

jobs:
update-notes:
release-draft:
runs-on: ubuntu-latest
steps:
- name: Update release draft
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/send-guidelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pullRequestOpened: |
👋 @{{ author }}
**Thanks for your contribution!**
The approval and merge process is almost fully automated 🧙
Here's how it works:
1. You open a new pull request
2. Automated tests check the code
3. Maintainers review the code
Expand All @@ -27,4 +31,5 @@ jobs:
> about the change.
☝️ Lastly, the title for the commit will come from the pull request title. So please provide a descriptive title that summarizes the changes in **50 characters or less using the imperative mood.**
Happy coding! 🎉
27 changes: 7 additions & 20 deletions .github/workflows/validate-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Validations
on:
push:
tags-ignore:
- '**'
- "**"
branches:
- master
pull_request:
Expand All @@ -22,10 +22,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://npm.pkg.github.com'
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }}
node-version: 20

- name: Cache dependencies
id: cache-dependencies
Expand All @@ -49,10 +46,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://npm.pkg.github.com'
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }}
node-version: 20

- name: Cache dependencies
id: cache-dependencies
Expand All @@ -74,10 +68,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://npm.pkg.github.com'
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }}
node-version: 20

- name: Cache dependencies
id: cache-dependencies
Expand All @@ -99,10 +90,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://npm.pkg.github.com'
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }}
node-version: 20

- name: Cache dependencies
id: cache-dependencies
Expand All @@ -115,10 +103,9 @@ jobs:
if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: npm ci

- uses: paambaati/codeclimate-action@v8.0.0
- uses: paambaati/codeclimate-action@v9.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: npm run test
coverageLocations:
./coverage/lcov.info:lcov
coverageLocations: ./coverage/lcov.info:lcov
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
We recommend using [NPM](https://www.npmjs.com) to install the package:

```sh
npm install @croct-tech/cache
npm install @croct/cache
```

## Basic usage
Expand Down
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@croct-tech/cache",
"name": "@croct/cache",
"version": "0.0.0-dev",
"description": "An abstraction layer for caching.",
"author": {
Expand Down Expand Up @@ -31,7 +31,7 @@
"build": "tsc -p tsconfig.build.json && cp package.json build/"
},
"dependencies": {
"@croct-tech/time": "^0.9.0",
"@croct/time": "^0.10.0",
"@croct/json": "^2.0.0",
"@croct/logging": "^0.2.2",
"node-object-hash": "^3.0.0"
Expand Down
4 changes: 2 additions & 2 deletions src/holdWhileRevalidate.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Clock, Instant} from '@croct-tech/time';
import {DefaultClockProvider} from '@croct-tech/time/defaultClockProvider';
import {Clock, Instant} from '@croct/time';
import {DefaultClockProvider} from '@croct/time/defaultClockProvider';
import {CacheLoader, CacheProvider} from './cacheProvider';
import {TimestampedCacheEntry} from './timestampedCacheEntry';

Expand Down
4 changes: 2 additions & 2 deletions src/staleWhileRevalidate.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Clock, Instant} from '@croct-tech/time';
import {DefaultClockProvider} from '@croct-tech/time/defaultClockProvider';
import {Clock, Instant} from '@croct/time';
import {DefaultClockProvider} from '@croct/time/defaultClockProvider';
import {CacheLoader, CacheProvider} from './cacheProvider';
import {TimestampedCacheEntry} from './timestampedCacheEntry';

Expand Down
2 changes: 1 addition & 1 deletion src/timestampedCacheEntry.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Instant} from '@croct-tech/time';
import {Instant} from '@croct/time';
import {JsonCompatible, JsonValue} from '@croct/json';

/**
Expand Down

0 comments on commit ea22917

Please sign in to comment.