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

Update deps #151

Closed
wants to merge 13 commits into from
Closed
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
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
timeout-minutes: 15
strategy:
matrix:
node-version: [16.x, 17.x, 18.x]
node-version: [18.x, 20.x]
os:
- runner: ubuntu-latest
- runner: macos-latest
Expand All @@ -70,6 +70,8 @@ jobs:

- name: Setup
uses: ./.github/actions/setup
with:
node-version: ${{ matrix.node-version }}

- name: Build
run: pnpm run build
Expand Down
14 changes: 7 additions & 7 deletions apps/commonality/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"type": "module",
"engines": {
"node": ">=16"
"node": ">=18.17.0"
},
"files": [
"dist",
Expand All @@ -29,7 +29,7 @@
"build:cli": "tsup-node --config tsup.config.cli.ts",
"build:utilities": "tsup-node --config tsup.config.utilities.ts",
"build": "npm-run-all clean build:*",
"dev:cli": "tsup-nodesup --config tsup-node.config.cli.ts --watch",
"dev:cli": "tsup-node --config tsup.config.cli.ts --watch",
"dev:utilities": "tsup-node --config tsup.config.utilities.ts --watch",
"clean": "rimraf ./dist",
"dev": "pnpm run clean && npm-run-all --parallel dev:*",
Expand All @@ -46,10 +46,10 @@
"chalk": "^5.3.0",
"commander": "^11.0.0",
"detect-indent": "^7.0.1",
"find-up": "^6.3.0",
"find-up": "^7.0.0",
"fs-extra": "^11.1.1",
"get-port": "^7.0.0",
"globby": "^13.2.2",
"globby": "^14.0.0",
"jest-diff": "^29.7.0",
"jiti": "^1.21.0",
"local-pkg": "^0.5.0",
Expand All @@ -60,7 +60,7 @@
"prompts": "^2.4.2",
"std-env": "^3.6.0",
"strip-ansi": "^7.1.0",
"update-notifier": "^6.0.2",
"update-notifier": "^7.0.0",
"wait-on": "^7.2.0",
"yaml": "^2.3.2",
"zod": "^3.22.4"
Expand All @@ -82,10 +82,10 @@
"@types/prompts": "^2.4.4",
"@types/wait-on": "^5.3.1",
"eslint-config-commonality": "workspace:*",
"execa": "^7.2.0",
"execa": "^8.0.1",
"npm-run-all": "^4.1.5",
"tsup": "^8.0.1",
"typescript": "^5.2.2",
"vitest": "^0.34.6"
"vitest": "^1.1.0"
}
}
5 changes: 2 additions & 3 deletions apps/commonality/test/integration/smoke.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { describe, expect, it, vi } from 'vitest';
import { execa } from 'execa';
import { exec } from 'node:child_process';
import stripAnsi from 'strip-ansi';
import os from 'node:os';
import fs from 'fs-extra';
Expand All @@ -23,9 +23,8 @@ describe('smoke', () => {

await fs.copy(fixturePath, temporaryPath);

const cliProcess = execa(binPath, {
const cliProcess = exec(binPath, {
cwd: temporaryPath,
stdout: 'pipe',
});

let output = '';
Expand Down
38 changes: 10 additions & 28 deletions apps/commonality/test/integration/studio.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { describe, test, expect, vi } from 'vitest';
import fs from 'fs-extra';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { execa } from 'execa';
import { exec } from 'node:child_process';
import os from 'node:os';
import getPort from 'get-port';
import stripAnsi from 'strip-ansi';
Expand All @@ -26,12 +26,10 @@ describe.concurrent('studio', () => {
);
await fs.copy(fixturePath, temporaryPath);

const cliProcess = execa(
binPath,
['studio', '--debug', '--port', String(preferredPort), '--install'],
const cliProcess = exec(
`${binPath} studio --debug --port ${String(preferredPort)} --install`,
{
cwd: temporaryPath,
stdout: 'pipe',
},
);

Expand Down Expand Up @@ -71,16 +69,12 @@ describe.concurrent('studio', () => {
{ timeout: 100_000 },
);

cliProcess.kill('SIGTERM', {
forceKillAfterTimeout: 2000,
});
cliProcess.kill('SIGINT');

await vi.waitFor(() => {
expect(output).toContain(`Successfully exited Commonality Studio`);
});

cliProcess?.kill();

await fs.remove(temporaryPath);
},
{ timeout: 200_000 },
Expand All @@ -99,12 +93,10 @@ describe.concurrent('studio', () => {
);
await fs.copy(fixturePath, temporaryPath);

const cliProcess = execa(
binPath,
['studio', '--debug', '--port', String(preferredPort), '--install'],
const cliProcess = exec(
`${binPath} studio --debug --port ${String(preferredPort)} --install`,
{
cwd: temporaryPath,
stdout: 'pipe',
},
);

Expand Down Expand Up @@ -143,16 +135,12 @@ describe.concurrent('studio', () => {
{ timeout: 100_000 },
);

cliProcess.kill('SIGTERM', {
forceKillAfterTimeout: 2000,
});
cliProcess.kill('SIGINT');

await vi.waitFor(() => {
expect(output).toContain(`Successfully exited Commonality Studio`);
});

cliProcess?.kill();

await fs.remove(temporaryPath);
},
{ timeout: 200_000 },
Expand All @@ -171,12 +159,10 @@ describe.concurrent('studio', () => {
);
await fs.copy(fixturePath, temporaryPath);

const cliProcess = execa(
binPath,
['studio', '--debug', '--port', String(preferredPort), '--install'],
const cliProcess = exec(
`${binPath} studio --debug --port ${String(preferredPort)} --install`,
{
cwd: temporaryPath,
stdout: 'pipe',
},
);

Expand Down Expand Up @@ -215,16 +201,12 @@ describe.concurrent('studio', () => {
{ timeout: 100_000 },
);

cliProcess.kill('SIGTERM', {
forceKillAfterTimeout: 2000,
});
cliProcess.kill('SIGINT');

await vi.waitFor(() => {
expect(output).toContain(`Successfully exited Commonality Studio`);
});

cliProcess?.kill();

await fs.remove(temporaryPath);
},
{ timeout: 200_000 },
Expand Down
34 changes: 0 additions & 34 deletions apps/documentation/logo.tsx

This file was deleted.

13 changes: 8 additions & 5 deletions apps/documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,20 @@
},
"homepage": "https://github.com/shuding/nextra-docs-template#readme",
"dependencies": {
"@commonalityco/ui-core": "workspace:*",
"@commonalityco/ui-design-system": "workspace:*",
"next": "^13.0.6",
"next": "^14.0.4",
"nextra": "latest",
"nextra-theme-docs": "latest",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tailwindcss": "^3.3.3"
"react-dom": "^18.2.0"
},
"devDependencies": {
"@commonalityco/config-tailwind": "workspace:*",
"@types/node": "18.11.10",
"typescript": "^4.9.3"
"@types/node": "^20.10.5",
"autoprefixer": "^10.4.16",
"postcss": "^8.4.30",
"tailwindcss": "^3.4.0",
"typescript": "^5.2.2"
}
}
21 changes: 21 additions & 0 deletions apps/documentation/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import './globals.css';
import { Vollkorn, Inter } from 'next/font/google';
import { cn } from '@commonalityco/ui-design-system';

export const vollkorn = Vollkorn({
subsets: ['latin'],
variable: '--font-vollkorn',
});

export const inter = Inter({
subsets: ['latin'],
variable: '--font-inter',
});

export default function MyApp({ Component, pageProps }) {
return (
<div className={cn(inter.className, inter.variable, vollkorn.variable)}>
<Component {...pageProps} />
</div>
);
}
1 change: 1 addition & 0 deletions apps/documentation/pages/globals.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import '@commonalityco/config-tailwind/globals.css';
3 changes: 2 additions & 1 deletion apps/documentation/pages/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Introduction

> Commonality helps you scale large JavaScript projects with the tools you already love.
9Commonality helps you scale large JavaScript projects with the
tools you already love.

We believe that modern monorepo tooling unlocks next generation workflows that help you deliver faster at bigger a scale.
But working with large monorepos can be difficult, and almost everyone has a horror story about working in one.
Expand Down
14 changes: 7 additions & 7 deletions apps/documentation/pages/reference/checks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ You can return a `Message` object from the `message` function to dynamically con
```ts
type Message = {
text: string;
filepath?: string;
context?: string;
filePath?: string;
suggestion?: string;
};
```

Expand All @@ -112,15 +112,15 @@ const ensureTSConfigExtends = defineCheck((base: string) => {

if (!tsConfig) {
return {
text: 'tsconfig.json does not exist',
filepath: 'tsconfig.json',
title: 'tsconfig.json does not exist',
filePath: 'tsconfig.json',
};
}

return {
text: `tsconfig.json must extend ${base}`,
filepath: 'tsconfig.json',
context: diff(tsConfig, { ...tsConfig, extends: base }),
title: `tsconfig.json must extend ${base}`,
filePath: 'tsconfig.json',
suggestion: diff(tsConfig, { ...tsConfig, extends: base }),
};
},
};
Expand Down
6 changes: 6 additions & 0 deletions apps/documentation/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
13 changes: 13 additions & 0 deletions apps/documentation/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const baseConfig = require('@commonalityco/config-tailwind');
const path = require('path');

/** @type {import('tailwindcss').Config} */
module.exports = {
...baseConfig,
content: [
'./src/**/*.{js,ts,jsx,tsx}',
'./pages/**/*.{js,jsx,ts,tsx,md,mdx}',
'./components/**/*.{js,jsx,ts,tsx,md,mdx}',
'./theme.config.tsx',
],
};
6 changes: 3 additions & 3 deletions apps/documentation/theme.config.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from 'react';
import { DocsThemeConfig } from 'nextra-theme-docs';
import { Logo } from './logo';
import { Logo } from '@commonalityco/ui-core';

const config: DocsThemeConfig = {
logo: (
<span>
<span className="flex gap-3 items-center">
<Logo />
Commonality
<span className="font-serif text-xl font-semibold">commonality</span>
</span>
),
project: {
Expand Down
Loading
Loading