Scenario: I have two repositories
monorepotool
and I want to move the tool repository into the monorepo under path packages/tool with
rewritten history in a way it looks like it has been there all the time.
| import { DataFunctionArgs } from "@remix-run/node"; | |
| export async function loader({ request }: DataFunctionArgs) { | |
| const user = getUser(request); | |
| return typedJson({ | |
| email: user.email, | |
| }); | |
| } |
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "type": "node", | |
| "request": "launch", | |
| "name": "Jest Current File", | |
| "runtimeExecutable": "sh", // <-- The important bit! | |
| "program": "node_modules/.bin/jest", | |
| "args": ["${relativeFile}"], |
| function maybeGlobal<T extends object>(): Partial<T> | undefined { | |
| return (typeof window !== "undefined" ? window : undefined) as any; | |
| } | |
| maybeGlobal<{ | |
| MY_GLOBAL_VARIABLE: string; | |
| }>()?.MY_GLOBAL_VARIABLE?.toUpperCase(); |
| ni() { | |
| # Add packages | |
| if [ "${1:-}" != "" ]; then | |
| if [ -f pnpm-lock.yaml ] || [ -f ../../pnpm-lock.yaml ]; then | |
| pnpm install $@ | |
| else | |
| npm install $@ | |
| fi | |
| return | |
| fi |
| /** | |
| * Unwraps the type so it's more readable in vscode tool tips | |
| * */ | |
| export type Unwrap<T> = T extends object | |
| ? { | |
| [P in keyof T]: Unwrap<T[P]>; | |
| } | |
| : T; |
| <?php | |
| register_graphql_connection( [ | |
| 'fromType' => 'HierarchicalContentNode', | |
| 'toType' => 'ContentNode', | |
| 'fromFieldName' => 'ancestors', | |
| 'description' => __( 'Returns ancestors of the node. Default ordered as lowest (closest to the child) to highest (closest to the root).', 'wp-graphql' ), | |
| 'resolve' => function( Post $post, $args, $context, $info ) { | |
| $ancestors = get_ancestors( $post->ID, null, 'post_type' ); | |
| if ( empty( $ancestors ) || ! is_array( $ancestors ) ) { | |
| return null; |
| if input volume of (get volume settings) = 0 then | |
| display notification "MIC ON!" | |
| set level to 100 | |
| else | |
| set level to 0 | |
| display notification "MUTED MIC!" | |
| end if | |
| set volume input volume level |
| <?php | |
| class ActionLogger { | |
| static $started; | |
| static $prev; | |
| static function start() { | |
| self::$started = hrtime(true); | |
| self::$prev = hrtime(true); | |
| add_action('all', [self::class, '__action_all'], 10000); |
| <?php | |
| namespace Valu\Sakke\GraphQL; | |
| use WPGraphQL\AppContext; | |
| use GraphQL\Type\Definition\ResolveInfo; | |
| use GraphQL\Deferred; | |
| /** | |
| * Basing on WPGraphQL v0.7 |