monaco-marker-data-provider
Advanced tools
Comparing version 1.1.1 to 1.2.1
@@ -6,3 +6,3 @@ # MIT License | ||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and | ||
associated documentation files (the "Software"), to deal in the Software without restriction, | ||
associated documentation files (the “Software”), to deal in the Software without restriction, | ||
including without limitation the rights to use, copy, modify, merge, publish, distribute, | ||
@@ -15,3 +15,3 @@ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT | ||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT | ||
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
@@ -18,0 +18,0 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES |
{ | ||
"name": "monaco-marker-data-provider", | ||
"version": "1.1.1", | ||
"version": "1.2.1", | ||
"description": "Provide Monaco marker data in a similar way as other integrations", | ||
"type": "module", | ||
"exports": "./index.js", | ||
"exports": "./dist/monaco-marker-data-provider.js", | ||
"scripts": { | ||
"prepack": "tsc --noEmit false", | ||
"start": "vitest", | ||
"prepack": "tsc --build", | ||
"pretest": "tsc --build", | ||
"test": "vitest run" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/remcohaszing/monaco-marker-data-provider.git" | ||
}, | ||
"repository": "remcohaszing/monaco-marker-data-provider", | ||
"keywords": [ | ||
@@ -24,26 +21,27 @@ "diagnostics", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/remcohaszing/monaco-marker-data-provider/issues" | ||
}, | ||
"bugs": "https://github.com/remcohaszing/monaco-marker-data-provider/issues", | ||
"homepage": "https://github.com/remcohaszing/monaco-marker-data-provider#readme", | ||
"funding": { | ||
"url": "https://github.com/sponsors/remcohaszing" | ||
}, | ||
"funding": "https://github.com/sponsors/remcohaszing", | ||
"files": [ | ||
"index.js", | ||
"index.d.ts" | ||
"src", | ||
"dist", | ||
"!tsconfig.json", | ||
"!*.tsbuildinfo" | ||
], | ||
"dependencies": { | ||
"monaco-types": "^0.1.0" | ||
}, | ||
"peerDependencies": { | ||
"monaco-editor": ">=0.30.0" | ||
"monaco-editor-core": ">=0.30.0" | ||
}, | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "^5.0.0", | ||
"@vitest/coverage-c8": "^0.22.0", | ||
"eslint": "^8.0.0", | ||
"eslint-config-remcohaszing": "^6.0.0", | ||
"jsdom": "^20.0.0", | ||
"prettier": "^2.0.0", | ||
"typescript": "^4.0.0", | ||
"vitest": "^0.22.0" | ||
"eslint-config-remcohaszing": "^10.0.0", | ||
"jsdom": "^24.0.0", | ||
"prettier": "^3.0.0", | ||
"remark-cli": "^12.0.0", | ||
"remark-preset-remcohaszing": "^3.0.0", | ||
"typescript": "^5.0.0", | ||
"vitest": "^1.0.0" | ||
} | ||
} |
# Monaco marker data provider | ||
[![ci workflow](https://github.com/remcohaszing/monaco-marker-data-provider/actions/workflows/ci.yaml/badge.svg)](https://github.com/remcohaszing/monaco-marker-data-provider/actions/workflows/ci.yaml) | ||
[![codecov](https://codecov.io/gh/remcohaszing/monaco-marker-data-provider/branch/main/graph/badge.svg)](https://codecov.io/gh/remcohaszing/monaco-marker-data-provider) | ||
[![npm version](https://img.shields.io/npm/v/monaco-marker-data-provider)](https://www.npmjs.com/package/monaco-marker-data-provider) | ||
[![prettier code style](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://prettier.io) | ||
[![npm downloads](https://img.shields.io/npm/dm/monaco-marker-data-provider)](https://www.npmjs.com/package/monaco-marker-data-provider) | ||
Provider marker data for Monaco models. | ||
## Table of Contents | ||
- [Introduction](#introduction) | ||
- [Installation](#installation) | ||
- [Usage](#usage) | ||
- [API](#api) | ||
- [`registerMarkerDataProvider(monaco, languageId, provider)`](#registermarkerdataprovidermonaco-languageid-provider) | ||
- [Options](#options) | ||
- [Returns](#returns) | ||
- [Types](#types) | ||
- [`MarkerDataProvider`](#markerdataprovider) | ||
- [`MarkerDataProviderInstance`](#markerdataproviderinstance) | ||
- [License](#license) | ||
## Introduction | ||
Monaco editor supports marker data to highlight parts of a document using squiggly lines. This is | ||
@@ -29,6 +44,6 @@ analogous to diagnostics in the language server protocol. Monaco editor itself only supports this | ||
```typescript | ||
import * as monaco from 'monaco-editor'; | ||
import { registerMarkerDataProvider } from 'monaco-marker-data-provider'; | ||
import * as monaco from 'monaco-editor' | ||
import { registerMarkerDataProvider } from 'monaco-marker-data-provider' | ||
import { myCustomValidator } from './myCustomValidator'; | ||
import { myCustomValidator } from './myCustomValidator' | ||
@@ -39,5 +54,5 @@ registerMarkerDataProvider(monaco, 'plaintext', { | ||
provideMarkerData(model) { | ||
return myCustomValidator(model.getValue()); | ||
}, | ||
}); | ||
return myCustomValidator(model.getValue()) | ||
} | ||
}) | ||
``` | ||
@@ -57,2 +72,6 @@ | ||
#### Returns | ||
A [`MarkerDataProviderInstance`](#markerdataproviderinstance) instance | ||
## Types | ||
@@ -70,4 +89,10 @@ | ||
### `MarkerDataProviderInstance` | ||
A disposable with the following properties: | ||
- `revalidate`: A function to revalidate all models. | ||
## License | ||
[MIT](https://github.com/remcohaszing/monaco-marker-data-provider/blob/main/LICENSE.md) | ||
[MIT](LICENSE.md) © [Remco Haszing](https://github.com/remcohaszing) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16997
8
240
95
2
1
1
1
+ Addedmonaco-types@^0.1.0
+ Addedmonaco-editor-core@0.52.0(transitive)
+ Addedmonaco-types@0.1.0(transitive)
- Removedmonaco-editor@0.52.0(transitive)