Skip to content

Commit 849fda3

Browse files
authored
Merge branch 'master' into tooomm-patch-7
2 parents d28fb46 + 60b2de4 commit 849fda3

11 files changed

Lines changed: 9823 additions & 142 deletions

File tree

.github/workflows/tests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
node_version:
23-
- 12
2423
- lts/*
2524
- current
2625

@@ -39,6 +38,11 @@ jobs:
3938
node-version: ${{ matrix.node_version }}
4039
cache: npm
4140

41+
# See https://github.com/npm/cli/issues/2610
42+
- name: Workaround for Node 14
43+
if: matrix.node_version == '14'
44+
run: sed -i 's/git+ssh/git+https/g' package-lock.json
45+
4246
- name: Install
4347
run: npm clean-install
4448

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v12
1+
16.15.1

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RUN chown dr4ftuser -R .
1515
USER dr4ftuser
1616

1717
# Install the dependencies
18-
RUN npm install
18+
RUN npm ci
1919

2020
# Publish the port 1337
2121
EXPOSE 1337

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ It supports all their features, and many more.
6464

6565
### Native
6666

67-
1) Install [Node.js](https://nodejs.org/en/download/) >= 12.0.0
67+
1) Install [Node.js](https://nodejs.org/en/download/) >= 16.0.0. Alternatively, install [nvm](https://github.com/nvm-sh/nvm) and then run `nvm use` in this repo, which will install the correct Node version for this repo as defined in the `.nvmrc` file.
6868
2) Run<br>
69-
`$ npm install`<br>
69+
`$ npm ci`<br>
7070
`$ npm run build`<br>
7171
`$ npm start`
7272
3) Visit [http://localhost:1337](http://localhost:1337)
@@ -131,7 +131,7 @@ Breakpoints for the frontend should be set in your browser console.
131131

132132
Be a part of this project! You can run the test using the following.
133133

134-
1. Install dependencies from package.json by running `npm install`
134+
1. Install dependencies from package.json by running `npm ci`
135135
2. Run the test via `npm test`
136136
3. Make some fun new modules!
137137

backend/import/xml/parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function parse(content) {
8181
pt = "",
8282
side = "a",
8383
type = "" } = root.version === "3" ? c : c.prop;
84-
const [power, toughness] = pt.split("/");
84+
const [power, toughness] = String(pt).split("/");
8585
const fixedColors = getTrueColors(root.version, color, colors);
8686
const fixedType = getTrueType(type);
8787
const fixedManaCost = addManaCostBrackets(String(manacost));

config/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const joi = require("@hapi/joi");
1+
const joi = require("joi");
22

33
const envVarsSchema = joi.object({
44
PORT: joi.number()

config/logger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const joi = require("@hapi/joi");
1+
const joi = require("joi");
22

33
const envVarsSchema = joi.object({
44
LOGGER_LEVEL: joi.string()

frontend/src/lobby/Lobby.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default class Lobby extends Component {
2525
<Header/>
2626
<GamesPanel roomInfo={roomInfo}/>
2727
<FileUpload />
28-
<NewsPanel motd={STRINGS.PAGE_SECTIONS.MOTD}/>
28+
{STRINGS.PAGE_SECTIONS.MOTD && <NewsPanel motd={STRINGS.PAGE_SECTIONS.MOTD}/>}
2929
{STRINGS.BRANDING.PAYPAL}
3030
{STRINGS.PAGE_SECTIONS.FOOTER}
3131
<Version version={serverVersion} MTGJSONVersion={mtgJsonVersion} boosterRulesVersion={boosterRulesVersion}/>

frontend/src/lobby/Version.jsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,20 @@ const Version = ({version, MTGJSONVersion, boosterRulesVersion}) => {
1313
return (
1414
<div className="Version">
1515
<div>
16-
dr4ft version: {" "}
16+
<a href="https://github.com/dr4fters/dr4ft">dr4ft</a> {" "}
1717
<a href={`https://github.com/dr4fters/dr4ft/${getLink(version)}`} className='code'>
1818
<code>{version}</code>
1919
</a> <span className='date'>({BUILD_DATE})</span>
2020
</div>
2121

2222
<div>
23-
Card data: <a href="https://www.mtgjson.com">MTGJSON</a> {" "}
23+
<a href="https://www.mtgjson.com">MTGJSON</a> {" "}
2424
<a href={`https://mtgjson.com/changelog/mtgjson-v5/#_${MTGJSONVersion.version.replace(/\./g, "-")}`} className='code'>
2525
<code>v{MTGJSONVersion.version}</code>
2626
</a> <span className='date'>({MTGJSONVersion.date})</span>
2727
</div>
2828

2929
<div>
30-
Booster rules: {" "}
3130
<a href={"https://github.com/taw/magic-sealed-data"}>Magic Sealed Data</a> {" "}
3231
<a href={`https://github.com/taw/magic-sealed-data/commit/${boosterRulesVersion}`} className='code'>
3332
<code>{boosterRulesVersion.substring(0, 7)}</code>

0 commit comments

Comments
 (0)