From 959739f609dddacde3bbe9ecede2f409214fb34c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 23 May 2024 22:26:23 +0100 Subject: FUTURE: initial support for .npmrc file (#23560) This commit adds initial support for ".npmrc" files. Currently we only discover ".npmrc" files next to "package.json" files and discovering these files in user home dir is left for a follow up. This pass supports "_authToken" and "_auth" configuration for providing authentication. LSP support has been left for a follow up PR. Towards https://github.com/denoland/deno/issues/16105 --- tests/registry/npm-private/@denotest/basic/1.0.0/main.d.mts | 3 +++ tests/registry/npm-private/@denotest/basic/1.0.0/main.mjs | 11 +++++++++++ tests/registry/npm-private/@denotest/basic/1.0.0/other.mjs | 3 +++ tests/registry/npm-private/@denotest/basic/1.0.0/package.json | 7 +++++++ 4 files changed, 24 insertions(+) create mode 100644 tests/registry/npm-private/@denotest/basic/1.0.0/main.d.mts create mode 100644 tests/registry/npm-private/@denotest/basic/1.0.0/main.mjs create mode 100644 tests/registry/npm-private/@denotest/basic/1.0.0/other.mjs create mode 100644 tests/registry/npm-private/@denotest/basic/1.0.0/package.json (limited to 'tests/registry/npm-private/@denotest/basic') diff --git a/tests/registry/npm-private/@denotest/basic/1.0.0/main.d.mts b/tests/registry/npm-private/@denotest/basic/1.0.0/main.d.mts new file mode 100644 index 000000000..29da1e6d7 --- /dev/null +++ b/tests/registry/npm-private/@denotest/basic/1.0.0/main.d.mts @@ -0,0 +1,3 @@ +export declare function setValue(val: number): void; +export declare function getValue(): number; +export declare const url: string; diff --git a/tests/registry/npm-private/@denotest/basic/1.0.0/main.mjs b/tests/registry/npm-private/@denotest/basic/1.0.0/main.mjs new file mode 100644 index 000000000..0a44f7585 --- /dev/null +++ b/tests/registry/npm-private/@denotest/basic/1.0.0/main.mjs @@ -0,0 +1,11 @@ +let value = 0; + +export function setValue(newValue) { + value = newValue; +} + +export function getValue() { + return value; +} + +export const url = import.meta.url; diff --git a/tests/registry/npm-private/@denotest/basic/1.0.0/other.mjs b/tests/registry/npm-private/@denotest/basic/1.0.0/other.mjs new file mode 100644 index 000000000..00ed99da4 --- /dev/null +++ b/tests/registry/npm-private/@denotest/basic/1.0.0/other.mjs @@ -0,0 +1,3 @@ +export function hello() { + return "hello, world!"; +} \ No newline at end of file diff --git a/tests/registry/npm-private/@denotest/basic/1.0.0/package.json b/tests/registry/npm-private/@denotest/basic/1.0.0/package.json new file mode 100644 index 000000000..8f7324aa5 --- /dev/null +++ b/tests/registry/npm-private/@denotest/basic/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@denotest/basic", + "version": "1.0.0", + "type": "module", + "main": "main.mjs", + "types": "main.d.mts" +} -- cgit v1.2.3