- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 109
(Windows) build issues and contributing docs #1458
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
Merged
+59
−16
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
f473b57
fix: reflect current pnpm version (in step with lockfile) and documen…
WimTibackx 8e645d5
fix: enforce line endings on which the repo is currently standardized.
WimTibackx 12f4a5b
fix: use escaped double quotes when we need quotes in package.json sc…
WimTibackx b31d0cf
fix: execute the fitting gradlew variant depending on OS
WimTibackx 3b096c5
feat: document the use of a postgres database for tests, and allow co…
WimTibackx 77034e2
fix: minimal path normalization to handle Windows paths
WimTibackx 07f3dba
fix: close the postgres connection pool
WimTibackx 9516d54
fix: seems like we can just generally use nodes' path.normalize?
WimTibackx 67eeeeb
fix: improve path handling in tests on windows
WimTibackx 38623d5
fix: revert any path changes
WimTibackx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* text=auto eol=lf | ||
|
||
*.bat text=auto eol=crlf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,31 @@ | ||
import { Pool } from 'pg'; | ||
|
||
const USERNAME = 'postgres'; | ||
const PASSWORD = 'abc123'; | ||
const USERNAME = process.env.ZENSTACK_TEST_DB_USER || 'postgres'; | ||
const PASSWORD = process.env.ZENSTACK_TEST_DB_PASS || 'abc123'; | ||
|
||
const CONNECTION_DB = process.env.ZENSTACK_TEST_DB_NAME || 'postgres'; | ||
const HOST = process.env.ZENSTACK_TEST_DB_HOST || 'localhost'; | ||
const PORT = (process.env.ZENSTACK_TEST_DB_PORT ? parseInt(process.env.ZENSTACK_TEST_DB_PORT) : null) || 5432; | ||
|
||
function connect() { | ||
return new Pool({ | ||
user: USERNAME, | ||
password: PASSWORD, | ||
database: CONNECTION_DB, | ||
host: HOST, | ||
port: PORT | ||
}); | ||
} | ||
|
||
export async function createPostgresDb(db: string) { | ||
const pool = new Pool({ user: USERNAME, password: PASSWORD }); | ||
const pool = connect(); | ||
await pool.query(`DROP DATABASE IF EXISTS "${db}";`); | ||
await pool.query(`CREATE DATABASE "${db}";`); | ||
return `postgresql://${USERNAME}:${PASSWORD}@localhost:5432/${db}`; | ||
await pool.end(); | ||
return `postgresql://${USERNAME}:${PASSWORD}@${HOST}:${PORT}/${db}`; | ||
} | ||
|
||
export async function dropPostgresDb(db: string) { | ||
const pool = new Pool({ user: USERNAME, password: PASSWORD }); | ||
const pool = connect(); | ||
WimTibackx marked this conversation as resolved.
Show resolved
Hide resolved
|
||
await pool.query(`DROP DATABASE IF EXISTS "${db}";`); | ||
await pool.end(); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.