jupyterlab_vscode_icons_extension 1.0.90 → 1.0.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -247,8 +247,9 @@ const fileTypeConfigs = [
247
247
  // Config Files
248
248
  {
249
249
  extensions: ['.env'],
250
- pattern: '^(\\.env\\.[^.]+|[^.]+\\.env)$',
250
+ pattern: '^(\\.env\\.(?!zip|tar|gz|bz2|xz|7z|rar)[^.]+|[^.]+\\.env)$',
251
251
  iconName: 'file-type-dotenv',
252
+ mimeTypes: ['text/x-sh'],
252
253
  group: 'enableConfigIcons'
253
254
  },
254
255
  {
@@ -729,6 +730,9 @@ const plugin = {
729
730
  if (config.pattern) {
730
731
  fileTypeOptions.pattern = config.pattern;
731
732
  }
733
+ if (config.mimeTypes) {
734
+ fileTypeOptions.mimeTypes = config.mimeTypes;
735
+ }
732
736
  docRegistry.addFileType(fileTypeOptions);
733
737
  });
734
738
  // Register Makefile with custom icon (document with gears, from text-x-makefile-svgrepo-com.svg)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jupyterlab_vscode_icons_extension",
3
- "version": "1.0.90",
3
+ "version": "1.0.95",
4
4
  "description": "Jupyterlab extension with a shameless rip-off of the vscode-icons into our beloved environment",
5
5
  "keywords": [
6
6
  "jupyter",
package/src/index.ts CHANGED
@@ -38,6 +38,7 @@ interface IFileTypeConfig {
38
38
  extensions: string[];
39
39
  pattern?: string;
40
40
  iconName: string;
41
+ mimeTypes?: string[];
41
42
  group: keyof IIconSettings;
42
43
  }
43
44
 
@@ -279,8 +280,9 @@ const fileTypeConfigs: IFileTypeConfig[] = [
279
280
  // Config Files
280
281
  {
281
282
  extensions: ['.env'],
282
- pattern: '^(\\.env\\.[^.]+|[^.]+\\.env)$',
283
+ pattern: '^(\\.env\\.(?!zip|tar|gz|bz2|xz|7z|rar)[^.]+|[^.]+\\.env)$',
283
284
  iconName: 'file-type-dotenv',
285
+ mimeTypes: ['text/x-sh'],
284
286
  group: 'enableConfigIcons'
285
287
  },
286
288
  {
@@ -793,6 +795,10 @@ const plugin: JupyterFrontEndPlugin<void> = {
793
795
  fileTypeOptions.pattern = config.pattern;
794
796
  }
795
797
 
798
+ if (config.mimeTypes) {
799
+ fileTypeOptions.mimeTypes = config.mimeTypes;
800
+ }
801
+
796
802
  docRegistry.addFileType(fileTypeOptions);
797
803
  });
798
804