Skip to content

Commit 276219f

Browse files
committed
tests passing ✅
0 parents  commit 276219f

30 files changed

+9100
-0
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* text=auto
2+
*.js text eol=lf

.github/workflows/run-tests.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: run tests
2+
on:
3+
push:
4+
workflow_dispatch:
5+
6+
jobs:
7+
container-job:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
13+
14+
- uses: pnpm/action-setup@v4
15+
name: Install pnpm
16+
with:
17+
version: 10
18+
run_install: false
19+
20+
- name: Install Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 20
24+
cache: 'pnpm'
25+
26+
- name: Install dependencies
27+
run: pnpm install
28+
29+
- name: Build packages
30+
run: pnpm build
31+
32+
- name: Run tests for jsonld-tools
33+
run: cd ./packages/jsonld-tools && pnpm test

.gitignore

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Dependencies
2+
node_modules/
3+
**/node_modules/
4+
5+
# Build outputs
6+
dist/
7+
build/
8+
packages/**/dist/
9+
packages/**/build/
10+
*.tsbuildinfo
11+
12+
# Logs
13+
*.log
14+
npm-debug.log*
15+
yarn-debug.log*
16+
yarn-error.log*
17+
pnpm-debug.log*
18+
lerna-debug.log*
19+
20+
# Runtime data
21+
pids
22+
*.pid
23+
*.seed
24+
*.pid.lock
25+
26+
# Coverage directory used by tools like istanbul
27+
coverage/
28+
*.lcov
29+
30+
# nyc test coverage
31+
.nyc_output
32+
33+
# Dependency directories
34+
jspm_packages/
35+
36+
# Optional npm cache directory
37+
.npm
38+
39+
# Optional eslint cache
40+
.eslintcache
41+
42+
# Optional REPL history
43+
.node_repl_history
44+
45+
# Output of 'npm pack'
46+
*.tgz
47+
48+
# Yarn Integrity file
49+
.yarn-integrity
50+
51+
# dotenv environment variables file
52+
.env
53+
.env.local
54+
.env.development.local
55+
.env.test.local
56+
.env.production.local
57+
58+
# parcel-bundler cache (https://parceljs.org/)
59+
.cache
60+
.parcel-cache
61+
62+
# Next.js build output
63+
.next
64+
out
65+
66+
# Nuxt.js build / generate output
67+
.nuxt
68+
dist
69+
70+
# Gatsby files
71+
.cache/
72+
public
73+
74+
# Storybook build outputs
75+
.out
76+
.storybook-out
77+
78+
# Temporary folders
79+
tmp/
80+
temp/
81+
82+
# Editor directories and files
83+
.vscode/
84+
.idea/
85+
*.swp
86+
*.swo
87+
*~
88+
89+
# OS generated files
90+
.DS_Store
91+
.DS_Store?
92+
._*
93+
.Spotlight-V100
94+
.Trashes
95+
ehthumbs.db
96+
Thumbs.db
97+
98+
# TypeScript
99+
*.tsbuildinfo
100+
101+
# Testing
102+
coverage/
103+
.nyc_output/
104+
105+
# Misc
106+
*.tgz
107+
*.tar.gz

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2025 Dan Lynch <[email protected]>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

PUBLISHING.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## publishing
2+
3+
```sh
4+
pnpm dlx lerna version patch
5+
pnpm build
6+
pnpm -r publish
7+
```

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# jsonld-tools
2+
3+
JSON-LD Tooling
4+

