Skip to content

Commit

Permalink
Open source package (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospassos authored Jan 2, 2025
1 parent 4667bc9 commit 73bc6ce
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 42 deletions.
15 changes: 9 additions & 6 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,8 +12,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
registry-url: 'https://npm.pkg.github.com'
node-version: 20
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }}

Expand Down Expand Up @@ -46,10 +43,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
NODE_AUTH_TOKEN=${{ secrets.GITHUB_TOKEN }} npm publish
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc
npm publish --access public
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Croct.com

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
A <a href="https://datatracker.ietf.org/doc/html/rfc6901">RFC 6901</a> compliant JSON pointer library to handle arbitrary structured data.
</p>
<p align="center">
<a href="https://www.npmjs.com/package/@croct/json-pointer"><img alt="Version" src="https://img.shields.io/npm/v/@croct/json-pointer"/></a>
<a href="https://github.com/croct-tech/json-pointer-js/actions/workflows/validate-branch.yaml"><img alt="Build" src="https://github.com/croct-tech/json-pointer-js/actions/workflows/validate-branch.yaml/badge.svg" /></a>
<a href="https://codeclimate.com/repos/6224bc798bc258016500056f/test_coverage"><img src="https://api.codeclimate.com/v1/badges/692b087d6472a80bb509/test_coverage" /></a>
<a href="https://codeclimate.com/repos/6224bc798bc258016500056f/maintainability"><img src="https://api.codeclimate.com/v1/badges/692b087d6472a80bb509/maintainability" /></a>
Expand Down
79 changes: 47 additions & 32 deletions package-lock.json

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

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@croct-tech/json-pointer",
"name": "@croct/json-pointer",
"version": "0.0.0-dev",
"description": "A RFC6901 compliant type-safe JSON pointer library to handle arbitrary structured data.",
"author": {
"name": "croct",
"email": "[email protected]",
"url": "https://github.com/croct-tech/json-pointer-js"
},
"license": "PRIVATE",
"license": "MIT",
"keywords": [
"croct",
"typescript",
Expand All @@ -31,13 +31,13 @@
"build": "tsc -p tsconfig.build.json"
},
"dependencies": {
"@croct/json": "^2.0.1"
"@croct/json": "^2.1.0"
},
"devDependencies": {
"@croct/eslint-plugin": "^0.7.0",
"@types/jest": "^29.0.0",
"@typescript-eslint/parser": "^7.0.0",
"eslint": "^9.0.0",
"eslint": "^8.57.1",
"jest": "^29.0.0",
"jest-extended": "^4.0.0",
"ts-jest": "^29.0.0",
Expand Down

0 comments on commit 73bc6ce

Please sign in to comment.