Kaynağa Gözat

Removes UUID package and usage built-ins

main
Eric Amodio 2 yıl önce
ebeveyn
işleme
46356df4af
7 değiştirilmiş dosya ile 13 ekleme ve 27 silme
  1. +1
    -17
      ThirdPartyNotices.txt
  2. +1
    -2
      package.json
  3. +4
    -0
      src/env/browser/crypto.ts
  4. +5
    -1
      src/env/node/crypto.ts
  5. +1
    -1
      src/plus/subscription/authenticationProvider.ts
  6. +1
    -1
      src/plus/subscription/serverConnection.ts
  7. +0
    -5
      yarn.lock

+ 1
- 17
ThirdPartyNotices.txt Dosyayı Görüntüle

@ -19,7 +19,6 @@ This project incorporates components from the projects listed below.
14. sindresorhus/is-fullwidth-code-point (https://github.com/sindresorhus/is-fullwidth-code-point)
15. sindresorhus/string-width (https://github.com/sindresorhus/string-width)
16. sortablejs version 1.15.0 (https://github.com/SortableJS/Sortable)
17. uuid version 8.3.2 (https://github.com/uuidjs/uuid)
%% @octokit/core NOTICES AND INFORMATION BEGIN HERE
=========================================
@ -962,19 +961,4 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
=========================================
END OF sortablejs NOTICES AND INFORMATION
%% uuid NOTICES AND INFORMATION BEGIN HERE
=========================================
The MIT License (MIT)
Copyright (c) 2010-2020 Robert Kieffer and other contributors
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, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
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 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
=========================================
END OF uuid NOTICES AND INFORMATION
END OF sortablejs NOTICES AND INFORMATION

+ 1
- 2
package.json Dosyayı Görüntüle

@ -11194,8 +11194,7 @@
"md5.js": "1.3.5",
"node-fetch": "2.6.7",
"path-browserify": "1.0.1",
"sortablejs": "1.15.0",
"uuid": "8.3.2"
"sortablejs": "1.15.0"
},
"devDependencies": {
"@squoosh/lib": "0.4.0",

+ 4
- 0
src/env/browser/crypto.ts Dosyayı Görüntüle

@ -8,3 +8,7 @@ export function getNonce(): string {
export function md5(data: string | Uint8Array, encoding: 'base64' | 'hex' = 'base64'): string {
return new MD5().update(data).digest(encoding);
}
export function uuid(): string {
return globalThis.crypto.randomUUID();
}

+ 5
- 1
src/env/node/crypto.ts Dosyayı Görüntüle

@ -1,4 +1,4 @@
import { createHash, randomBytes } from 'crypto';
import { createHash, randomBytes, randomUUID } from 'crypto';
export function getNonce(): string {
return randomBytes(16).toString('base64');
@ -7,3 +7,7 @@ export function getNonce(): string {
export function md5(data: string | Uint8Array, encoding: 'base64' | 'hex' = 'base64'): string {
return createHash('md5').update(data).digest(encoding);
}
export function uuid(): string {
return randomUUID();
}

+ 1
- 1
src/plus/subscription/authenticationProvider.ts Dosyayı Görüntüle

@ -1,4 +1,3 @@
import { v4 as uuid } from 'uuid';
import {
authentication,
AuthenticationProvider,
@ -9,6 +8,7 @@ import {
extensions,
window,
} from 'vscode';
import { uuid } from '@env/crypto';
import type { Container } from '../../container';
import { Logger } from '../../logger';
import { StorageKeys } from '../../storage';

+ 1
- 1
src/plus/subscription/serverConnection.ts Dosyayı Görüntüle

@ -1,4 +1,3 @@
import { v4 as uuid } from 'uuid';
import {
CancellationToken,
CancellationTokenSource,
@ -11,6 +10,7 @@ import {
UriHandler,
window,
} from 'vscode';
import { uuid } from '@env/crypto';
import { fetch, getProxyAgent, Response } from '@env/fetch';
import { Container } from '../../container';
import { Logger } from '../../logger';

+ 0
- 5
yarn.lock Dosyayı Görüntüle

@ -6016,11 +6016,6 @@ utila@~0.4:
resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c"
integrity sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=
uuid@8.3.2:
version "8.3.2"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==
uuid@^3.0.1:
version "3.4.0"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"

Yükleniyor…
İptal
Kaydet