Skip to content

Commit

Permalink
Merge branch 'dev' into pull-request/api/add-a-way-to-get-the-list-of…
Browse files Browse the repository at this point in the history
…-all-factions

# Conflicts:
#	src/NetscriptFunctions.ts
  • Loading branch information
catloversg committed Nov 30, 2024
2 parents cbc2bc3 + 9c7223f commit e80b775
Show file tree
Hide file tree
Showing 730 changed files with 13,571 additions and 8,211 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ node_modules/
dist
input
assets
coverage
doc
markdown
electron
Expand Down
20 changes: 18 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ module.exports = {
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
//"plugin:@typescript-eslint/recommended-requiring-type-checking",
//"plugin:@typescript-eslint/strict",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:@typescript-eslint/strict",
],
parser: "@typescript-eslint/parser",
parserOptions: {
Expand All @@ -34,10 +34,26 @@ module.exports = {
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-explicit-any": "off",
"react/no-unescaped-entities": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/no-unsafe-enum-comparison": "off",
},
settings: {
react: {
version: "detect",
},
},
overrides: [
/**
* Some enums are subsets of other enums. For example, UniversityLocationName contains locations of 3 universities.
* With each member, we refer to the respective LocationName's member instead of using a literal string. This usage
* is okay, but it triggers the "prefer-literal-enum-member" rule. This rule is not useful in this case, so we
* suppress it in NetscriptDefinitions.d.ts.
*/
{
files: ["src/ScriptEditor/NetscriptDefinitions.d.ts"],
rules: {
"@typescript-eslint/prefer-literal-enum-member": ["off"],
},
},
],
};
8 changes: 4 additions & 4 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ jobs:
- name: Install pandoc dependency
run: sudo apt-get install -y pandoc
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js 16.13.1
uses: actions/setup-node@v2
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 16.13.1
node-version: 20
cache: "npm"
- name: Install NPM dependencies for version updater
working-directory: ./tools/bump-version
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16.13.1
uses: actions/setup-node@v2
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 16.13.1
node-version: 20
cache: "npm"
- name: Install npm dependencies
run: npm ci
Expand All @@ -29,11 +29,11 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16.13.1
uses: actions/setup-node@v2
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 16.13.1
node-version: 20
cache: "npm"
- name: Install npm dependencies
run: npm ci
Expand All @@ -43,11 +43,11 @@ jobs:
name: Prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16.13.1
uses: actions/setup-node@v2
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 16.13.1
node-version: 20
cache: "npm"
- name: Install npm dependencies
run: npm ci
Expand All @@ -57,11 +57,11 @@ jobs:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16.13.1
uses: actions/setup-node@v2
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 16.13.1
node-version: 20
cache: "npm"
- name: Install npm dependencies
run: npm ci
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
- run: npm ci
- run: npm run build
- uses: actions/upload-pages-artifact@v1
- uses: actions/upload-pages-artifact@v3
with:
path: ".app"
- name: Deploy to gh pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v4
10 changes: 5 additions & 5 deletions .github/workflows/fetch-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
fetchChangelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node v16.13.1
uses: actions/setup-node@v2
- uses: actions/checkout@v4
- name: Use Node 20
uses: actions/setup-node@v4
with:
node-version: 16.13.1
node-version: 20
cache: "npm"
- name: Install NPM dependencies
working-directory: ./tools/fetch-changelog
Expand All @@ -38,7 +38,7 @@ jobs:
echo
echo "You may want to go to https://gist.github.com/ to upload the final changelog"
echo "The next step will require an url because we can't easily pass multiline strings to actions"
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: bitburner_changelog___DRAFT.md
path: ./tools/fetch-changelog/changes.md
6 changes: 3 additions & 3 deletions .github/workflows/steamDev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:
uses: CyberAndrii/setup-steamcmd@v1

- name: Checkout dev branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: dev

- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20

- name: Build and deploy
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/title-and-dist-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout files
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Check bundle files
id: changed-bundle-files
uses: tj-actions/changed-files@v18.4
uses: tj-actions/changed-files@v44
with:
files: |
dist/*
dist/**
- name: Warn when dist was changed or title is invalid
id: warn-bundles-changed
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.vscode
Changelog.txt
Netburner.txt
/coverage
/doc/build
/node_modules
/electron/node_modules
Expand All @@ -15,6 +16,7 @@ dist/bitburner.d.ts

# folder for bundles images / fonts that are generated by webpack
dist/assets
dist/mathjax

# Monaco bundle files
dist/*.worker.*
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package.json
dist
doc/build
doc/source
coverage
.build
.package
.app
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ See the [frequently asked questions](./doc/FAQ.md) for more information . To dis

# Documentation

The game's official documentation can be found in-game.
There are 2 types of documentation:

The [in-game documentation](./markdown/bitburner.md) is generated from the [TypeScript definitions](./src/ScriptEditor/NetscriptDefinitions.d.ts).
- In-game documentation: It can be found in the Documentation tab. This is the best place to get up-to-date information. You can also read the web version at https://github.com/bitburner-official/bitburner-src/blob/stable/src/Documentation/doc/index.md.
- NS API documentation: It's generated from the [TypeScript definitions](./src/ScriptEditor/NetscriptDefinitions.d.ts). You can read it at https://github.com/bitburner-official/bitburner-src/blob/stable/markdown/bitburner.md.

Anyone is welcome to contribute to the documentation by editing the [source
files](/doc/source) and then making a pull request with your contributions.
files](/src/Documentation/doc) and then making a pull request with your contributions.
For further guidance, please refer to the "As A Documenter" section of
[CONTRIBUTING](./doc/CONTRIBUTING.md).
[CONTRIBUTING](./doc/CONTRIBUTING.md#as-a-documenter).

# Contribution

Expand Down
15 changes: 12 additions & 3 deletions api-extractor.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,18 @@
*
* DEFAULT VALUE: no overrideTsconfig section
*/
// "overrideTsconfig": {
// . . .
// }
/**
* We need to override TsConfig, otherwise api-extractor will read our tsconfig.json and process every files, not
* just NetscriptDefinitions.d.ts.
*/
"overrideTsconfig": {
"compilerOptions": {
// Without enabling this option, api-extractor will report unrelated warnings of jsdom. Check this link for more
// information: https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/57467.
"skipLibCheck": true
},
"include": ["src/ScriptEditor/NetscriptDefinitions.d.ts"]
}
/**
* This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended
* and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when
Expand Down
Loading

0 comments on commit e80b775

Please sign in to comment.