Commit Graph

53 Commits

Author SHA1 Message Date
Michał Dudak
d2599f93e0 Update tar and add tests (#446) 2022-05-04 07:57:29 -07:00
Jack Bates
575fd10bc8 Use valid semvers internally (#436)
* Update test position after upgrading Prettier

* Use valid semvers internally
2022-04-21 14:26:08 -07:00
TypeScript Bot
8665394ff1 Format 2022-04-21 18:44:48 +00:00
TypeScript Bot
513d5aa2f8 Format 2022-02-15 18:06:59 +00:00
Nathan Shively-Sanders
1ad65d63eb Remove GitHub package support (#398)
* Remove github package support

First draft

* update tests

* Remove additional github pkg references
2022-02-15 10:03:31 -08:00
Nathan Shively-Sanders
ec84740915 Fix dtslint build again (#357)
1. Use Error casts instead of type annotations to any.
2. Somehow stricter settings didn't apply to dtslint before.
3. Use tsc -b . in dtslint and dts-critic's `build` script.
2021-12-01 11:29:21 -08:00
TypeScript Bot
3c7a974a9d Format 2021-12-01 18:38:09 +00:00
Nathan Shively-Sanders
257478f16a Add dtslint and dts-critic to project build (#356)
This updates the build for some other packages to the newest version of
Typescript. I'm not sure why.
2021-12-01 10:35:40 -08:00
Cotton Hou
5a3b9b9bb1 Append --no-fund into npmInstallFlags (#332) 2021-10-11 08:29:12 -07:00
TypeScript Bot
dd4572cf13 Format 2021-09-14 15:25:39 +00:00
Andrew Branch
f4ab92acab Update dependencies (#313)
* Run yarn-audit-fix

* Upgrade underscore

* Upgrade lerna

* Replace npm-registry-client with @qiwi/npm-registry-client

* Upgrade y18n

* Stub missing types
2021-09-13 17:05:42 -07:00
TypeScript Bot
424024fa80 Format 2021-07-27 19:05:42 +00:00
Orta Therox
7ecc12777f Remove the audit CLI output (#295) 2021-07-27 20:03:02 +01:00
TypeScript Bot
a500b95998 Format 2021-06-15 14:54:23 +00:00
Federico Panico
61bc3462d6 Fix remove minor version number from package name (#275)
Add support for minor versions when removing the version suffix from a
package name. E.g. @foo/bar@v27.1 should be @foo/bar, but currently the
regexp does not match the dot character.
2021-06-15 09:20:32 -05:00
Andrew Branch
0196dc5aa2 Make lockfile expire after function timeout (#254)
* Make lockfile expire after function timeout

* Fix tsconfig
2021-06-02 10:57:38 -05:00
Federico Panico
05b41ea595 Fix: Allow /* in versioned mappings. (#231)
* definition-parser: Use scoped names when testing mappings for relative
imports.
* miscellany/utils: When removing version number, keeps wildcard at the
end of mapping.
* miscellany/utils: When checking the existence of a version number,
catch those packages that include a wildcard path mapping.

Co-authored-by: Federico Panico <federicopanico@gmail.com>
2021-04-08 10:17:38 -07:00
Andrew Branch
5061974f41 Move publisher to Azure Functions (#221)
* Functions MVP

* Actually commit root files

* Fix typo

* Enable remote build?

* Save temp directory as artifact?

* Blah

* Try to convince Oryx to use yarn

* Make independent tsconfig for deployed app

* Remote build doesn’t need to run tsc

* Whatever

* Functions have to be at the source root

* Add test function for fileshare

* Stooppppp

* SDFKLJSDFJKLDSFJKLSFDKLJ

* Make test HTTP trigger run the whole thing

* Set timeout to an hour

* Remove unused config

* App insights starts on its own, I think

* Update fs-extra

* Update node in dependencies

* Fix type error

* Use file lock, fix app insights

* Log response

* Bump timeout to 1:30

* Rename triggers for better alphabetical sort

* Update gitignore

* Update CI versions to latest two LTS
2021-03-25 09:57:18 -07:00
Andrew Branch
29bd7f2f33 Allow STORAGE_DIR environment variable to determine where files are written 2021-03-24 09:03:11 -07:00
Andrew Branch
ec521bc39c Merge pull request #215 from fedemp/pathmappings-for-scoped-older-deps
Fix path mapping not created for older scoped packages
2021-03-22 15:08:03 -07:00
Nathan Shively-Sanders
b416413eaf Improve process logging + expectedFailures addition (#218)
* Improve process logging + expectedFailures addition

1. Improve the error message in runWithChildProcesses to pass through
the failure reason.
2. Add mithril and mithril-global to expectedFailures, since I haven't
found a satisfactory way to make them pass on 4.3 in my two attempts at
DefinitelyTyped/DefinitelyTyped#51482 and
DefinitelyTyped/DefinitelyTyped#51765.

* yarn format
2021-03-19 10:36:01 -07:00
Federico
4738bf342f Fix path mapping not created for older scoped packages 2021-03-10 12:39:37 -03:00
Federico Panico
fd4be462c3 fix: parser fails with older scoped packages. (#208)
* fix: parser fails with older scoped packages.

Given a path mapping as

```
"paths": {
	"@ckeditor/ckeditor5-utils": [
		"ckeditor__ckeditor5-utils/v10"
	]
}
```

definitions-parser failed to understand that `/v10` is not part of the
package name, and that the key of the mapping must be a scoped name.

* Resolve PR comments

- add test coverage
- simplify implementation

* Add test in definition-parser

* Use scopedPackageName in Error for missing mapping

Co-authored-by: Piotr Błażejewicz <peterblazejewicz@users.noreply.github.com>
2021-03-05 13:59:19 -05:00
TypeScript Bot
11ce637510 Format 2021-02-19 19:06:03 +00:00
Nathan Shively-Sanders
69ac8a6122 Add timeout to https.request. (#206)
* Add timeout to https.request.

I haven't looked at the source, but Stack Overflow claims there is no
timeout by default.

* change FetchOptions to intersect https.RequestOptions
2021-02-19 11:00:59 -08:00
TypeScript Bot
061197c4d0 Format 2021-01-22 00:59:23 +00:00
Nathan Shively-Sanders
c45557b69e Add manual timeout to downloadAndExtractFile (#196)
* Add manual timeout to downloadAndExtractFile

Open question:
I'm not sure whether to add a clearTimeout call to `on("error", reject)`

* add rejectAndClearTimeout function
2021-01-21 16:57:00 -08:00
Andrew Branch
6ea64a6333 Merge pull request #142 from jablko/patch-25
Use libraryName homepage for not-needed stub
2020-11-16 11:04:33 -08:00
Andrew Branch
0aa87777b7 Improve error message when other package has a path mapping to a version you’re deleting 2020-10-29 16:12:43 -07:00
Jack Bates
22b761e9a8 Use libraryName homepage for not-needed stub 2020-10-27 12:01:37 -07:00
Andrew Branch
a52ef765de Check status code and attach event handlers before starting pipe 2020-10-05 09:52:35 -07:00
Nathan Shively-Sanders
0942edcc30 More logging of DT io in publisher (#129) 2020-10-05 09:03:18 -07:00
Nathan Shively-Sanders
9e0891801f Add timeout to downloadAndExtractFile (#65)
* Add timeout to downloadAndExtractFile

It's only used to download the tgz of DT's master.

I set the timeout to 1000 seconds and added an error-handling line? I
don't actually know how node's error handling works so I need to go and
learn the right way to do it.

* change error handling and run yarn format
2020-06-29 11:58:58 -07:00
Nathan Shively-Sanders
a0f10b6dd6 Set up CI with Azure Pipelines (#27)
* Set up CI with Azure Pipelines

[skip ci]

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

Try the OTHER nondescript guid!

* Update azure-pipelines.yml for Azure Pipelines

Maybe the other guid doesn't have version 3?

* Update azure-pipelines.yml for Azure Pipelines

Try not specifying the version at all

* Update azure-pipelines.yml for Azure Pipelines

Version is required, so try version 1

* Update azure-pipelines.yml for Azure Pipelines

HA HA. Try it on Windows.

* Update azure-pipelines.yml for Azure Pipelines

Remove lint because windows is stupid

* Update azure-pipelines.yml for Azure Pipelines

Daring: don't install node_modules, then maybe we won't have any problems

* Update azure-pipelines.yml for Azure Pipelines

Try guardian export for logging error output

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* talk around placeholder password

* Update azure-pipelines.yml for Azure Pipelines

Don't need to export results as an artifact after all.

* Update azure-pipelines.yml for Azure Pipelines

run `yarn tslint`

* add tslint (with failures intact)

* Disable non-security-related rules

1. prefer-type-cast: false, no-angle-bracket-type-assertion: true. `as`
   postfix casts are better, actually.
2. no-relative-imports: there's no security reason to enforce this, and
   internal relative imports are standard in JS.
3. no-single-line-block-comments: a rule created by the
   vertical-line-feed lobby.
4. no-backbone-get-set-outside-model: this project doesn't use backbone.
5. function-name: change STATIC_METHOD name requirement to staticName,
   because it is 2020, not 1989.

* Add tslint-microsoft-contrib and fix failures

1. disable import-name: This rule doesn't understand default imports and
doesn't seem to target security.
2. prefer-array-literal: Allow single-argument calls like `new
Array(12)`.
3. no-constant-condition: Allow `while (true)` loops.
4. disable no-function-expression: This rule isn't needed with type checking.
5. disable max-func-body-length: This rule doesn't understand nested functions.

I also disabled specific uses of rules:

1. function-name in types for fstream, since that's a dependency.
2. non-literal-fs-path for uses of the publisher's filesystem wrapper
type. The wrapper is created only on Definitely Typed directories, so
can't access files outside of that directory.
3. non-literal-fs-path for reading a log from disk.

* move tslint to subdirectory

* remove package-lock.json

* remove extraneous space

* move tslint to devDeps

* fix package.json syntax
2020-06-03 16:03:11 -07:00
Andrew Branch
f34e06993c Merge branch 'master' into dtslint-runner 2020-05-04 10:58:13 -07:00
Andrew Branch
b26417fa75 Move npm cache directory outside of publisher’s node_modules 2020-04-28 11:25:38 -07:00
Nathan Shively-Sanders
f62f726c9a Map "next" to latest TS version
typescript-installer.install accepts "next" so that it can install
`typescript@next`, but should install it to `typescript-installs/4.0/`
(to use the current `next` as an example).

perf (currently) and dtslint (soon) rely on
typescript-installer.typeScriptPath to do this translation as well, so
that's where I added the test.
2020-04-28 10:53:05 -07:00
Nathan Shively-Sanders
5f3bba29cf 1. Remove isPrelease
2. Switch installAll to use shipped + next
3. Clean up some TODOs/comments.

I still need to update the step-by-step instructions at the top of
typescript-versions.
2020-04-28 08:56:48 -07:00
Andrew Branch
70251ad076 Fix problems 2020-04-24 16:21:15 -07:00
Andrew Branch
28b799e69b Finish(?) combined implementation 2020-04-24 15:03:52 -07:00
Andrew Branch
69677e206f Fix Semver parsing error 2020-04-17 15:54:50 -07:00
Andrew Branch
ad42efb5bc Separate typescript-versions into own package 2020-04-14 15:53:52 -07:00
Andrew Branch
f026bdfdeb Move stuff around and make it build 2020-04-13 16:09:42 -07:00
Andrew Branch
dff700be18 Fix publisher npm scripts as much as they work in the original repo 2020-03-13 15:52:16 -07:00
Andrew Branch
7c8c6e1fab Port #32 from definitelytyped-header-parser
Co-authored-by: Nathan Shively-Sanders <sandersn@users.noreply.github.com>
2020-03-09 13:56:21 -07:00
Andrew Branch
06b7371736 Use eslint and prettier 2020-03-05 11:26:50 -08:00
Andrew Branch
92af4ccc08 Extract typescript installer to utils 2020-03-05 10:27:40 -08:00
Andrew Branch
52840bfe0a Get publisher building and tests passing 2020-03-04 17:51:48 -08:00
Andrew Branch
ed92171619 Update imports for publisher 2020-03-04 17:22:59 -08:00
Andrew Branch
6601323cfa Wrap up definitions-parser 2020-03-04 12:25:06 -08:00