Updated to typescript 4
Summary: allow-large-files Updated to typescript 4. Note that this is no new major, the way TS numbers is that 4.0 is simply the number after 3.9 (so they refuse to use 3.10). Primarily reason is that it allows us to use `/** deprecated */`. although there are definitely more interesting improvements Reviewed By: passy, nikoant Differential Revision: D23869445 fbshipit-source-id: 54e251b398b8698d9b18898ce66c3203b32aa356
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9f43f01501
commit
191df465b7
@@ -41,7 +41,7 @@
|
||||
"rimraf": "^3.0.2",
|
||||
"ts-jest": "^26.0.0",
|
||||
"ts-node": "^8",
|
||||
"typescript": "^3.9.5"
|
||||
"typescript": "^4.0.3"
|
||||
},
|
||||
"scripts": {
|
||||
"reset": "rimraf lib *.tsbuildinfo",
|
||||
|
||||
@@ -59,6 +59,7 @@ test('valid scoped package json', async () => {
|
||||
|
||||
test('$schema field is required', async () => {
|
||||
const testPackageJson = Object.assign({}, validPackageJson);
|
||||
// @ts-ignore cannot delete non-optional fields
|
||||
delete testPackageJson.$schema;
|
||||
const json = JSON.stringify(testPackageJson);
|
||||
fs.readFile = jest.fn().mockResolvedValue(new Buffer(json));
|
||||
@@ -92,6 +93,7 @@ test('supported schema is required', async () => {
|
||||
|
||||
test('name is required', async () => {
|
||||
const testPackageJson = Object.assign({}, validPackageJson);
|
||||
// @ts-ignore cannot delete non-optional fields
|
||||
delete testPackageJson.name;
|
||||
const json = JSON.stringify(testPackageJson);
|
||||
fs.readFile = jest.fn().mockResolvedValue(new Buffer(json));
|
||||
@@ -150,6 +152,7 @@ test('flippeBundlerEntry must point to an existing file', async () => {
|
||||
test('multiple validation errors reported', async () => {
|
||||
const testPackageJson = Object.assign({}, validPackageJson);
|
||||
testPackageJson.keywords = ['flipper'];
|
||||
// @ts-ignore cannot delete non-optional fields
|
||||
delete testPackageJson.flipperBundlerEntry;
|
||||
const json = JSON.stringify(testPackageJson);
|
||||
fs.readFile = jest.fn().mockResolvedValue(new Buffer(json));
|
||||
|
||||
Reference in New Issue
Block a user