Skip to content

Commit

Permalink
June 2024 Updates (#228)
Browse files Browse the repository at this point in the history
* .vscode settings updates

* update yarn

* remove eslint

* formatting, linting

* lint fixes

* build updates

* get storybook building

* add path filter to JS ci

* organize imports

* formatting update

* update biome.json

* semver

* packages -> javascript
  • Loading branch information
darthtrevino committed Jun 24, 2024
1 parent 97689b6 commit 8ea5eec
Show file tree
Hide file tree
Showing 1,059 changed files with 9,812 additions and 8,830 deletions.
16 changes: 10 additions & 6 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
{
"name": "Essex JS Toolkit",
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"dbaeumer.vscode-eslint",
"arcanis.vscode-zipfs",
"silvenon.mdx",
"rome.rome"
],
"customizations": {
"vscode": {
"extensions": [
"arcanis.vscode-zipfs",
"biomejs.biome",
"charliermarsh.ruff"
],
}
},

"service": "workspace",

// Set *default* container specific settings.json values on container create.
Expand Down
14 changes: 0 additions & 14 deletions .eslintignore

This file was deleted.

20 changes: 0 additions & 20 deletions .eslintrc

This file was deleted.

20 changes: 17 additions & 3 deletions .github/workflows/main.yml → .github/workflows/javascript-ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
name: CI
on: [push, pull_request]
name: JavaScript CI

on:
push:
branches: [main]
pull_request:
paths:
- "packages/**/*"
- "**/*.ts"
- "**/*.tsx"
- "**/*.js"
- "**/*.mjs"
- "**/*.cjs"
- "**/*.json"
- "yarn.lock"
- .github/workflows/javascript-ci.yml

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
node-version: [18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ packages/*/dist/
packages/*/storybook-static/
packages/*/docsTemp/
.swc/
.turbo/

# Test Output
coverage/
Expand Down
4 changes: 2 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"arcanis.vscode-zipfs",
"rome.rome"
"biomejs.biome",
"charliermarsh.ruff"
]
}
13 changes: 7 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,24 @@
},
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"eslint.nodePath": ".yarn/sdks",
"javascript.preferences.importModuleSpecifier": "relative",
"javascript.preferences.importModuleSpecifierEnding": "js",
"typescript.preferences.importModuleSpecifier": "relative",
"typescript.preferences.importModuleSpecifierEnding": "js",
"[javascript]": {
"editor.defaultFormatter": "rome.rome"
"editor.defaultFormatter": "biomejs.biome"
},
"[javascriptreact]": {
"editor.defaultFormatter": "rome.rome"
"editor.defaultFormatter": "biomejs.biome"
},
"[typescript]": {
"editor.defaultFormatter": "rome.rome"
"editor.defaultFormatter": "biomejs.biome"
},
"[typescriptreact]": {
"editor.defaultFormatter": "rome.rome"
"editor.defaultFormatter": "biomejs.biome"
},
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff"
},
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
Expand All @@ -30,7 +32,6 @@
"*.jsx": "${capture}.js",
"package.json": ".npmignore, turbo.json, tsconfig.json, tsconfig.*.json, jest.config.js, rome.json",
".yarnrc.yml": "yarn.lock, .pnp.cjs, .pnp.loader.mjs",
".eslintrc": ".eslintignore",
".gitignore": ".gitattributes",
"README.md": "SECURITY.md, SUPPORT.md, CODE_OF_CONDUCT.md, LICENSE"
}
Expand Down
893 changes: 0 additions & 893 deletions .yarn/releases/yarn-4.0.1.cjs

This file was deleted.

894 changes: 894 additions & 0 deletions .yarn/releases/yarn-4.3.1.cjs

Large diffs are not rendered by default.

20 changes: 0 additions & 20 deletions .yarn/sdks/eslint/bin/eslint.js

This file was deleted.

20 changes: 0 additions & 20 deletions .yarn/sdks/eslint/lib/api.js

This file was deleted.

6 changes: 0 additions & 6 deletions .yarn/sdks/eslint/package.json

This file was deleted.

9 changes: 8 additions & 1 deletion .yarn/sdks/typescript/bin/tsc
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {createRequire, register} = require(`module`);
const {resolve} = require(`path`);
const {pathToFileURL} = require(`url`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/bin/tsc
require(absPnpApiPath).setup();
if (isPnpLoaderEnabled && register) {
register(pathToFileURL(absPnpLoaderPath));
}
}
}

Expand Down
9 changes: 8 additions & 1 deletion .yarn/sdks/typescript/bin/tsserver
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {createRequire, register} = require(`module`);
const {resolve} = require(`path`);
const {pathToFileURL} = require(`url`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/bin/tsserver
require(absPnpApiPath).setup();
if (isPnpLoaderEnabled && register) {
register(pathToFileURL(absPnpLoaderPath));
}
}
}

Expand Down
9 changes: 8 additions & 1 deletion .yarn/sdks/typescript/lib/tsc.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {createRequire, register} = require(`module`);
const {resolve} = require(`path`);
const {pathToFileURL} = require(`url`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/tsc.js
require(absPnpApiPath).setup();
if (isPnpLoaderEnabled && register) {
register(pathToFileURL(absPnpLoaderPath));
}
}
}

Expand Down
26 changes: 20 additions & 6 deletions .yarn/sdks/typescript/lib/tsserver.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {createRequire, register} = require(`module`);
const {resolve} = require(`path`);
const {pathToFileURL} = require(`url`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/tsserver.js
require(absPnpApiPath).setup();
if (isPnpLoaderEnabled && register) {
register(pathToFileURL(absPnpLoaderPath));
}
}
}

const moduleWrapper = tsserver => {
if (!process.versions.pnp) {
return tsserver;
Expand Down Expand Up @@ -214,11 +228,11 @@ const moduleWrapper = tsserver => {
return tsserver;
};

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/tsserver.js
require(absPnpApiPath).setup();
}
const [major, minor] = absRequire(`typescript/package.json`).version.split(`.`, 2).map(value => parseInt(value, 10));
// In TypeScript@>=5.5 the tsserver uses the public TypeScript API so that needs to be patched as well.
// Ref https://github.com/microsoft/TypeScript/pull/55326
if (major > 5 || (major === 5 && minor >= 5)) {
moduleWrapper(absRequire(`typescript`));
}

// Defer to the real typescript/lib/tsserver.js your application uses
Expand Down
26 changes: 20 additions & 6 deletions .yarn/sdks/typescript/lib/tsserverlibrary.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {createRequire, register} = require(`module`);
const {resolve} = require(`path`);
const {pathToFileURL} = require(`url`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/tsserverlibrary.js
require(absPnpApiPath).setup();
if (isPnpLoaderEnabled && register) {
register(pathToFileURL(absPnpLoaderPath));
}
}
}

const moduleWrapper = tsserver => {
if (!process.versions.pnp) {
return tsserver;
Expand Down Expand Up @@ -214,11 +228,11 @@ const moduleWrapper = tsserver => {
return tsserver;
};

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/tsserverlibrary.js
require(absPnpApiPath).setup();
}
const [major, minor] = absRequire(`typescript/package.json`).version.split(`.`, 2).map(value => parseInt(value, 10));
// In TypeScript@>=5.5 the tsserver uses the public TypeScript API so that needs to be patched as well.
// Ref https://github.com/microsoft/TypeScript/pull/55326
if (major > 5 || (major === 5 && minor >= 5)) {
moduleWrapper(absRequire(`typescript`));
}

// Defer to the real typescript/lib/tsserverlibrary.js your application uses
Expand Down
Loading

0 comments on commit 8ea5eec

Please sign in to comment.