Fixing issue #62207 #100
Annotations
1 error
|
copilot
Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?\\r\\n\\r\\n\\r\\n==== tsconfig.json (3 errors) ====\\r\\n {\\r\\n \\\"compilerOptions\\\": {\\r\\n \\\"traceResolution\\\": true,\\r\\n \\\"paths\\\": {\\r\\n \\\"@interface/*\\\": [\\\"src/interface/*\\\"],\\r\\n ~~~~~~~~~~~~~~~~~\\r\\n!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?\\r\\n \\\"@BLAH\\\": [\\\"blah\\\"],\\r\\n ~~~~~~\\r\\n!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?\\r\\n \\\"@humbug/*\\\": [\\\"*/generated\\\"]\\r\\n...\\n```File: `tests/baselines/reference/pathsValidation5.errors.txt`\\n```text\\n...\\n ~~~~~~~~~~~~~\\r\\n!!! error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?\\r\\n }\\r\\n }\\r\\n }\\r\\n \\r\\n==== src/main.ts (0 errors) ====\\r\\n import 'someModule';\\n```\",\"languageName\":\"Text\",\"path\":\"tests/baselines/reference/pathsValidation5.errors.txt\",\"range\":{\"start\":1,\"end\":25},\"ref\":\"refs/heads/main\",\"type\":\"snippet\",\"url\":\"https://github.com/microsoft/TypeScript/blob/7956c00166df552a1d6da6c2f996b558e5dd94ff/tests/baselines/reference/pathsValidation5.errors.txt#L1-L25\"},{\"contents\":\"File: `src/compiler/moduleNameResolver.ts`\\n```typescript\\n/*...*/\\n * If these settings are set then loading procedure will try to use them to resolve module name and it can of failure it will\\r\\n * fallback to standard resolution routine.\\r\\n *\\r\\n * - baseUrl - this setting controls how non-relative module names are resolved. If this setting is specified then non-relative\\r\\n * names will be resolved relative to baseUrl: i.e. if baseUrl is '/a/b' then candidate location to resolve module name 'c/d' will\\r\\n * be '/a/b/c/d'\\r\\n * - paths - this setting can only be used when baseUrl is specified. allows to tune how non-relative module names\\r\\n * will be resolved based on the content of the module name.\\r\\n * Structure of 'paths' compiler options\\r\\n * 'paths': {\\r\\n * pattern-1: [...substitutions],\\r\\n * pattern-2: [...substitutions],\\r\\n * ...\\r\\n * pattern-n: [...substitutions]\\r\\n * }\\r\\n * Pattern here is a string that can contain zero or one '*' character. During module resolution module name will be matched against\\r\\n /*...*/\\n```\",\"languageName\":\"TypeScript\",\"path\":\"src/compiler/moduleNameResolver.ts\",\"range\":{\"start\":1494,\"end\":1509},\"ref\":\"refs/heads/main\",\"type\":\"snippet\",\"url\":\"https://github.com/microsoft/TypeScript/blob/7956c00166df552a1d6da6c2f996b558e5dd94ff/src/compiler/moduleNameResolver.ts#L1494-L1509\"},{\"contents\":\"File: `src/testRunner/unittests/moduleResolution.ts`\\n```typescript\\n/*...*/\\n \\\"d:/someFolder/moduleB.ts\\\": `import a = require(\\\"./moduleC\\\")`,\\r\\n \\\"D:/someFolder/moduleC.ts\\\": \\\"export const x = 10\\\",\\r\\n },\\r\\n { module: ts.ModuleKind.CommonJS, forceConsistentCasingInFileNames: true },\\r\\n \\\"d:/someFolder\\\",\\r\\n /*useCaseSensitiveFileNames*/ false,\\r\\n [\\\"d:/someFolder/moduleA.ts\\\", \\\"d:/someFolder/moduleB.ts\\\"],\\r\\n );\\r\\n});\\r\\n\\r\\ndescribe(\\\"unittests:: moduleResolution:: baseUrl augmented module resolution\\\", () => {\\r\\n it(\\\"module resolution without path mappings/rootDirs\\\", () => {\\r\\n const baselines: string[] = [];\\r\\n test(/*hasDirectoryExists*/ true);\\r\\n test(/*hasDirectoryExists*/ false);\\r\\n runBaseline(\\\"baseUrl without path mappings or rootDirs\\\", baselines);\\r\\n\\r\\n function test(hasDirectoryExists: boolean) {\\r\\n /*...*/\\n }\\r\\n // add failure tests\\r\\n });\\r\\n\\r\\n it(\\\"node + baseUrl\\\", () => {\\r\\n c
|
Artifacts
Produced during runtime
| Name | Size | Digest | |
|---|---|---|---|
|
results
|
1.77 KB |
sha256:a876a171460cf77d9439a1ad7fd815021a2bd5ce259bcdfdfb0df965ed144ba5
|
|