Skip to content

Commit

Permalink
Merge pull request #195 from zazuko/shared-env
Browse files Browse the repository at this point in the history
refactor: env shared by all packages
  • Loading branch information
tpluscode authored Oct 30, 2023
2 parents 0ec3482 + 66216f5 commit 980adee
Show file tree
Hide file tree
Showing 76 changed files with 559 additions and 473 deletions.
19 changes: 19 additions & 0 deletions .changeset/chilly-worms-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
"barnard59-core": major
---

This is breaking change for users creating and running pipeline programmatically. The `createPipeline`
function exported by the package now requires that an RDF/JS Environment is passed as an argument.
A compatible environment which includes all necessary factories can be imported from the new
`barnard59-env` package.

```diff
import { createPipeline, run } from 'barnard59-core'
import env from 'barnard59-env'

let pointer

await run(createPipeline(pointer, {
+ env
})
```
5 changes: 5 additions & 0 deletions .changeset/early-news-lay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"barnard59-base": patch
---

Remove redundant dependency on `rdf-utils-fs`
5 changes: 5 additions & 0 deletions .changeset/eleven-pugs-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"barnard59-env": major
---

First release
25 changes: 25 additions & 0 deletions .changeset/hungry-mayflies-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
"barnard59-graph-store": minor
"barnard59-validation": minor
"barnard59-formats": minor
"barnard59-sparql": minor
"barnard59-csvw": minor
"barnard59": minor
"barnard59-test-support": patch
"barnard59-test-e2e": patch
---

Removed dependency on any RDF/JS Environment. The CLI provides it at runtime to ensure that steps
use the same factories. Step implementors are encouraged to use the environment provided by the
barnard59 runtime insead of importing directly.

```diff
-import rdf from 'rdf-ext'

export function myStep() {
- const dataset = rdf.dataset()
+ const dataset = this.env.dataset()

return rdf.dataset().toStream()
}
```
Loading

0 comments on commit 980adee

Please sign in to comment.