Skip to content

Commit

Permalink
Syncing files from cloud/release/2024.008 to release/2024.008
Browse files Browse the repository at this point in the history
  • Loading branch information
maneeshchiba-hl committed May 9, 2024
1 parent 2a966a6 commit 3ca1bb5
Show file tree
Hide file tree
Showing 602 changed files with 43,831 additions and 23,502 deletions.
100 changes: 1 addition & 99 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,101 +1,3 @@
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "@vanilla", "react", "react-hooks", "jsx-a11y", "lodash", "@tanstack/query"],
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:@typescript-eslint/recommended",
// "plugin:jsx-a11y/recommended",
"prettier",
"prettier/react",
"prettier/@typescript-eslint",
"plugin:@tanstack/eslint-plugin-query/recommended"
],
"parserOptions": {
"project": "./tsconfig.json"
},
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
// Just distasteful
"no-prototype-builtins": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"no-self-assign": "off",
"no-case-declarations": "off",
"prefer-const": "off",
"require-atomic-updates": "off",
"react/prop-types": "off", // We use typescript

// We have typescript for these.
"no-undef": "off",
"getter-return": "off",
"no-dupe-class-members": "off",

// General JS restrictions
"no-console": ["error", { "allow": ["warn", "error"] }],
"no-debugger": ["error"],
"no-alert": ["error"],

// Typescript specific rules
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/ban-types": [
"error",
{
"types": {
"Object": "Avoid using the `Object` type. Did you mean `object`?",
"Function": "Avoid using the `Function` type. Prefer a specific function type, like `() => void`.",
"Boolean": "Avoid using the `Boolean` type. Did you mean `boolean`?",
"Number": "Avoid using the `Number` type. Did you mean `number`?",
"String": "Avoid using the `String` type. Did you mean `string`?",
"Symbol": "Avoid using the `Symbol` type. Did you mean `symbol`?",
"object": false,
"{}": false
}
}
],
"@typescript-eslint/array-type": ["error", { "default": "array-simple" }],
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-object-literal-type-assertion": "off",
"@typescript-eslint/no-var-requires": "off",

// These are currently too strict to enable here
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/explicit-function-return-type": "off",

// A11Y
"jsx-a11y/html-has-lang": "off", // https://github.com/evcohen/eslint-plugin-jsx-a11y/issues/565
"react/jsx-no-target-blank": "off", // Our <SmartLink /> handles this. Detection is janky.

// I want to be able to turn these on the future.
// but they each have a lot of files to fix and should be their own PR.
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/await-thenable": "off",
"@typescript-eslint/promise-function-async": "off",

// React hooks
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",

// Vanilla Custom
"@vanilla/no-unconventional-imports": "error",
"@vanilla/no-cloud-imports-in-core": "error",

// Lodash
// Ensure we always do single package lodash imports.
// Eg. import debounce from "lodash-es/debounce"
"lodash/import-scope": ["error", "method"]
}
"extends": "@vanilla/eslint-config"
}
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
/build/*
!/build/.storybook
!/build/entries
!/build/*.ts
/build/entries/dynamic
!/build/scripts
!/build/tsconfig.json
Expand Down Expand Up @@ -89,9 +88,7 @@
*vanillaforums*
*.kpf
.DS_Store
.node-version
.htaccess
.swc
Thumbs.db
*.swp
_notes
Expand Down
4 changes: 0 additions & 4 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ bower_components
node_modules
vendor
.yarn
package.json
bun.lockb

# App writeable directories
uploads
Expand All @@ -17,8 +15,6 @@ locales
# Build directory
dist
storyshots
.cache
.vite

# IDE Config
.vscode
Expand Down
24 changes: 24 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,30 @@
"max_children": 100,
"max_depth": 5
}
},
{
"type": "node",
"name": "vscode-jest-tests.v2",
"request": "launch",
"env": {
"JEST": "true"
},
"runtimeArgs": [
"--preserve-symlinks",
"--preserve-symlinks-main",
],
"args": [
"--runInBand",
"--watchAll=false",
"--testNamePattern",
"${jest.testNamePattern}",
"--runTestsByPath",
"${jest.testFile}"
],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"program": "node_modules/.bin/jest"
}
]
}
20 changes: 12 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
"**/node_modules": false,
"**/bower_components": true,
"**/.phpunit.result.cache": true,
".htaccess.dist": true,
"build/.cache": true,
".swc": true,
".htaccess.dist": true
},
"search.exclude": {
"**/.git": true,
Expand Down Expand Up @@ -153,8 +151,7 @@
"plugins/vfoptions": true,
"plugins/vanilla-ai": true,
"plugins/webhooks": true,
"plugins/zapier": true,
"plugins/zoom": true,
"plugins/zapier": true
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
Expand Down Expand Up @@ -195,13 +192,20 @@
],
"editor.wordWrapColumn": 120,
"typescript.preferences.autoImportFileExcludePatterns": [
"jquery*",
"vitest/dist/*"
"jquery*"
],
"php.suggest.basic": false,
"files.associations": {
"*.jsx": "javascriptreact",
"*.tpl": "html"
},
"typescript.tsdk": "node_modules/typescript/lib"
"jest.runMode": "on-demand",
"jest.coverageFormatter": "GutterFormatter",
"typescript.tsdk": "node_modules/typescript/lib",
"jest.outputConfig": {
"revealOn": "run",
"revealWithFocus": "test-results",
"clearOnRun": "none"
},
"jest.jestCommandLine": "JEST=true node --preserve-symlinks --preserve-symlinks-main node_modules/.bin/jest",
}
44 changes: 44 additions & 0 deletions .yarn/patches/@emotion-serialize-npm-1.0.3-2a28e46c06.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
diff --git a/types/index.d.ts b/types/index.d.ts
index 9d32022d203c1de72a1a001aa7542feaa1acc047..f1d83cd3177afb5f08838d4ba718011d9d92d0b0 100644
--- a/types/index.d.ts
+++ b/types/index.d.ts
@@ -10,12 +10,12 @@ export type CSSProperties = CSS.PropertiesFallback<number | string>
export type CSSPropertiesWithMultiValues = {
[K in keyof CSSProperties]:
| CSSProperties[K]
- | Array<Extract<CSSProperties[K], string>>
+ | Array<CSSProperties[K]>
}

