Skip to content

Commit

Permalink
feat: add top-level-await, resolves #156
Browse files Browse the repository at this point in the history
  • Loading branch information
Yash-Singh1 committed Aug 28, 2024
1 parent 35ea1d3 commit 40b20d8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 21 deletions.
5 changes: 4 additions & 1 deletion lib/data/compat-headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ export const compatMap: {
{ type: 'violentmonkey', versionConstraint: '*' },
{ type: 'greasemonkey', versionConstraint: '>=0.2.5' }
],
sandbox: [{ type: 'tampermonkey', versionConstraint: '>=4.18' }]
sandbox: [{ type: 'tampermonkey', versionConstraint: '>=4.18' }],
'top-level-await': [
{ type: 'violentmonkey', versionConstraint: '>=2.19.2' }
]
},
nonFunctional: {
name: [
Expand Down
41 changes: 21 additions & 20 deletions tests/lib/rules/no-invalid-headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,27 @@ const ruleTester = new RuleTester();
ruleTester.run('no-invalid-headers', noInvalidHeader, {
valid: [
`// ==UserScript==
// @name Bottom Padding to Swagger UI
// @namespace https://github.com/Yash-Singh1/UserScripts
// @version 1.3
// @description Adds bottom padding to the Swagger UI
// @description:en Adds bottom padding to the Swagger UI
// @author Yash Singh
// @match https://*/*
// @match http://*/*
// @icon https://petstore.swagger.io/favicon-32x32.png
// @grant none
// @license MIT
// @homepage https://github.com/Yash-Singh1/UserScripts/tree/main/Bottom_Padding_to_Swagger_UI#readme
// @homepageURL https://github.com/Yash-Singh1/UserScripts/tree/main/Bottom_Padding_to_Swagger_UI#readme
// @supportURL https://github.com/Yash-Singh1/UserScripts/issues
// @downloadURL https://raw.githubusercontent.com/Yash-Singh1/UserScripts/main/Bottom_Padding_to_Swagger_UI/Bottom_Padding_to_Swagger_UI.user.js
// @updateURL https://raw.githubusercontent.com/Yash-Singh1/UserScripts/main/Bottom_Padding_to_Swagger_UI/Bottom_Padding_to_Swagger_UI.user.js
// @nocompat Chrome
// @history 1.0 Initial release
// @copyright 2020-2021, Yash Singh (https://github.com/Yash-Singh1)
// @sandbox JavaScript
// @name Bottom Padding to Swagger UI
// @namespace https://github.com/Yash-Singh1/UserScripts
// @version 1.3
// @description Adds bottom padding to the Swagger UI
// @description:en Adds bottom padding to the Swagger UI
// @author Yash Singh
// @match https://*/*
// @match http://*/*
// @icon https://petstore.swagger.io/favicon-32x32.png
// @grant none
// @license MIT
// @homepage https://github.com/Yash-Singh1/UserScripts/tree/main/Bottom_Padding_to_Swagger_UI#readme
// @homepageURL https://github.com/Yash-Singh1/UserScripts/tree/main/Bottom_Padding_to_Swagger_UI#readme
// @supportURL https://github.com/Yash-Singh1/UserScripts/issues
// @downloadURL https://raw.githubusercontent.com/Yash-Singh1/UserScripts/main/Bottom_Padding_to_Swagger_UI/Bottom_Padding_to_Swagger_UI.user.js
// @updateURL https://raw.githubusercontent.com/Yash-Singh1/UserScripts/main/Bottom_Padding_to_Swagger_UI/Bottom_Padding_to_Swagger_UI.user.js
// @nocompat Chrome
// @history 1.0 Initial release
// @copyright 2020-2021, Yash Singh (https://github.com/Yash-Singh1)
// @sandbox JavaScript
// @top-level-await
// ==/UserScript==
/* globals globalObj */`
],
Expand Down

0 comments on commit 40b20d8

Please sign in to comment.