forked from microsoft/FluidFramework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "build: Upgrade pipelines to Node18 + upgrade nvm recommendati…
…on (microsoft#17389)" (Keep changes to server) This reverts commit 232921a.
- Loading branch information
1 parent
cc4f515
commit 4b47802
Showing
50 changed files
with
1,900 additions
and
1,408 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 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 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,11 @@ | ||
{ | ||
"development": { | ||
"NODE_ENV": "development" | ||
}, | ||
"test": { | ||
"NODE_ENV": "test" | ||
}, | ||
"production": { | ||
"NODE_ENV": "production" | ||
} | ||
} |
This file contains 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,83 @@ | ||
/*! | ||
* Copyright (c) Microsoft Corporation and contributors. All rights reserved. | ||
* Licensed under the MIT License. | ||
*/ | ||
|
||
module.exports = { | ||
extends: ['@fluidframework/eslint-config-fluid'], | ||
root: true, | ||
rules: { | ||
// TODO: Recover "noUnusedLocals" behavior as part of linting. (This rule seems to be broken in the Fluid repo.) | ||
// '@typescript-eslint/no-unused-vars': ['error', { args: 'none', varsIgnorePattern: '^_' }], | ||
'@typescript-eslint/quotes': [ | ||
'error', | ||
'single', | ||
{ | ||
allowTemplateLiterals: true, | ||
avoidEscape: true, | ||
}, | ||
], | ||
// Intentionally not unifying signatures can enable more scoped API documentation and a better developer experience, which accounts | ||
// for all violations of this rule in this package at the time of writing. | ||
'@typescript-eslint/unified-signatures': 'off', | ||
|
||
// Prettier | ||
'comma-dangle': 'off', | ||
'@typescript-eslint/comma-dangle': 'off', | ||
'@typescript-eslint/member-delimiter-style': 'off', | ||
'max-len': 'off', | ||
|
||
// Rules which could be re-enabled (by dropping these overrides, as they are enabled in base config) with some minor fixes: | ||
'@typescript-eslint/no-shadow': 'off', | ||
'no-shadow': 'off', | ||
|
||
// It seems convenient to place schemas and generated files in subfolders | ||
// TODO: Determine if we want to organize them this way | ||
'import/no-internal-modules': [ | ||
'error', | ||
{ | ||
allow: ['graphql-schemas/*', 'graphql-generated/*', 'graphql/tsutils/Maybe'], | ||
}, | ||
], | ||
|
||
// unicorn/no-null | ||
// GraphQL uses null rather than undefined. See https://github.com/graphql/graphql-js/issues/1298 | ||
// TODO: Determine if we want to use a helper library to convert null to undefined automatically | ||
'unicorn/no-null': 'off', | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['src/test/**'], | ||
rules: { | ||
// Chai assertions trigger the unused expression lint rule. | ||
'@typescript-eslint/no-unused-expressions': 'off', | ||
|
||
// Dev dependencies and internal modules may be used in test code | ||
'import/no-extraneous-dependencies': [ | ||
'error', | ||
{ | ||
devDependencies: true, | ||
}, | ||
], | ||
'import/no-internal-modules': 'off', | ||
}, | ||
}, | ||
{ | ||
files: ['**/test/**', 'src/index.ts'], | ||
rules: { | ||
// Test code and the main package export shouldn't be linted for unused exports | ||
'import/no-unused-modules': 'off', | ||
}, | ||
}, | ||
{ | ||
// Files generated by graphql-codegen don't uphold all of the Fluid repo's lint rules. | ||
// TODO: Where possible, customize the codegen output to be compliant. | ||
files: ['src/graphql-generated/**'], | ||
rules: { | ||
'@typescript-eslint/consistent-type-definitions': 'off', | ||
'@typescript-eslint/array-type': 'off', | ||
'import/no-internal-modules': 'off', | ||
}, | ||
}, | ||
], | ||
}; |
This file contains 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,18 @@ | ||
# Compiled typescript | ||
dist | ||
lib | ||
|
||
# Logs | ||
logs | ||
*.log | ||
|
||
# Dependencies | ||
node_modules | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# GraphQL codegen | ||
# TODO: Determine if/how to change the fluid build scripts to automatically codegen while still being compliant. | ||
# For now, just include the generated code in git | ||
# graphql-generated |
This file contains 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,6 @@ | ||
nyc | ||
*.log | ||
**/*.tsbuildinfo | ||
src/test | ||
dist/test | ||
**/_api-extractor-temp/** |
This file contains 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,8 @@ | ||
{ | ||
"all": true, | ||
"include": ["dist/**", "src/**"], | ||
"exclude": ["**/{test,tests}/**", "**/**.{test,tests}.{js,jsx,ts,tsx}", "**/*test_index.js"], | ||
"cache-dir": "nyc/.cache", | ||
"temp-directory": "nyc/.nyc_output", | ||
"report-dir": "nyc/report" | ||
} |
This file contains 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,18 @@ | ||
# Coverage | ||
nyc | ||
|
||
# Build output | ||
dist | ||
lib | ||
|
||
# Dependencies | ||
node_modules | ||
|
||
# Used by API-Extractor | ||
*.api.md | ||
_api-extractor-temp/** | ||
|
||
# Formatting is not properly enforced in PR gating since `lerna version` uniformizes the file in a previous pipeline step. | ||
# Since in practice this is likely only a tabs vs spaces issue, this file has just been converted to match the rest of the | ||
# repository. | ||
package.json |
This file contains 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,8 @@ | ||
{ | ||
"arrowParens": "always", | ||
"tabWidth": 4, | ||
"useTabs": true, | ||
"printWidth": 120, | ||
"singleQuote": true, | ||
"endOfLine": "auto" | ||
} |
This file contains 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,21 @@ | ||
Copyright (c) Microsoft Corporation and contributors. All rights reserved. | ||
|
||
MIT License | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains 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,11 @@ | ||
# @fluid-experimental/tree-graphql | ||
|
||
A prototype package which uses the @graphql-codegen library to automatically generate graphql types and resolvers that can read a SharedTree (see @fluid-experimental/tree) via a given graphql schema. | ||
|
||
# Codegen | ||
|
||
This repo includes an [example graphql schema called 'Pizza'](.\src\graphql-schemas\Pizza.ts) in the './src/graphql-schemas' folder. After running codegen, an associated output file will be generated in the './src/graphql-generated' folder. This behavior is customized by a [graphql-codegen plugin](https://graphql-code-generator.com/docs/custom-codegen/index) called [SharedTreePlugin](.\src\graphql-plugins\SharedTreePlugin.ts), and the codegen step itself is configured via the [codegen.yml](.\codegen.yml) file in the repo root. | ||
|
||
# Usage | ||
|
||
After running `npm run refresh`, run `npm run codegen` in this package, followed by a build. Then the tests in [SharedTreeQuerier.tests.ts](.\src\test\SharedTreeQuerier.tests.ts) can be run. |
This file contains 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,4 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", | ||
"extends": "@fluidframework/build-common/api-extractor-common.json" | ||
} |
This file contains 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,6 @@ | ||
schema: 'src/graphql-schemas/Pizza.ts' | ||
generates: | ||
src/graphql-generated/Pizza.ts: | ||
plugins: | ||
- 'typescript' | ||
- dist/graphql-plugins/SharedTreePlugin.js |
This file contains 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,65 @@ | ||
{ | ||
"name": "@fluid-experimental/tree-graphql", | ||
"version": "1.4.0", | ||
"description": "Prototype using GraphQL to access a distributed tree", | ||
"homepage": "https://fluidframework.com", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/microsoft/FluidFramework.git", | ||
"directory": "experimental/dds/tree-graphql" | ||
}, | ||
"license": "MIT", | ||
"author": "Microsoft and contributors", | ||
"sideEffects": false, | ||
"main": "dist/index.js", | ||
"module": "lib/index.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"build": "concurrently npm:build:compile npm:lint", | ||
"build:codegen": "npm run build:plugins && graphql-codegen --config codegen.yml && prettier --write src/graphql-generated/*", | ||
"build:compile": "concurrently npm:tsc npm:build:esnext", | ||
"build:docs": "api-extractor run --local", | ||
"build:esnext": "tsc --project ./tsconfig.esnext.json", | ||
"build:full": "npm run build", | ||
"build:full:compile": "npm run build:compile", | ||
"build:plugins": "tsc --project ./tsconfig-graphql-plugins.json", | ||
"clean": "rimraf dist lib *.tsbuildinfo *.build.log", | ||
"eslint": "eslint src", | ||
"eslint:fix": "eslint src --fix", | ||
"lint": "npm run prettier && npm run eslint", | ||
"lint:fix": "npm run prettier:fix && npm run eslint:fix", | ||
"prettier": "prettier --check \"**/*.{js,json,jsx,md,ts,tsx,yml,yaml}\"", | ||
"prettier:fix": "prettier --write \"**/*.{js,json,jsx,md,ts,tsx,yml,yaml}\"", | ||
"test": "nyc npm run test:mocha", | ||
"test:mocha": "mocha \"dist/**/*.tests.js\" --exit -r node_modules/@fluidframework/mocha-test-setup --unhandled-rejections=strict", | ||
"test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha", | ||
"tsc": "tsc" | ||
}, | ||
"dependencies": { | ||
"@fluid-experimental/tree": "^1.4.0", | ||
"@fluidframework/common-utils": "^0.32.2", | ||
"@graphql-codegen/plugin-helpers": "^1.18.2", | ||
"@graphql-codegen/visitor-plugin-common": "^1.18.2", | ||
"graphql": "^15.4.0", | ||
"graphql-tools": "^7.0.2" | ||
}, | ||
"devDependencies": { | ||
"@fluidframework/mocha-test-setup": "^1.4.0", | ||
"@fluidframework/test-runtime-utils": "^1.4.0", | ||
"@graphql-codegen/cli": "1.20.1", | ||
"@graphql-codegen/typescript": "1.20.2", | ||
"@microsoft/api-extractor": "^7.22.2", | ||
"@rushstack/eslint-config": "^2.5.1", | ||
"@types/mocha": "^9.1.1", | ||
"@types/ws": "^6.0.1", | ||
"chai": "^4.2.0", | ||
"concurrently": "^6.2.0", | ||
"cross-env": "^7.0.2", | ||
"eslint": "~8.6.0", | ||
"mocha": "^10.0.0", | ||
"nyc": "^15.0.0", | ||
"prettier": "^2.3.1", | ||
"rimraf": "^2.6.2", | ||
"typescript": "~4.5.5" | ||
} | ||
} |
Oops, something went wrong.