Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for effect schema #2

Merged
merged 9 commits into from
Oct 26, 2024
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