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

Rename folders and packages #3

Merged
merged 3 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
# seeder-js

[![Test](https://github.com/chehsunliu/seeder.js/actions/workflows/test.yml/badge.svg)](https://github.com/chehsunliu/seeder.js/actions/workflows/test.yml)

A Node.js library for data seeding, making integration testing easier.

## Getting Started

Install Seeder.js:

```sh
npm install -D @chehsunliu/seeder
```
64 changes: 45 additions & 19 deletions package-lock.json

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

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@chehsunliu/seeder-js-monorepo",
"name": "@chehsunliu/seeder-monorepo",
"private": true,
"version": "0.0.0",
"version": "0.1.0",
"workspaces": [
"packages/seeder-js",
"packages/seeder-js-dynamodb",
"packages/seeder-js-mysql"
"packages/seeder",
"packages/seeder-dynamodb",
"packages/seeder-mysql"
],
"scripts": {
"build": "tsc --build",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@chehsunliu/seeder-js-dynamodb",
"name": "@chehsunliu/seeder-dynamodb",
"version": "0.1.0",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand All @@ -10,6 +10,6 @@
"dependencies": {
"@aws-sdk/client-dynamodb": "^3.699.0",
"@aws-sdk/lib-dynamodb": "^3.699.0",
"@chehsunliu/seeder-js": "*"
"@chehsunliu/seeder": "*"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import assert from "node:assert";
import * as fs from "node:fs";
import path from "node:path";

import type { Seeder } from "@chehsunliu/seeder-js";
import type { Seeder } from "@chehsunliu/seeder";

const maxWindowSize = 25;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { DynamoDBDocumentClient, ScanCommand } from "@aws-sdk/lib-dynamodb";
import path from "node:path";
import { beforeEach, describe, expect, it } from "vitest";

import seederManager from "@chehsunliu/seeder-js";
import seederManager from "@chehsunliu/seeder";

const client = DynamoDBDocumentClient.from(
new DynamoDBClient({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { afterAll } from "vitest";

import seederManager from "@chehsunliu/seeder-js";
import { DynamoDbSeeder } from "@chehsunliu/seeder-js-dynamodb";
import seederManager from "@chehsunliu/seeder";
import { DynamoDbSeeder } from "@chehsunliu/seeder-dynamodb";

seederManager.configure([
new DynamoDbSeeder({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"include": ["./src/**/*"],
"references": [
{
"path": "../seeder-js"
"path": "../seeder"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@chehsunliu/seeder-js-mysql",
"name": "@chehsunliu/seeder-mysql",
"version": "0.1.0",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand All @@ -8,7 +8,7 @@
"./src"
],
"dependencies": {
"@chehsunliu/seeder-js": "*",
"@chehsunliu/seeder": "*",
"knex": "^3.1.0",
"knex-schema-inspector": "^3.1.0",
"mysql2": "^3.11.4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import schemaInspector from "knex-schema-inspector";
import fs from "node:fs";
import path from "node:path";

import { Seeder } from "@chehsunliu/seeder-js";
import { Seeder } from "@chehsunliu/seeder";

export type DataSelector = {
type: "sql" | "json";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createPool } from "mysql2";
import path from "node:path";
import { beforeEach, describe, expect, it } from "vitest";

import seederManager from "@chehsunliu/seeder-js";
import seederManager from "@chehsunliu/seeder";

import { Database } from "./lib/types";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { afterAll } from "vitest";

import seederManager from "@chehsunliu/seeder-js";
import { MySqlSeeder } from "@chehsunliu/seeder-js-mysql";
import seederManager from "@chehsunliu/seeder";
import { MySqlSeeder } from "@chehsunliu/seeder-mysql";

seederManager.configure([
new MySqlSeeder({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"include": ["./src/**/*"],
"references": [
{
"path": "../seeder-js"
"path": "../seeder"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@chehsunliu/seeder-js",
"name": "@chehsunliu/seeder",
"version": "0.1.0",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
},
"references": [
{
"path": "./packages/seeder-js"
"path": "./packages/seeder"
},
{
"path": "./packages/seeder-js-dynamodb"
"path": "./packages/seeder-dynamodb"
},
{
"path": "./packages/seeder-js-dynamodb/tests"
"path": "./packages/seeder-dynamodb/tests"
},
{
"path": "./packages/seeder-js-mysql"
"path": "./packages/seeder-mysql"
},
{
"path": "./packages/seeder-js-mysql/tests"
"path": "./packages/seeder-mysql/tests"
}
]
}
2 changes: 1 addition & 1 deletion vitest.workspace.mts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineWorkspace, UserProjectConfigExport } from "vitest/config";

const packages = ["seeder-js-dynamodb", "seeder-js-mysql"];
const packages = ["seeder-dynamodb", "seeder-mysql"];

const configs: UserProjectConfigExport[] = packages.map((pkg) => ({
extends: "./vitest.config.mts",
Expand Down