Skip to content

Commit

Permalink
Merge tag 'refs/tags/v17.0.0' into apply-17-tag
Browse files Browse the repository at this point in the history
v17.0.0

* tag 'refs/tags/v17.0.0': (891 commits)
  v17.0.0
  Cut docs version v17.0.0
  bump version of vscode extension for release
  Update Algolia app & key (facebook#4715)
  Validate edgeTypeName argument points to an existing type (facebook#4621)
  Parallel watchman queries for saved state and changed files
  Update Cargo.lock (facebook#4714)
  Implement schema generation for weak object fields
  Add code action to rename fragment (facebook#4697)
  Add SchemaDocument go to definition LSP support (facebook#4669)
  Fix Rust error caught by Clippy (facebook#4713)
  Deploy 0.238.0 to xplat
  Tests for interface schema validation
  Attach previous location to duplicate type diagnostic
  Include source location in schema tests
  Refactor to pass Arc<Config> to watchman source instead of &Config
  No need to pass self.config if you have self
  Enforce no duplicate type names
  Make schema validation the default
  Update integration tests to have valid schemas
  ...
  • Loading branch information
Markionium committed Jun 21, 2024
2 parents cf7303f + 5402ff5 commit aeda5dc
Show file tree
Hide file tree
Showing 2,900 changed files with 188,642 additions and 57,879 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ website-prototyping-tools/node_modules
*.md
src/flow/
packages/relay-flight-experimental/
# The VSCode Extension gets linted with a separate setup
vscode-extension
13 changes: 12 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ module.exports = {
// Flow declares trip up the no-redeclare rule
'no-redeclare': 'off',

// Flow handles these rules
'no-unreachable': 'off',

// Prettier and ESLint may disagree on the following rules
indent: 'off',
'array-bracket-spacing': 'off',
Expand All @@ -41,7 +44,15 @@ module.exports = {
// TODO T31139228: remove or re-enable these once eslint-plugin-flowtype
// is compatible with babel-eslint >= 8
'no-undef': 'off',
'no-unused-vars': [1, {args: 'none'}],
'no-unused-vars': [
1,
{
args: 'none',
varsIgnorePattern: '^_',
argsIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],

// This has a different name internally
'no-label-var': 'off',
Expand Down
9 changes: 2 additions & 7 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@
<PROJECT_ROOT>/compiler/.*
<PROJECT_ROOT>/.*/node_modules/.*
.*/node_modules/resolve/test/resolver/malformed_package_json/package.json
<PROJECT_ROOT>/packages/relay-flight-experimental/.*

[options]
exact_by_default=true

module.system=haste
module.system.haste.use_name_reducers=true
# get basename
Expand All @@ -20,6 +17,7 @@ module.system.haste.paths.excludes=.*/__mocks__/.*
module.system.haste.paths.includes=<PROJECT_ROOT>/node_modules/fbjs/lib/.*

munge_underscores=true
; https://fburl.com/code/h2jnts20 - to match internval value

suppress_type=$FlowIssue
suppress_type=$FlowFixMe
Expand All @@ -29,9 +27,6 @@ suppress_type=$FlowExpectedError

format.bracket_spacing=false

experimental.abstract_locations=true
inference_mode=lti

[lints]
untyped-type-import=error

Expand All @@ -45,4 +40,4 @@ untyped-import
untyped-type-import

[version]
^0.201.0
^0.238.0
9 changes: 5 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ For JavaScript changes:

For Rust changes:

1. Ensure all rust code is formatted by running `cargo fmt` from within `./compiler`.
2. If you've added or removed any fixture tests, ensure all generated tests are up to date by running `./scripts/update-fixtures.sh` from the repository root.
3. Ensure all code typechecks by running `cargo check` from within `./compiler`.
4. Ensure all tests pass by running `cargo test` from within `./compiler`.
1. [Install Rust and Cargo](https://www.rust-lang.org/tools/install)
2. Ensure all rust code is formatted by running `cargo fmt` from within `./compiler`.
3. If you've added or removed any fixture tests, ensure all generated tests are up to date by running `./scripts/update-fixtures.sh` from the repository root.
4. Ensure all code typechecks by running `cargo check` from within `./compiler`.
5. Ensure all tests pass by running `cargo test` from within `./compiler`.

### Contributor License Agreement (CLA)

Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
- name: Install dependencies
run: yarn install --frozen-lockfile --ignore-scripts
- name: ESLint
run: yarn run lint
run: yarn --ignore-engines run lint
- name: Prettier
run: yarn run prettier-check
run: yarn --ignore-engines run prettier-check
- name: Typecheck
run: yarn run typecheck
run: yarn --ignore-engines run typecheck

js-tests:
name: JS Tests (Node ${{ matrix.node-version }})
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.64.0
toolchain: 1.72.0
override: true
- name: "Run tests"
run: cargo test --manifest-path=compiler/Cargo.toml --locked ${{ matrix.target.features && '--features' }} ${{ matrix.target.features }}
Expand All @@ -118,7 +118,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.64.0
toolchain: 1.72.0
override: true
- name: "Update fixture tests"
run: ./scripts/update-fixtures.sh
Expand All @@ -136,7 +136,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-06-26
toolchain: nightly-2023-11-11
override: true
components: rustfmt
- name: "rustfmt"
Expand Down Expand Up @@ -177,7 +177,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.64.0
toolchain: 1.72.0
override: true
target: ${{ matrix.target.target }}
- uses: actions/setup-node@v2
Expand Down
61 changes: 55 additions & 6 deletions .github/workflows/docusaurus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,74 @@ on:
branches:
- main

permissions:
contents: write

jobs:
build-compiler-explorer:
name: Build Compiler Explorer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.73.0 # We hit an LLVM error building Wasm on 1.72
override: true
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: "Build Compiler Playground Wasm NPM package"
run: wasm-pack build --target web
working-directory: ./compiler/crates/relay-compiler-playground
- uses: actions/upload-artifact@v4
with:
name: compiler-playground-package
path: compiler/crates/relay-compiler-playground/pkg/

build-and-deploy:
runs-on: ubuntu-latest
needs: [build-compiler-explorer]
steps:
- name: Checkout
uses: actions/checkout@v2.3.1
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
cache-dependency-path: website/yarn.lock

- name: Set up Docusaurus Build Cache
id: cache-docusaurus
uses: actions/cache@v4
with:
path: |
website/node_modules/.cache
website/.docusaurus
key: "docusaurus-build-${{ hashFiles('website/yarn.lock') }}"

- name: Download Compiler Explorer
uses: actions/download-artifact@v4
with:
name: compiler-playground-package
path: tmp/compiler-playground-package

- name: Link Compiler Explorer
run: yarn link
working-directory: tmp/compiler-playground-package

- name: Install and Build
run: |
yarn
yarn link relay-compiler-playground
yarn build
working-directory: website/

- name: Deploy
uses: JamesIves/github-pages-deploy-action@3.7.1
uses: JamesIves/github-pages-deploy-action@v4
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: website/build
CLEAN: true
branch: gh-pages
folder: website/build
clean: true
2 changes: 1 addition & 1 deletion .github/workflows/update-cargo-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.64.0
toolchain: 1.72.0
override: true
- name: cargo check
run: cargo check --features vendored --manifest-path=compiler/Cargo.toml
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/vscode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
- name: Install dependencies
run: yarn install --frozen-lockfile --ignore-scripts
- name: ESLint
run: yarn run lint
run: yarn --ignore-engines run lint
- name: Prettier
run: yarn run prettier-check
run: yarn --ignore-engines run prettier-check
- name: Typecheck
run: yarn run typecheck
run: yarn --ignore-engines run typecheck
- name: Publish
run: yarn vsce publish --pat ${{ secrets.VSCE_PAT }}
run: yarn --ignore-engines vsce publish --pat ${{ secrets.VSCE_PAT }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ npm-debug.log
!.vscode/launch.json
!.vscode/extensions.json
.DS_Store
fb
4 changes: 3 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"dbaeumer.vscode-eslint",
"rust-lang.rust-analyzer",
"meta.relay",
"flowtype.flow-for-vscode"
"flowtype.flow-for-vscode",
// https://github.com/flow/flow-for-vscode#known-issues
"mgmcdermott.vscode-language-babel"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": [
Expand Down
8 changes: 8 additions & 0 deletions compiler/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@
# replace-with = "domorexp"
# [unstable]
# registry-auth = true
# This file should be kept in sync with the project's Buck flags.
# See parent PACKAGE.

[build]
rustflags = [
"-Drust-2018-idioms",
"-Dwarnings",
]
Loading

0 comments on commit aeda5dc

Please sign in to comment.