Skip to content

Update grpc-js to 1.3 #4871

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
merged 3 commits into from
May 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"@types/chai-as-promised": "7.1.3",
"@types/child-process-promise": "2.2.1",
"@types/clone": "2.1.0",
"@types/eslint": "7.2.6",
"@types/eslint": "7.2.10",
"@types/inquirer": "7.3.1",
"@types/listr": "0.14.2",
"@types/long": "4.0.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/firestore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"@firebase/logger": "0.2.6",
"@firebase/util": "1.1.0",
"@firebase/webchannel-wrapper": "0.4.1",
"@grpc/grpc-js": "^1.0.0",
"@grpc/grpc-js": "^1.3.2",
"@grpc/proto-loader": "^0.5.0",
"node-fetch": "2.6.1",
"tslib": "^2.1.0"
Expand All @@ -85,7 +85,7 @@
"@rollup/plugin-alias": "3.1.1",
"@rollup/plugin-json": "4.1.0",
"@rollup/plugin-node-resolve": "11.2.0",
"@types/eslint": "7.2.6",
"@types/eslint": "7.2.10",
"@types/json-stable-stringify": "1.0.32",
"json-stable-stringify": "1.0.1",
"protobufjs": "6.10.2",
Expand Down
2 changes: 1 addition & 1 deletion repo-scripts/prune-dts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"reportDir": "./coverage/node"
},
"devDependencies": {
"@types/eslint": "7.2.6",
"@types/eslint": "7.2.10",
"@types/prettier": "2.1.6",
"mocha": "8.2.1"
}
Expand Down
12 changes: 6 additions & 6 deletions repo-scripts/size-analysis/bundle/webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import webpack from 'webpack';
// @ts-ignore
import virtualModulesPlugin from 'webpack-virtual-modules';
import { createFsFromVolume, Volume } from 'memfs';
import { createFsFromVolume, IFs, Volume } from 'memfs';
import path from 'path';
import { projectRoot } from '../util';

Expand All @@ -35,7 +35,7 @@ export async function bundleWithWebpack(
const entryFileName = '/virtual_path_to_in_memory_file/index.js';
const outputFileName = 'o.js';

const resolveConfig: webpack.Resolve = {
const resolveConfig: webpack.ResolveOptions = {
mainFields: ['esm2017', 'module', 'main']
};

Expand Down Expand Up @@ -71,15 +71,15 @@ export async function bundleWithWebpack(
}

// Hack to get string output without reading the output file using an internal API from webpack
res(stats.compilation.assets[outputFileName]._value);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
res((stats!.compilation.assets[outputFileName] as any)['_value']);
});
});
}

function getMemoryFileSystem(): webpack.OutputFileSystem {
function getMemoryFileSystem(): IFs {
const fs = createFsFromVolume(new Volume());
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(fs as any).join = path.join.bind(path);

return (fs as unknown) as webpack.OutputFileSystem;
return fs;
}
2 changes: 1 addition & 1 deletion repo-scripts/size-analysis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"rollup-plugin-typescript2": "0.29.0",
"@rollup/plugin-virtual": "2.0.3",
"webpack": "4.44.2",
"@types/webpack": "4.41.25",
"@types/webpack": "5.28.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it required to pass CI? This is a wrong change because we are not using webpack@5. I will be okay with it if it's required to pass CI for some unknown reason. I don't want us to waste time on it and we should be updating to webpack@5 soon.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if 5.x is required, but the version that was installed without the yarn.lock file caused compilation errors. I can try an older 4.x version, but we should be safe since the code itself did not change.

Copy link
Contributor Author

@schmidt-sebastian schmidt-sebastian May 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is here (from the original yarn.lock):

"@types/[email protected]":
  version "4.41.25"
  resolved "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.25.tgz#4d3b5aecc4e44117b376280fbfd2dc36697968c4"
  integrity sha512-cr6kZ+4m9lp86ytQc1jPOJXgINQyz3kLLunZ57jznW+WIAL0JqZbGubQk4GlD42MuQL5JGOABrxdpqqWeovlVQ==
  dependencies:
    "@types/anymatch" "*"
    "@types/node" "*"
    "@types/tapable" "*"
    "@types/uglify-js" "*"
    "@types/webpack-sources" "*"
    source-map "^0.6.0"

Webpack 4.x does not compile against tapable 2.x. The old version was 1.06 (before removing the lock file).

These are some of the errors:

../../node_modules/@types/webpack/index.d.ts:1106:32 - error TS2314: Generic type 'HookMap<H>' requires 1 type argument(s).

1106                 callAnyMember: HookMap;
                                    ~~~~~~~

"webpack-virtual-modules": "0.4.1",
"child-process-promise": "2.2.1",
"memfs": "3.2.0",
Expand Down
Loading