fixtures/graph.json

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
[
2+
{
3+
"@id": "person:danlynch",
4+
"@type": "Person",
5+
"name": "Dan Lynch",
6+
"affiliation": { "@id": "org:hyperweb" },
7+
"knows": ["person:jane", "person:john"],
8+
"worksFor": "org:hyperweb",
9+
"email": "[email protected]",
10+
"jobTitle": "Founder & CEO"
11+
},
12+
{
13+
"@id": "person:jane",
14+
"@type": "Person",
15+
"name": "Jane Doe",
16+
"knows": { "@id": "person:danlynch" },
17+
"email": "[email protected]",
18+
"jobTitle": "Developer"
19+
},
20+
{
21+
"@id": "person:john",
22+
"@type": ["Person", "Developer"],
23+
"name": "John Smith",
24+
"memberOf": [
25+
{ "@id": "org:hyperweb" },
26+
{ "@id": "org:osmosis" }
27+
],
28+
"email": "[email protected]",
29+
"jobTitle": "Senior Developer"
30+
},
31+
{
32+
"@id": "org:hyperweb",
33+
"@type": "Organization",
34+
"name": "HyperWeb",
35+
"url": "https://hyperweb.com",
36+
"member": [
37+
{ "@id": "person:danlynch" },
38+
{ "@id": "person:john" }
39+
],
40+
"foundingDate": "2020-01-01",
41+
"location": { "@id": "place:san-francisco" }
42+
},
43+
{
44+
"@id": "org:osmosis",
45+
"@type": "Organization",
46+
"name": "Osmosis",
47+
"url": "https://osmosis.zone",
48+
"member": [
49+
{ "@id": "person:john" }
50+
],
51+
"foundingDate": "2021-06-01"
52+
},
53+
{
54+
"@id": "event:osmocon-2023-paris",
55+
"@type": "Event",
56+
"name": "Osmocon 2023 Paris",
57+
"organizer": { "@id": "org:osmosis" },
58+
"performer": ["person:danlynch", "person:jane"],
59+
"location": "Paris, France",
60+
"startDate": "2023-10-15",
61+
"endDate": "2023-10-17",
62+
"description": "Annual Osmosis conference in Paris"
63+
},
64+
{
65+
"@id": "event:cosmjs-roadmap",
66+
"@type": "Event",
67+
"name": "CosmJS Roadmap Event",
68+
"organizer": { "@id": "org:hyperweb" },
69+
"performer": ["person:danlynch"],
70+
"location": "Virtual",
71+
"startDate": "2024-01-15",
72+
"description": "CosmJS development roadmap presentation"
73+
},
74+
{
75+
"@id": "event:cosmoverse-2024",
76+
"@type": "Event",
77+
"name": "Cosmoverse 2024",
78+
"organizer": { "@id": "org:osmosis" },
79+
"performer": ["person:danlynch", "person:jane"],
80+
"location": "Dubai, UAE",
81+
"startDate": "2024-09-15",
82+
"endDate": "2024-09-17",
83+
"description": "Major Cosmos ecosystem conference"
84+
},
85+
{
86+
"@id": "article:web3-future",
87+
"@type": "Article",
88+
"headline": "The Future of Web3",
89+
"author": { "@id": "person:danlynch" },
90+
"mentions": [
91+
{ "@id": "org:hyperweb" },
92+
{ "@id": "event:cosmoverse-2024" }
93+
],
94+
"datePublished": "2024-01-01",
95+
"description": "An article about the future of Web3 technology"
96+
},
97+
{
98+
"@id": "image:cosmjs-roadmap-announcement",
99+
"@type": "ImageObject",
100+
"name": "CosmJS Roadmap Announcement",
101+
"contentUrl": "https://example.com/cosmjs-roadmap.jpg",
102+
"description": "Image announcing the CosmJS roadmap event",
103+
"about": { "@id": "event:cosmjs-roadmap" },
104+
"creator": { "@id": "person:danlynch" }
105+
},
106+
{
107+
"@id": "place:san-francisco",
108+
"@type": "Place",
109+
"name": "San Francisco",
110+
"address": {
111+
"@type": "PostalAddress",
112+
"addressLocality": "San Francisco",
113+
"addressRegion": "CA",
114+
"addressCountry": "US"
115+
},
116+
"geo": {
117+
"@type": "GeoCoordinates",
118+
"latitude": 37.7749,
119+
"longitude": -122.4194
120+
}
121+
},
122+
{
123+
"@id": "product:cosmos-sdk",
124+
"@type": "SoftwareApplication",
125+
"name": "Cosmos SDK",
126+
"description": "Framework for building blockchain applications",
127+
"applicationCategory": "Blockchain Framework",
128+
"operatingSystem": "Cross-platform",
129+
"programmingLanguage": "Go",
130+
"maintainer": { "@id": "org:osmosis" }
131+
},
132+
{
133+
"@id": "course:blockchain-101",
134+
"@type": "Course",
135+
"name": "Blockchain 101",
136+
"description": "Introduction to blockchain technology",
137+
"provider": { "@id": "org:hyperweb" },
138+
"instructor": { "@id": "person:danlynch" },
139+
"coursePrerequisites": "Basic programming knowledge",
140+
"timeRequired": "P4W"
141+
},
142+
{
143+
"@id": "review:cosmos-sdk-review",
144+
"@type": "Review",
145+
"reviewBody": "Excellent framework for blockchain development",
146+
"reviewRating": {
147+
"@type": "Rating",
148+
"ratingValue": 5,
149+
"bestRating": 5
150+
},
151+
"author": { "@id": "person:jane" },
152+
"itemReviewed": { "@id": "product:cosmos-sdk" }
153+
},
154+
{
155+
"@id": "project:interchain-ui",
156+
"@type": "CreativeWork",
157+
"name": "Interchain UI",
158+
"description": "UI components for Cosmos ecosystem",
159+
"creator": { "@id": "org:hyperweb" },
160+
"contributor": [
161+
{ "@id": "person:danlynch" },
162+
{ "@id": "person:john" }
163+
],
164+
"license": "MIT",
165+
"programmingLanguage": "TypeScript"
166+
}
167+
]

lerna.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
3+
"version": "independent",
4+
"npmClient": "pnpm"
5+
}

package.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "jsonld-tools-workspace",
3+
"version": "0.0.1",
4+
"private": true,
5+
"scripts": {
6+
"build": "lerna run build"
7+
},
8+
"devDependencies": {
9+
"@types/jest": "^29.5.0",
10+
"@types/node": "^20.0.0",
11+
"copyfiles": "^2.4.1",
12+
"jest": "^29.7.0",
13+
"lerna": "^8.2.3",
14+
"prettier": "^3.0.0",
15+
"rimraf": "^5.0.5",
16+
"ts-jest": "^29.1.0",
17+
"ts-node": "^10.9.2",
18+
"typescript": "^5.2.0"
19+
},
20+
"workspaces": [
21+
"packages/*"
22+
],
23+
"repository": {
24+
"type": "git",
25+
"url": "https://github.com/hyperweb-io/jsonld-tools"
26+
}
27+
}

0 commit comments

Comments
 (0)