Skip to content

Commit

Permalink
Merge pull request #2 from johnie/feature/effect-schema
Browse files Browse the repository at this point in the history
feat: add support for effect schema
  • Loading branch information
johnie authored Oct 26, 2024
2 parents c79b578 + e22fbad commit e7e7062
Show file tree
Hide file tree
Showing 9 changed files with 835 additions and 1,593 deletions.
5 changes: 5 additions & 0 deletions .changeset/few-beans-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'xscrape': minor
---

Add support for Effect/Schema validator
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Effect Schema, allowing you to use your preferred validation tool.
| Schema Library | Status | Notes |
| ---------------------------------------------------- | ------------------- | ------------------------------------------------------------------ |
| [Zod](https://github.com/colinhacks/zod) | ✅ Supported | Default schema tool for `xscrape` |
| [Effect/Schema](https://github.com/Effect-TS/schema) | 🚧 Planned | Planned support for Effect/Schema for additional flexibility |
| [Effect/Schema](https://github.com/Effect-TS/effect) | ✅ Supported | Support for Effect/Schema for additional flexibility |
| [Joi](https://github.com/sideway/joi) | 🚧 Planned | Support for Joi for those familiar with server-side validation |
| [Yup](https://github.com/jquense/yup) | 🚧 Planned | Adding Yup support for schema validation in front-end applications |
| Others... | 🔄 In Consideration | Potential support for other schema tools as per user feedback |
Expand Down
121 changes: 61 additions & 60 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,63 +1,64 @@
{
"name": "xscrape",
"version": "1.1.1",
"description": "A flexible and powerful library designed to extract and transform data from HTML documents using user-defined schemas",
"main": "dist/index.js",
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist/index.cjs"
"name": "xscrape",
"version": "1.1.1",
"description": "A flexible and powerful library designed to extract and transform data from HTML documents using user-defined schemas",
"main": "dist/index.js",
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"files": [
"dist"
],
"type": "module",
"scripts": {
"build": "tsup",
"ci": "npm run build && npm run check-format && npm run check-exports && npm run lint && npm run test",
"lint": "tsc",
"test": "vitest run",
"format": "prettier --write ./src",
"check-format": "prettier --check ./src",
"check-exports": "attw --pack .",
"local-release": "npm run ci && changeset version && changeset publish"
},
"keywords": [
"web-scraping",
"data-extraction",
"automation",
"html-parsing",
"data-transformation",
"user-defined-schemas",
"crawler",
"scraper",
"zod",
"yup",
"joi",
"effect-schema"
],
"author": "Johnie Hjelm <[email protected]>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/johnie/xscrape.git"
},
"bugs": {
"url": "https://github.com/johnie/xscrape/issues"
},
"homepage": "https://github.com/johnie/xscrape#readme",
"devDependencies": {
"@arethetypeswrong/cli": "^0.16.4",
"@changesets/cli": "^2.27.9",
"prettier": "^3.3.3",
"tsup": "^8.3.5",
"typescript": "^5.6.3",
"vite": "^5.4.10",
"vitest": "^2.1.3"
},
"dependencies": {
"cheerio": "^1.0.0",
"effect": "^3.10.4",
"zod": "^3.23.8"
}
},
"files": [
"dist"
],
"type": "module",
"scripts": {
"build": "tsup",
"ci": "npm run build && npm run check-format && npm run check-exports && npm run lint && npm run test",
"lint": "tsc",
"test": "vitest run",
"format": "prettier --write .",
"check-format": "prettier --check .",
"check-exports": "attw --pack .",
"local-release": "npm run ci && changeset version && changeset publish"
},
"keywords": [
"web-scraping",
"data-extraction",
"automation",
"html-parsing",
"data-transformation",
"user-defined-schemas",
"crawler",
"scraper",
"zod",
"yup",
"joi",
"effect-schema"
],
"author": "Johnie Hjelm <[email protected]>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/johnie/xscrape.git"
},
"bugs": {
"url": "https://github.com/johnie/xscrape/issues"
},
"homepage": "https://github.com/johnie/xscrape#readme",
"devDependencies": {
"@arethetypeswrong/cli": "^0.16.4",
"@changesets/cli": "^2.27.9",
"prettier": "^3.3.3",
"tsup": "^8.3.5",
"typescript": "^5.6.3",
"vite": "^5.4.10",
"vitest": "^2.1.3"
},
"dependencies": {
"cheerio": "^1.0.0",
"zod": "^3.23.8"
}
}
Loading

0 comments on commit e7e7062

Please sign in to comment.