Skip to content
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

Upgrade Typescript to 4.7.4 #5309

Merged
merged 2 commits into from Jul 18, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -254,7 +254,7 @@
"turndown": "^4.0.2",
"turndown-plugin-gfm": "^1.0.2",
"type-fest": "^1.1.1",
"typescript": "^4.1.3",
"typescript": "^4.7.4",
"underscore": "^1.12.1",
"universal-cookie": "^4.0.2",
"universal-cookie-express": "^2.2.0",
Expand Down
Expand Up @@ -90,7 +90,7 @@ export const GardenCodeWidget = ({classes, type}:{classes:ClassesType, type: str

const fields = type === "friend" ? ["title", "startTime"] : ["title", "startTime", "contents", "type", "afOnly"]

return <Components.ContentStyles contentType="commentExceptPointerEvents" className={classes.root} {...keyDown}>
return <Components.ContentStyles contentType="commentExceptPointerEvents" className={classes.root}>
{!!currentCode
? <div>
Here is your code! It is valid from <strong>{moment(new Date(currentCode.startTime)).format("dddd, MMMM Do, h:mma")}</strong> until <strong>{moment(new Date(currentCode.endTime)).format("h:mma")}</strong>.
Expand Down
3 changes: 2 additions & 1 deletion packages/lesswrong/lib/vulcan-forms/schema_utils.ts
Expand Up @@ -119,8 +119,9 @@ export const getFieldSchema = <T extends DbObject>(fieldName: string, schema: Si
// right now we support only fields with one type
export const getSchemaType = schema => schema.type.definitions[0].type;

const getArrayNestedSchema = <T extends DbObject>(fieldName: keyof T, schema: SchemaType<T>) => {
const getArrayNestedSchema = <T extends DbObject>(fieldName: string&keyof T, schema: SimpleSchemaType<T>) => {
const arrayItemSchema = schema._schema[`${fieldName}.$`];

const nestedSchema = arrayItemSchema && getSchemaType(arrayItemSchema);
return nestedSchema;
};
Expand Down
2 changes: 1 addition & 1 deletion packages/lesswrong/server/scripts/voteMigration.ts
Expand Up @@ -6,7 +6,7 @@ import { Vulcan } from '../vulcan-lib';
async function runVoteMigration(collectionName) {
try {
//Abort early if votes collection is not empty
if (Votes.findOneArbitrary()) {
if (await Votes.findOneArbitrary()) {
//eslint-disable-next-line no-console
console.error("Votes collection non-empty, aborting migration")
return
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Expand Up @@ -14264,10 +14264,10 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

typescript@^4.1.3:
version "4.1.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz"
integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==
typescript@^4.7.4:
version "4.7.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235"
integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==

ua-parser-js@^0.7.18:
version "0.7.28"
Expand Down