-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update config with year-based browsers selection
- Loading branch information
Showing
8 changed files
with
2,358 additions
and
1,258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
node_modules | ||
index.* | ||
!index.ts | ||
node_modules/ | ||
/index.d.ts | ||
/index.js | ||
/generate-link.d.ts | ||
/generate-link.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules/ | ||
/index.d.ts | ||
/index.js | ||
/generate-link.d.ts | ||
/generate-link.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* eslint-disable no-console */ | ||
import {readFile, writeFile} from 'node:fs/promises'; | ||
import {resolve} from 'node:path'; | ||
|
||
import config from './index'; | ||
|
||
async function main() { | ||
const readmeFilePath = resolve(__dirname, 'README.md'); | ||
|
||
const content = await readFile(readmeFilePath, 'utf8'); | ||
const updatedContent = content.replace( | ||
/(\(https:\/\/browsersl\.ist\/#q=)[^)]+/, | ||
`$1${encodeURIComponent(config.join('\n'))}`, | ||
); | ||
|
||
await writeFile(readmeFilePath, updatedContent, 'utf8'); | ||
} | ||
|
||
main().catch((error) => { | ||
console.error(error); | ||
process.exit(1); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
export = [ | ||
'last 2 major versions and since 2022 and > 0.05%', | ||
'last 2 major versions and last 2 years and fully supports es6 and > 0.05%', | ||
'not dead', | ||
'not op_mini all', | ||
'not and_qq > 0', | ||
'not and_uc > 0', | ||
'Firefox ESR', | ||
// For support more Chromium browsers | ||
'last 7 Chrome versions', | ||
// For support Safari 15 | ||
'Safari >= 15.6 and > 0.1%', | ||
//#FIXME: this is done temporarily to fix https://github.com/browserslist/browserslist-useragent/issues/80 | ||
'Firefox >= 109', | ||
'Chrome > 0 and last 2 years and > 0.05%', | ||
'Safari > 0 and last 2 years and > 0.05%', | ||
'Firefox > 0 and last 2 years and > 0.01%', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
{ | ||
"extends": "@gravity-ui/tsconfig/tsconfig.json", | ||
"compilerOptions": { | ||
"target": "es3", | ||
"target": "ES2022", | ||
"declaration": true, | ||
"outDir": "." | ||
}, | ||
"types": ["node"], | ||
"include": ["src/**/*"], | ||
"exclude": ["**/node_modules/**"] | ||
} |