export type CSSPseudos = { [K in CSS.Pseudos]?: CSSObject }

-export interface ArrayCSSInterpolation extends Array<CSSInterpolation> {}
+export type ArrayCSSInterpolation = Array<CSSInterpolation>;

export type InterpolationPrimitive =
| null
@@ -34,10 +34,10 @@ export interface CSSOthersObject {
[propertiesName: string]: CSSInterpolation
}

-export interface CSSObject
- extends CSSPropertiesWithMultiValues,
- CSSPseudos,
- CSSOthersObject {}
+export type CSSObject =
+ & CSSPropertiesWithMultiValues
+ & CSSPseudos
+ & CSSOthersObject;

export interface ComponentSelector {
__emotion_styles: any
@@ -50,8 +50,7 @@ export type Keyframes = {
toString: () => string
} & string

-export interface ArrayInterpolation<Props>
- extends Array<Interpolation<Props>> {}
+export type ArrayInterpolation<Props> = Array<Interpolation<Props>>;

export interface FunctionInterpolation<Props> {
(props: Props): Interpolation<Props>
363 changes: 363 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Large diffs are not rendered by default.

46 changes: 0 additions & 46 deletions .yarn/plugins/@yarnpkg/plugin-licenses-audit.cjs

This file was deleted.

33 changes: 33 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-licenses.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/* eslint-disable */
//prettier-ignore
module.exports = {
name: "@yarnpkg/plugin-licenses",
factory: function (require) {
var plugin=(()=>{var oe=Object.create,M=Object.defineProperty;var re=Object.getOwnPropertyDescriptor;var ae=Object.getOwnPropertyNames,_=Object.getOwnPropertySymbols,ce=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable;var K=(e,n,t)=>n in e?M(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,F=(e,n)=>{for(var t in n||(n={}))z.call(n,t)&&K(e,t,n[t]);if(_)for(var t of _(n))le.call(n,t)&&K(e,t,n[t]);return e};var de=e=>M(e,"__esModule",{value:!0});var l=e=>{if(typeof require!="undefined")return require(e);throw new Error('Dynamic require of "'+e+'" is not supported')};var E=(e,n)=>{for(var t in n)M(e,t,{get:n[t],enumerable:!0})},pe=(e,n,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of ae(n))!z.call(e,i)&&i!=="default"&&M(e,i,{get:()=>n[i],enumerable:!(t=re(n,i))||t.enumerable});return e},d=e=>pe(de(M(e!=null?oe(ce(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var ve={};E(ve,{default:()=>we});var ee=d(l("@yarnpkg/cli")),x=d(l("@yarnpkg/core")),w=d(l("clipanion"));var o=d(l("@yarnpkg/core")),f=d(l("@yarnpkg/fslib"));var $={};E($,{fs:()=>me,getPackagePath:()=>fe});var q=d(l("@yarnpkg/plugin-pnp")),S=d(l("@yarnpkg/core")),j=d(l("@yarnpkg/fslib")),J=d(l("@yarnpkg/libzip")),fe=async(e,n)=>{ue(e);let t=S.structUtils.convertPackageToLocator(n),i={name:S.structUtils.stringifyIdent(t),reference:t.reference},s=R.getPackageInformation(i);if(!s)return null;let{packageLocation:a}=s;return a},R,ue=e=>{R||(R=module.require((0,q.getPnpPath)(e).cjs))},me=new j.VirtualFS({baseFs:new j.ZipOpenFS({libzip:(0,J.getLibzipSync)(),readOnlyArchives:!0})});var A={};E(A,{fs:()=>Pe,getPackagePath:()=>ge});var W=d(l("@yarnpkg/core")),Y=d(l("@yarnpkg/parsers")),y=d(l("@yarnpkg/fslib")),ge=async(e,n)=>{await he(e);let t=W.structUtils.convertPackageToLocator(n),i=H[W.structUtils.stringifyLocator(t)];if(!i)return null;let s=i.locations[0];return s?y.ppath.join(e.cwd,s):e.cwd},H,he=async e=>{if(!H){let n=y.ppath.join(e.configuration.projectCwd,y.Filename.nodeModules,".yarn-state.yml");H=(0,Y.parseSyml)(await y.xfs.readFilePromise(n,"utf8"))}},Pe=y.xfs;var B=e=>{switch(e){case"pnp":return $;case"node-modules":return A;default:throw new Error("Unsupported linker")}};var Se=f.npath.basename(__dirname)==="@yarnpkg"?f.ppath.join(f.npath.toPortablePath(__dirname),"../.."):f.ppath.join(f.npath.toPortablePath(__dirname),".."),Z=async(e,n,t,i,s)=>{let a={},g={children:a},r=await G(e,t,i),c=B(e.configuration.get("nodeLinker"));for(let[p,m]of r.entries()){let h=await c.getPackagePath(e,m);if(h===null)continue;let v=JSON.parse(await c.fs.readFilePromise(f.ppath.join(h,f.Filename.manifest),"utf8")),{license:u,url:N,vendorName:T,vendorUrl:I}=ke(v);a[u]||(a[u]={value:o.formatUtils.tuple(o.formatUtils.Type.NO_HINT,u),children:{}});let L=o.structUtils.convertPackageToLocator(m),P=o.formatUtils.tuple(o.formatUtils.Type.DEPENDENT,{locator:L,descriptor:p}),k=s?{}:F(F(F({},N?{url:{value:o.formatUtils.tuple(o.formatUtils.Type.NO_HINT,V("URL",N,n))}}:{}),T?{vendorName:{value:o.formatUtils.tuple(o.formatUtils.Type.NO_HINT,V("VendorName",T,n))}}:{}),I?{vendorUrl:{value:o.formatUtils.tuple(o.formatUtils.Type.NO_HINT,V("VendorUrl",I,n))}}:{}),ne={value:P,children:k},ie=o.structUtils.stringifyLocator(L),se=a[u].children;se[ie]=ne}return g},G=async(e,n,t)=>{let i=new Map,s;if(n){if(t){for(let c of e.workspaces)c.manifest.devDependencies.clear();let r=await o.Cache.find(e.configuration);await e.resolveEverything({report:new o.ThrowReport,cache:r})}s=e.storedDescriptors.values()}else s=e.workspaces.flatMap(r=>{let c=[r.anchoredDescriptor];for(let[p,m]of r.dependencies.entries())t&&r.manifest.devDependencies.has(p)||c.push(m);return c});let a=o.miscUtils.sortMap(s,[r=>o.structUtils.stringifyIdent(r),r=>o.structUtils.isVirtualDescriptor(r)?"0":"1",r=>r.range]),g=new Set;for(let r of a.values()){let c=e.storedResolutions.get(r.descriptorHash);if(!c)continue;let p=e.storedPackages.get(c);if(!p)continue;let{descriptorHash:m}=o.structUtils.isVirtualDescriptor(r)?o.structUtils.devirtualizeDescriptor(r):r;g.has(m)||(g.add(m),i.set(r,p))}return i},ke=e=>{let{license:n,licenses:t,repository:i,homepage:s,author:a}=e;return{license:(()=>{if(n)return C(n);if(t){if(!Array.isArray(t))return C(t);if(t.length===1)return C(t[0]);if(t.length>1)return`(${t.map(C).join(" OR ")})`}return Q})(),url:(i==null?void 0:i.url)||s,vendorName:a==null?void 0:a.name,vendorUrl:s||(a==null?void 0:a.url)}},Q="UNKNOWN",C=e=>(typeof e!="string"?e.type:e)||Q,V=(e,n,t)=>t?n:`${e}: ${n}`,X=async(e,n,t)=>{let i=await G(e,n,t),s=B(e.configuration.get("nodeLinker")),a=new Map;for(let r of i.values()){let c=await s.getPackagePath(e,r);if(c===null)continue;let p=JSON.parse(await s.fs.readFilePromise(f.ppath.join(c,f.Filename.manifest),"utf8")),h=(await s.fs.readdirPromise(c,{withFileTypes:!0})).filter(P=>P.isFile()).map(({name:P})=>P),v=h.find(P=>{let k=P.toLowerCase();return k==="license"||k.startsWith("license.")||k==="unlicense"||k.startsWith("unlicense.")});if(!v)continue;let u=await s.fs.readFilePromise(f.ppath.join(c,v),"utf8"),N=h.find(P=>{let k=P.toLowerCase();return k==="notice"||k.startsWith("notice.")}),T;N&&(T=await s.fs.readFilePromise(f.ppath.join(c,N),"utf8"));let I=T?`${u}
NOTICE
${T}`:u,L=a.get(I);L?L.set(p.name,p):a.set(I,new Map([[p.name,p]]))}let g=`THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY BE CONTAINED IN PORTIONS OF THE ${String(e.topLevelWorkspace.manifest.raw.name).toUpperCase().replace(/-/g," ")} PRODUCT.
`;for(let[r,c]of a.entries()){g+=`-----
`;let p=[],m=[];for(let{name:v,repository:u}of c.values())p.push(v),(u==null?void 0:u.url)&&m.push(c.size===1?u.url:`${u.url} (${v})`);let h=[];h.push(`The following software may be included in this product: ${p.join(", ")}.`),m.length>0&&h.push(`A copy of the source code may be downloaded from ${m.join(", ")}.`),h.push("This software contains the following license and notice below:"),g+=`${h.join(" ")}
`,g+=`${r.trim()}
`}return g};var U=class extends w.Command{constructor(){super(...arguments);this.recursive=w.Option.Boolean("-R,--recursive",!1,{description:"Include transitive dependencies (dependencies of direct dependencies)"});this.production=w.Option.Boolean("--production",!1,{description:"Exclude development dependencies"});this.json=w.Option.Boolean("--json",!1,{description:"Format output as JSON"});this.excludeMetadata=w.Option.Boolean("--exclude-metadata",!1,{description:"Exclude dependency metadata from output"})}async execute(){let n=await x.Configuration.find(this.context.cwd,this.context.plugins),{project:t,workspace:i}=await x.Project.find(n,this.context.cwd);if(!i)throw new ee.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState();let s=await Z(t,this.json,this.recursive,this.production,this.excludeMetadata);x.treeUtils.emitTree(s,{configuration:n,stdout:this.context.stdout,json:this.json,separators:1})}};U.paths=[["licenses","list"]],U.usage=w.Command.Usage({description:"display the licenses for all packages in the project",details:`
This command prints the license information for packages in the project. By default, only direct dependencies are listed.
If \`-R,--recursive\` is set, the listing will include transitive dependencies (dependencies of direct dependencies).
If \`--production\` is set, the listing will exclude development dependencies.
`,examples:[["List all licenses of direct dependencies","$0 licenses list"],["List all licenses of direct and transitive dependencies","$0 licenses list --recursive"],["List all licenses of production dependencies only","$0 licenses list --production"]]});var te=d(l("@yarnpkg/cli")),D=d(l("@yarnpkg/core")),b=d(l("clipanion"));var O=class extends b.Command{constructor(){super(...arguments);this.recursive=b.Option.Boolean("-R,--recursive",!1,{description:"Include transitive dependencies (dependencies of direct dependencies)"});this.production=b.Option.Boolean("--production",!1,{description:"Exclude development dependencies"})}async execute(){let n=await D.Configuration.find(this.context.cwd,this.context.plugins),{project:t,workspace:i}=await D.Project.find(n,this.context.cwd);if(!i)throw new te.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState();let s=await X(t,this.recursive,this.production);this.context.stdout.write(s)}};O.paths=[["licenses","generate-disclaimer"]],O.usage=b.Command.Usage({description:"display the license disclaimer including all packages in the project",details:`
This command prints the license disclaimer for packages in the project. By default, only direct dependencies are listed.
If \`-R,--recursive\` is set, the disclaimer will include transitive dependencies (dependencies of direct dependencies).
If \`--production\` is set, the disclaimer will exclude development dependencies.
`,examples:[["Include licenses of direct dependencies","$0 licenses generate-disclaimer"],["Include licenses of direct and transitive dependencies","$0 licenses generate-disclaimer --recursive"],["Include licenses of production dependencies only","$0 licenses list --production"]]});var ye={commands:[U,O]},we=ye;return ve;})();
return plugin;
}
};
768 changes: 768 additions & 0 deletions .yarn/releases/yarn-3.1.1.cjs

Large diffs are not rendered by default.

0 comments on commit 3ca1bb5

Please sign in to comment.