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

ci(workflows): fix ci and size-limit workflows #290

Closed
wants to merge 9 commits into from
16 changes: 8 additions & 8 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
root = true
root=true

[*]
indent_style = space
indent_size = 2
tab_width = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style=space
indent_size=2
tab_width=2
end_of_line=lf
charset=utf-8
trim_trailing_whitespace=true
insert_final_newline=true
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
jobs:
default:
strategy:
fail-fast: false
matrix:
node:
- 16
Expand All @@ -20,10 +21,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup target Node.js to enable Corepack
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: Enable Corepack
run: corepack enable

- name: Setup Node.js ${{ matrix.node }}
- name: Setup Node.js ${{ matrix.node }} with cache
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/size-limit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Install Dependencies
run: yarn --immutable

- uses: andresz1/size-limit-action@v1
- uses: andresz1/size-limit-action@v1.8.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
skip_step: install
Expand Down
12 changes: 11 additions & 1 deletion .yarn/plugins/plugin-prepare-lifecycle.cjs
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
module.exports={name:"plugin-prepare-lifecycle",factory:e=>({hooks:{afterAllInstalled(r){if(!r.topLevelWorkspace.manifest.scripts.get("prepare"))return;e("@yarnpkg/shell").execute("yarn prepare")}}})};
module.exports = {
name: 'plugin-prepare-lifecycle',
factory: e => ({
hooks: {
afterAllInstalled(r) {
if (!r.topLevelWorkspace.manifest.scripts.get('prepare')) return
e('@yarnpkg/shell').execute('yarn prepare')
},
},
}),
}
2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ nodeLinker: node-modules
plugins:
- checksum: 37b2361b1502b2054e6779788c0e9bdd6a90ce49852a8cad2feda79b0614ec94f06fb6e78951f5f95429c610d7934dd077caa47413a0227378a102c55161616d
path: .yarn/plugins/plugin-prepare-lifecycle.cjs
spec: "https://github.com/un-es/yarn-plugin-prepare-lifecycle/releases/download/v0.0.1/index.js"
spec: 'https://github.com/un-es/yarn-plugin-prepare-lifecycle/releases/download/v0.0.1/index.js'
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ Add the following to your `.eslintrc` config:
"plugins": ["import"],
"rules": {
// turn on errors for missing imports
"import/no-unresolved": "error"
"import/no-unresolved": "error",
},
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
"@typescript-eslint/parser": [".ts", ".tsx"],
},
"import/resolver": {
"typescript": {
Expand All @@ -92,17 +92,17 @@ Add the following to your `.eslintrc` config:
// use an array
"project": [
"packages/module-a/tsconfig.json",
"packages/module-b/tsconfig.json"
"packages/module-b/tsconfig.json",
],

// use an array of glob patterns
"project": [
"packages/*/tsconfig.json",
"other-packages/*/tsconfig.json"
]
}
}
}
"other-packages/*/tsconfig.json",
],
},
},
},
}
```

Expand All @@ -126,7 +126,7 @@ Default:
"node",
"node-addons",
"browser",
"default"
"default",
]
```

Expand All @@ -143,7 +143,7 @@ Default:
".js",
".jsx",
".json",
".node"
".node",
]
```

Expand All @@ -158,11 +158,11 @@ Default:
// `.tsx` can also be compiled as `.js`
".tsx",
".d.ts",
".js"
".js",
],
".jsx": [".tsx", ".d.ts", ".jsx"],
".cjs": [".cts", ".d.cts", ".cjs"],
".mjs": [".mts", ".d.mts", ".mjs"]
".mjs": [".mts", ".d.mts", ".mjs"],
}
```

Expand All @@ -184,7 +184,7 @@ Default:
"module",
"jsnext:main",

"main"
"main",
]
```

Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@
"is-glob": "^4.0.3"
},
"devDependencies": {
"@1stg/eslint-config": "^8.0.0",
"@1stg/lib-config": "^12.0.1",
"@1stg/prettier-config": "^4.0.1",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.6",
"@commitlint/cli": "^17.8.1",
Expand All @@ -90,9 +92,10 @@
"eslint": "^8.57.0",
"eslint-import-resolver-typescript": "link:.",
"eslint-plugin-import": "npm:eslint-plugin-i@^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"lint-staged": "^13.3.0",
"npm-run-all2": "^5.0.2",
"prettier": "^2.8.8",
"prettier": "^3.3.1",
"react": "^18.2.0",
"simple-git-hooks": "^2.9.0",
"size-limit": "^11.0.0",
Expand All @@ -101,8 +104,7 @@
"typescript": "^5.3.2"
},
"resolutions": {
"eslint-import-resolver-typescript": "link:.",
"prettier": "^2.8.8"
"eslint-import-resolver-typescript": "link:."
},
"typeCoverage": {
"atLeast": 100,
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ function initMappers(options: InternalResolverOptions) {
typeof options.project === 'string'
? [options.project]
: Array.isArray(options.project)
? options.project
: [process.cwd()]
? options.project
: [process.cwd()]

const ignore = ['!**/node_modules/**']

Expand Down
4 changes: 2 additions & 2 deletions tests/withPaths/module/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"type": "commonjs",
"typings": "./module.d.ts",
"private": true
"private": true,
"typings": "./module.d.ts"
}
10 changes: 8 additions & 2 deletions tests/withQuerystring/image.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions tests/withQuerystring/subfolder/image.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading