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

feat: replace babel with esbuild #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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 .github/actions/pnpm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ inputs:
version: # id of input
description: 'The version to use'
required: false
default: 5.12.0
default: 5.13.5

runs:
using: 'composite'
Expand Down
1 change: 0 additions & 1 deletion .github/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ This template repo comes with the following tools:
- `TypeScript`
- `eslint`
- `prettier`
- `babel` configuration.
- `vscode` integration with recommended plugins.
- `codespaces` with a dev container which is ready to use. You can launch this codebase without any need for.
- `changesets` for automating releases.
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,10 @@ cc-reporter
/.size-limit.json
/.stylelintignore
/.stylelintrc.json
/babel.config.js
/globals.d.ts
/linaria.config.js
/lingui.config.js
/jest.config.js
/.vscode
/.prettierrc.js
/.huskyrc
/.lintstagedrc
Expand Down
10 changes: 10 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",

// Better testing UI
"hbenl.vscode-test-explorer",
"kavod-io.vscode-jest-test-adapter"
]
}
16 changes: 10 additions & 6 deletions support/root/.vscode/settings.json → .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,38 @@
{
// Editor
"editor.tabSize": 2,
"editor.rulers": [100],
"editor.rulers": [80, 100],
"editor.insertSpaces": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"eslint.enable": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.markdownlint": true
},

// File
// Files
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
"files.exclude": {
".yarn/releases/**": true
},

// Javascript
// JavaScript
"javascript.format.enable": false,

// Typescript
// TypeScript
"typescript.format.enable": false,
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,

// Prettier
"prettier.ignorePath": ".eslintignore",

// Node Project
// Deno
"deno.enable": false,

// Use PNPM
"npm.packageManager": "pnpm",
"eslint.packageManager": "pnpm",
"prettier.packageManager": "pnpm"
}
57 changes: 20 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"test": "jest --verbose",
"test:build": "cross-env TEST_BUILD=true jest --verbose --coverage=false",
"test:watch": "jest --watch --verbose=false --coverage=false",
"ts": "node -r esm -r ./support/scripts/babel-register.js",
"ts": "node -r esm -r ./support/scripts/esbuild-register.js",
"typecheck": "tsc -b ./tsconfig.references.json",
"update:deps": "pnpm update --latest --recursive -i",
"update:workspace": "pnpm up -r --workspace \"@remirror/*\"",
Expand All @@ -66,42 +66,26 @@
"since 2018"
],
"dependencies": {
"@babel/core": "^7.12.3",
"@babel/parser": "^7.12.5",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/plugin-proposal-decorators": "^7.12.1",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1",
"@babel/plugin-proposal-numeric-separator": "^7.12.5",
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
"@babel/plugin-proposal-optional-chaining": "^7.12.1",
"@babel/plugin-proposal-private-methods": "^7.12.1",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-runtime": "^7.12.1",
"@babel/plugin-transform-template-literals": "^7.12.1",
"@babel/plugin-transform-typescript": "^7.12.1",
"@babel/preset-env": "^7.12.1",
"@babel/runtime": "^7.12.5",
"@changesets/cli": "^2.11.2",
"@changesets/cli": "^2.12.0",
"@jest/types": "^26.6.2",
"@manypkg/cli": "^0.16.1",
"@manypkg/get-packages": "^1.1.1",
"@preconstruct/cli": "^1.2.0",
"@size-limit/preset-big-lib": "^4.7.0",
"@preconstruct/cli": "^2.0.1",
"@size-limit/preset-big-lib": "^4.9.1",
"@testing-library/jest-dom": "^5.11.6",
"@types/eslint": "^7.2.5",
"@types/jest": "^26.0.15",
"@types/eslint": "^7.2.6",
"@types/jest": "^26.0.16",
"@types/jest-axe": "^3.5.1",
"@types/node": "^14.14.7",
"@types/node": "^14.14.10",
"@types/testing-library__jest-dom": "^5.9.5",
"@typescript-eslint/eslint-plugin": "^4.8.1",
"@typescript-eslint/parser": "^4.8.1",
"babel-jest": "^26.6.3",
"babel-plugin-annotate-pure-calls": "^0.4.0",
"babel-plugin-dev-expression": "^0.2.2",
"babel-plugin-macros": "^2.8.0",
"@typescript-eslint/eslint-plugin": "^4.9.0",
"@typescript-eslint/parser": "^4.9.0",
"cpy-cli": "^3.1.1",
"cross-env": "^7.0.2",
"eslint": "^7.13.0",
"cross-env": "^7.0.3",
"esbuild": "^0.8.18",
"esbuild-jest": "^0.3.0",
"esbuild-register": "^1.1.1",
"eslint": "^7.14.0",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-graphql": "^4.0.0",
Expand All @@ -111,7 +95,7 @@
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-markdown": "^2.0.0-rc.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-simple-import-sort": "^6.0.0",
"eslint-plugin-simple-import-sort": "^6.0.1",
"eslint-plugin-sonarjs": "^0.5.0",
"eslint-plugin-unicorn": "^23.0.0",
"esm": "^3.2.25",
Expand All @@ -120,15 +104,14 @@
"jest-circus": "^26.6.3",
"jest-extended": "^0.11.5",
"jest-watch-typeahead": "^0.6.1",
"lint-staged": "^10.5.1",
"lint-staged": "^10.5.3",
"npm-run-all": "^4.1.5",
"prettier": "^2.1.2",
"prettier-plugin-packagejson": "^2.2.7",
"prettier": "^2.2.1",
"prettier-plugin-packagejson": "^2.2.8",
"rimraf": "^3.0.2",
"size-limit": "^4.7.0",
"size-limit": "^4.9.1",
"snapshot-diff": "^0.8.1",
"ts-node": "^9.0.0",
"typescript": "^4.1.1-rc",
"typescript": "^4.1.2",
"typescript-snapshots-plugin": "^1.7.0"
},
"engines": {
Expand Down
3 changes: 0 additions & 3 deletions packages/template-package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
"files": [
"dist"
],
"dependencies": {
"@babel/runtime": "^7.12.5"
},
"publishConfig": {
"access": "public"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/template-package/src/__tests__/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ describe('printTemplate', () => {
spy.mockImplementation(() => {});

it('returns a string', () => {
expect(printTemplate()).toStrictEqual(expect.any(String));
expect(printTemplate()).toStrictEqual(expect?.any(String));
expect(spy).not.toHaveBeenCalled();
});

Expand Down
Loading