Skip to content

Commit

Permalink
Rename src to packages to follow workspaces convention (#631)
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianrgreco authored Aug 8, 2023
1 parent 0dcaef8 commit 824cd8d
Show file tree
Hide file tree
Showing 277 changed files with 1,456 additions and 13,127 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Update versions
run: |
npm version ${{ github.event.release.tag_name }} -ws --allow-same-version
for module in src/modules/*; do npm install testcontainers@${{ github.event.release.tag_name }} --save -w $module; done
for module in packages/modules/*; do npm install testcontainers@${{ github.event.release.tag_name }} --save -w $module; done
sed -i -E "s/(sonar.projectVersion)=.+/\1=${{ github.event.release.tag_name }}/" sonar-project.properties
- name: Build packages
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,6 @@ jobs:
- name: Remove dev dependencies
run: npm prune --omit=dev
- name: Run CommonJS module smoke test
run: node src/testcontainers/smoke-test.js
run: node packages/testcontainers/smoke-test.js
- name: Run ES module smoke test
run: node src/testcontainers/smoke-test.mjs
run: node packages/testcontainers/smoke-test.mjs
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,6 @@ jobs:
- name: Remove dev dependencies
run: npm prune --omit=dev
- name: Run CommonJS module smoke test
run: node src/testcontainers/smoke-test.js
run: node packages/testcontainers/smoke-test.js
- name: Run ES module smoke test
run: node src/testcontainers/smoke-test.mjs
run: node packages/testcontainers/smoke-test.mjs
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ node_modules/
coverage/

# Package files are copied from the root on pack
src/**/README.md
src/**/LICENSE
packages/**/README.md
packages/**/LICENSE

# IDEs and editors
/.idea
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/arangodb.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ npm install @testcontainers/arangodb --save-dev
## Example

<!--codeinclude-->
[](../../src/modules/arangodb/src/arangodb-container.test.ts) inside_block:connect
[](../../packages/modules/arangodb/src/arangodb-container.test.ts) inside_block:connect
<!--/codeinclude-->

4 changes: 2 additions & 2 deletions docs/modules/elasticsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ npm install @testcontainers/elasticsearch --save-dev
## Examples

<!--codeinclude-->
[Create an index:](../../src/modules/elasticsearch/src/elasticsearch-container.test.ts) inside_block:createIndex
[Create an index:](../../packages/modules/elasticsearch/src/elasticsearch-container.test.ts) inside_block:createIndex
<!--/codeinclude-->

<!--codeinclude-->
[Index a document:](../../src/modules/elasticsearch/src/elasticsearch-container.test.ts) inside_block:indexDocument
[Index a document:](../../packages/modules/elasticsearch/src/elasticsearch-container.test.ts) inside_block:indexDocument
<!--/codeinclude-->
2 changes: 1 addition & 1 deletion docs/modules/hivemq.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ Please make sure to check out the hivemq-docs for the [Community Edition](https:
## Examples

<!--codeinclude-->
[Connect with a mqtt.js client to HiveMQ](../../src/modules/hivemq/src/hivemq-container.test.ts) inside_block:connect
[Connect with a mqtt.js client to HiveMQ](../../packages/modules/hivemq/src/hivemq-container.test.ts) inside_block:connect
<!--/codeinclude-->
6 changes: 3 additions & 3 deletions docs/modules/kafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ npm install @testcontainers/kafka --save-dev
## Examples

<!--codeinclude-->
[Connect to Kafka using in-built ZooKeeper:](../../src/modules/kafka/src/kafka-container.test.ts) inside_block:connectBuiltInZK
[Connect to Kafka using in-built ZooKeeper:](../../packages/modules/kafka/src/kafka-container.test.ts) inside_block:connectBuiltInZK
<!--/codeinclude-->

<!--codeinclude-->
[Connect to Kafka using your own ZooKeeper:](../../src/modules/kafka/src/kafka-container.test.ts) inside_block:connectProvidedZK
[Connect to Kafka using your own ZooKeeper:](../../packages/modules/kafka/src/kafka-container.test.ts) inside_block:connectProvidedZK
<!--/codeinclude-->

<!--codeinclude-->
[Connect to Kafka using SSL:](../../src/modules/kafka/src/kafka-container.test.ts) inside_block:ssl
[Connect to Kafka using SSL:](../../packages/modules/kafka/src/kafka-container.test.ts) inside_block:ssl
<!--/codeinclude-->
4 changes: 2 additions & 2 deletions docs/modules/mongodb.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ npm install @testcontainers/mongodb --save-dev
## Examples

<!--codeinclude-->
[Mongo 4.0.x:](../../src/modules/mongodb/src/mongodb-container.test.ts) inside_block:connect4
[Mongo 4.0.x:](../../packages/modules/mongodb/src/mongodb-container.test.ts) inside_block:connect4
<!--/codeinclude-->

<!--codeinclude-->
[MongoDB 6.0.x:](../../src/modules/mongodb/src/mongodb-container.test.ts) inside_block:connect6
[MongoDB 6.0.x:](../../packages/modules/mongodb/src/mongodb-container.test.ts) inside_block:connect6
<!--/codeinclude-->
8 changes: 4 additions & 4 deletions docs/modules/mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ npm install @testcontainers/mysql --save-dev
## Examples

<!--codeinclude-->
[Connect and execute query:](../../src/modules/mysql/src/mysql-container.test.ts) inside_block:connect
[Connect and execute query:](../../packages/modules/mysql/src/mysql-container.test.ts) inside_block:connect
<!--/codeinclude-->

<!--codeinclude-->
[Connect and execute query using URI:](../../src/modules/mysql/src/mysql-container.test.ts) inside_block:uriConnect
[Connect and execute query using URI:](../../packages/modules/mysql/src/mysql-container.test.ts) inside_block:uriConnect
<!--/codeinclude-->

<!--codeinclude-->
[Set username:](../../src/modules/mysql/src/mysql-container.test.ts) inside_block:setUsername
[Set username:](../../packages/modules/mysql/src/mysql-container.test.ts) inside_block:setUsername
<!--/codeinclude-->

<!--codeinclude-->
[Execute a query inside the container:](../../src/modules/mysql/src/mysql-container.test.ts) inside_block:executeQuery
[Execute a query inside the container:](../../packages/modules/mysql/src/mysql-container.test.ts) inside_block:executeQuery
<!--/codeinclude-->
6 changes: 3 additions & 3 deletions docs/modules/nats.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ npm install @testcontainers/nats --save-dev
## Examples

<!--codeinclude-->
[Connect:](../../src/modules/nats/src/nats-container.test.ts) inside_block:connect
[Connect:](../../packages/modules/nats/src/nats-container.test.ts) inside_block:connect
<!--/codeinclude-->

<!--codeinclude-->
[Publish and subscribe:](../../src/modules/nats/src/nats-container.test.ts) inside_block:pubsub
[Publish and subscribe:](../../packages/modules/nats/src/nats-container.test.ts) inside_block:pubsub
<!--/codeinclude-->

<!--codeinclude-->
[Set credentials:](../../src/modules/nats/src/nats-container.test.ts) inside_block:credentials
[Set credentials:](../../packages/modules/nats/src/nats-container.test.ts) inside_block:credentials
<!--/codeinclude-->
6 changes: 3 additions & 3 deletions docs/modules/neo4j.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ npm install @testcontainers/neo4j --save-dev
## Examples

<!--codeinclude-->
[Connect and create a node:](../../src/modules/neo4j/src/neo4j-container.test.ts) inside_block:createNode
[Connect and create a node:](../../packages/modules/neo4j/src/neo4j-container.test.ts) inside_block:createNode
<!--/codeinclude-->

<!--codeinclude-->
[Set password:](../../src/modules/neo4j/src/neo4j-container.test.ts) inside_block:setPassword
[Set password:](../../packages/modules/neo4j/src/neo4j-container.test.ts) inside_block:setPassword
<!--/codeinclude-->

<!--codeinclude-->
[Configure APOC:](../../src/modules/neo4j/src/neo4j-container.test.ts) inside_block:apoc
[Configure APOC:](../../packages/modules/neo4j/src/neo4j-container.test.ts) inside_block:apoc
<!--/codeinclude-->
8 changes: 4 additions & 4 deletions docs/modules/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ npm install @testcontainers/postgresql --save-dev
## Examples

<!--codeinclude-->
[Connect and execute query:](../../src/modules/postgresql/src/postgresql-container.test.ts) inside_block:connect
[Connect and execute query:](../../packages/modules/postgresql/src/postgresql-container.test.ts) inside_block:connect
<!--/codeinclude-->

<!--codeinclude-->
[Connect and execute query using URI:](../../src/modules/postgresql/src/postgresql-container.test.ts) inside_block:uriConnect
[Connect and execute query using URI:](../../packages/modules/postgresql/src/postgresql-container.test.ts) inside_block:uriConnect
<!--/codeinclude-->

<!--codeinclude-->
[Set database:](../../src/modules/postgresql/src/postgresql-container.test.ts) inside_block:setDatabase
[Set database:](../../packages/modules/postgresql/src/postgresql-container.test.ts) inside_block:setDatabase
<!--/codeinclude-->

<!--codeinclude-->
[Set username:](../../src/modules/postgresql/src/postgresql-container.test.ts) inside_block:setUsername
[Set username:](../../packages/modules/postgresql/src/postgresql-container.test.ts) inside_block:setUsername
<!--/codeinclude-->
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Config } from "jest";

const config: Config = {
projects: ["<rootDir>/src/testcontainers/jest.config.ts", "<rootDir>/src/modules/*/jest.config.ts"],
projects: ["<rootDir>/packages/testcontainers/jest.config.ts", "<rootDir>/packages/modules/*/jest.config.ts"],
};

export default config;
Loading

0 comments on commit 824cd8d

Please sign in to comment.