Skip to content
Merged
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
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import defaultConfig from '@tabnews/config/eslint';
import defaultConfig from 'barso/eslint';

const config = [
...defaultConfig,
Expand Down
2 changes: 1 addition & 1 deletion lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { npm as default } from '@tabnews/config/lint-staged';
export { npm as default } from 'barso/lint-staged';
4,849 changes: 1,596 additions & 3,253 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"start:examples:form": "npm run start --workspace examples/form",
"build:examples:markdown": "npm run build && npm run build --workspace examples/markdown",
"start:examples:markdown": "npm run start --workspace examples/markdown",
"test": "tn test",
"test:run": "tn test run",
"coverage": "tn test --coverage",
"test": "barso test",
"test:run": "barso test run",
"coverage": "barso test --coverage",
"lint": "eslint . --max-warnings 0 && prettier --check .",
"format": "eslint --fix . && prettier --write .",
"commit": "cz",
Expand All @@ -28,12 +28,12 @@
"devDependencies": {
"@commitlint/cli": "20.2.0",
"@commitlint/config-conventional": "20.2.0",
"@tabnews/config": "0.6.0",
"@testing-library/dom": "10.4.1",
"@testing-library/jest-dom": "6.9.1",
"@testing-library/react": "16.3.1",
"@testing-library/user-event": "14.6.1",
"@vitejs/plugin-react-swc": "4.2.2",
"barso": "0.6.1",
"commitizen": "4.3.1",
"cz-conventional-changelog": "3.3.0",
"husky": "9.1.7",
Expand Down
40 changes: 16 additions & 24 deletions packages/helpers/src/environment.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ describe('helpers/environment', () => {

describe('Local', () => {
test('Dev', async () => {
const { isBuildTime, isEdgeRuntime, isLambdaRuntime, isProduction, isServerlessRuntime } = await import(
'./index.js'
);
const { isBuildTime, isEdgeRuntime, isLambdaRuntime, isProduction, isServerlessRuntime } =
await import('./index.js');

expect(isBuildTime).toBe(false);
expect(isEdgeRuntime).toBe(false);
Expand All @@ -25,9 +24,8 @@ describe('helpers/environment', () => {
test('Build', async () => {
vi.stubEnv('NEXT_PHASE', 'phase-production-build');

const { isBuildTime, isEdgeRuntime, isLambdaRuntime, isProduction, isServerlessRuntime } = await import(
'./index.js'
);
const { isBuildTime, isEdgeRuntime, isLambdaRuntime, isProduction, isServerlessRuntime } =
await import('./index.js');

expect(isBuildTime).toBe(true);
expect(isEdgeRuntime).toBe(false);
Expand All @@ -38,9 +36,8 @@ describe('helpers/environment', () => {

test('Production', async () => {
vi.stubEnv('NODE_ENV', 'production');
const { isBuildTime, isEdgeRuntime, isLambdaRuntime, isProduction, isServerlessRuntime } = await import(
'./index.js'
);
const { isBuildTime, isEdgeRuntime, isLambdaRuntime, isProduction, isServerlessRuntime } =
await import('./index.js');

expect(isBuildTime).toBe(false);
expect(isEdgeRuntime).toBe(false);
Expand All @@ -58,9 +55,8 @@ describe('helpers/environment', () => {
vi.stubEnv('NEXT_PUBLIC_VERCEL_ENV', 'production');
vi.stubEnv('VERCEL', '1');

const { isBuildTime, isEdgeRuntime, isLambdaRuntime, isProduction, isServerlessRuntime } = await import(
'./index.js'
);
const { isBuildTime, isEdgeRuntime, isLambdaRuntime, isProduction, isServerlessRuntime } =
await import('./index.js');

expect(isBuildTime).toBe(true);
expect(isEdgeRuntime).toBe(false);
Expand All @@ -73,9 +69,8 @@ describe('helpers/environment', () => {
vi.stubEnv('NEXT_PUBLIC_VERCEL_ENV', 'production');
vi.stubEnv('VERCEL', '1');

const { isBuildTime, isEdgeRuntime, isLambdaRuntime, isProduction, isServerlessRuntime } = await import(
'./index.js'
);
const { isBuildTime, isEdgeRuntime, isLambdaRuntime, isProduction, isServerlessRuntime } =
await import('./index.js');

expect(isBuildTime).toBe(false);
expect(isEdgeRuntime).toBe(false);
Expand All @@ -88,9 +83,8 @@ describe('helpers/environment', () => {
vi.stubEnv('NEXT_PUBLIC_VERCEL_ENV', 'preview');
vi.stubEnv('VERCEL', '1');

const { isBuildTime, isEdgeRuntime, isLambdaRuntime, isProduction, isServerlessRuntime } = await import(
'./index.js'
);
const { isBuildTime, isEdgeRuntime, isLambdaRuntime, isProduction, isServerlessRuntime } =
await import('./index.js');

expect(isBuildTime).toBe(false);
expect(isEdgeRuntime).toBe(false);
Expand All @@ -113,9 +107,8 @@ describe('helpers/environment', () => {
vi.stubEnv('NEXT_PUBLIC_VERCEL_ENV', 'production');
vi.stubEnv('VERCEL', '1');

const { isBuildTime, isEdgeRuntime, isLambdaRuntime, isProduction, isServerlessRuntime } = await import(
'./index.js'
);
const { isBuildTime, isEdgeRuntime, isLambdaRuntime, isProduction, isServerlessRuntime } =
await import('./index.js');

expect(isBuildTime).toBe(false);
expect(isEdgeRuntime).toBe(true);
Expand All @@ -128,9 +121,8 @@ describe('helpers/environment', () => {
vi.stubEnv('NEXT_PUBLIC_VERCEL_ENV', 'preview');
vi.stubEnv('VERCEL', '1');

const { isBuildTime, isEdgeRuntime, isLambdaRuntime, isProduction, isServerlessRuntime } = await import(
'./index.js'
);
const { isBuildTime, isEdgeRuntime, isLambdaRuntime, isProduction, isServerlessRuntime } =
await import('./index.js');

expect(isBuildTime).toBe(false);
expect(isEdgeRuntime).toBe(true);
Expand Down
2 changes: 1 addition & 1 deletion prettier.config.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from '@tabnews/config/prettier';
export { default } from 'barso/prettier';
2 changes: 1 addition & 1 deletion vitest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import createConfig from '@tabnews/config/vitest';
import createConfig from 'barso/vitest';

const config = createConfig({
test: {
Expand Down
Loading