Граф коммитов

38 Коммитов

Автор SHA1 Сообщение Дата
Jeremy Meng 773a3f053a Rework the use of lib: ["dom"]
Porting changes from @azure/core-http PR
https://github.com/Azure/azure-sdk-for-js/pull/7500.

- Keep lib: ["dom"] for ./scripts/ as it depends on a dev common tool which
depends on v10 @azure/storage-blob which depends on an older version of
ms-rest-js. Attempting to remove it resulting in compile errors. This folder is
only used in dev/CI.  It's not part of the shipping library.
2021-02-02 22:27:31 +00:00
Jeremy Meng 4208098ab1
Add Prettier and format code (#415)
* Add prettier and configs

* npm run format

* Fix tslint error

- Prettier broke lines but the // tslint:disable-next-line comments remains in
the old position. They should be before the applicable lines.

- Enforce `SwitchCase` indentation level of 1 to match prettier behavior.
2021-02-01 17:54:34 -08:00
Kamil Pajdzik 7b065ccaab
Add support for Fetch in Node.js environment (#351)
* Update version

* Add Fetch HTTP client (#342)

* Add Fetch HTTP client

* Reset version

* Update version

* Fix isNode method to return true in Electron apps

* Update Constants

* Fix incorrect undefined check in Axios client

* Add TSLint check. Fix TSLint errors (#344)

* Add TSLint check. Fix TSLint errors

* Add type to delay callback

* Update TypeScript

* Remove unnecessary types/xhr-mock package

* Fix missing delay import

* Reformat Fetch client

* Fix wrong union type

* Fix tests

* Normalize the safe-check

* Add script to run tests on dependent projects (#345)

* Add script to run tests on dependent projects

* Bump the version

* Fix logging statements

* Update constants

* Update Azure Pipelines configuration

* Fix Azure Pipeline job name

* Add gulp build command

* Add npm run local

* Flip order

* Add build step

* Add more logging

* Fix undefined result print

* Remove inheriting stdio

* Change to spawnSync

* Add more logging

* Remove build step

* Change exec to run from JS dev tools

* Add logger-js package

* Add build step back

* Add process.exit

* Add logging

* Change error logging

* Add command printing

* Extract options object

* Add fullOptions parameter

* Change NPM command name

* Remove logging

* Remove npm run test

* Await additional commands

* Add test command to package.json

* Add timeout

* Add test as separate task

* Change foreach to for

* Remove test from package.json command

* Uncomment npm install commands

* Add latest ms-rest-js to npm install

* Add autorest.typescript DevOps task

* Add npm link

* Change link to install

* Remove prepack script

* Change package name to ../..

* Remove rm -rf

* Add build step

* Add git checkout

* Add dependent project directory

* Remove git branch checkout

* Bump the version to 1.8.6

* Add git checkout

* Change branch name

* Add execution directory

* Remove git checkout

* Add tsc --version command

* Remove local ms-rest-js install

* Move .tmp folder

* Change .tmp path creation

* Fix path in Azure DevOps config

* Renable logging

* Add run to build command

* Move scripts back to TypeScript

* Improve logging

* Fixed #347 and #348

* nit fix

* bump version in the constant file.

* Address reiew feedback

* upgrade ci to run node 8, 10, 12 versions. Remove 6.x.

* Reformat mockHttp

* Add Fetch to browser

* Add Firefox Karma configuration

* Switch from isomorphic-fetch to cross-fetch

* Add cross-fetch to rollup configuration

* Remove buffer and streams from webpack test configuration

* Add Firefox karma launcher

* Add FetchMock for browser scenarios

* Extract platform specific code to child classes

* Bump the version

* Add proxy support to fetch client (#350)

* Remove cross-fetch

* Add proxy support

* Fix stream upload tests

* Extract ProxyAgent

* Bring XHR as default client for browsers

* Address feedback

* Bring back browser mock

* Add type

* Fix pass through mock

* Change import type

* Fix fetch import

* Change fetch reference

* Remove cross fetch from rollup config

* Remote unit.ts

* Add fallback fetch reference

* Fix constants

* Fix fetch bugs

* Upgrade TypeScript

* Remove unnecessary code from mock class

* Remove type

* Change vresion to preview

* Remove Method import

* Fix user agent tests

* Remove Method casting

* Remove Method type

* Disable ms-rest-azure-js installation in CI

* Fix pack order

* Add keep-alive support (#362)

* Remove remaining axios references

* Update documentation

* Add missing external packages in rollup config

* Add Keep-Alive changelog

* Bump the version
2019-06-24 09:01:20 -07:00
Kamil Pajdzik 4273b5122e
Move testing dependent projects from a script to Azure Devops Pipeline (#357)
* Disable ms-rest-azure-js tests

* Refactor script

* Add debug statement

* Change test command

* Remove command line arguments

* Rename command

* Split the script

* Add directory creation

* Combine jobs

* Refactor script

* Remove workdir

* Add pwd script

* Change variable name

* Split jobs

* Add additional logging

* Add additional logging

* Add ls -a

* Combine jobs

* Add copying artifacts

* Move artifact to a folder

* Move artifact to a folder

* Rename artifact

* Add npm pack

* Add ls -a

* Fix path

* Add predefined variable

* Introduce variables

* Fix missing variable

* Add autorest.typescript testing

* Add ms-rest-azure-js publishing

* Add working directory parameter

* Fix dependent tasks

* Add debug statement

* Flip order of gulp build

* Bump the version

* Update Constants

* Add friendly job names

* Cleanup debug statements
2019-06-06 09:35:57 -07:00
Kamil Pajdzik c7b3e6c70a
Add script to run tests on dependent projects (#345)
* Add script to run tests on dependent projects

* Bump the version

* Fix logging statements

* Update constants

* Update Azure Pipelines configuration

* Fix Azure Pipeline job name

* Add gulp build command

* Add npm run local

* Flip order

* Add build step

* Add more logging

* Fix undefined result print

* Remove inheriting stdio

* Change to spawnSync

* Add more logging

* Remove build step

* Change exec to run from JS dev tools

* Add logger-js package

* Add build step back

* Add process.exit

* Add logging

* Change error logging

* Add command printing

* Extract options object

* Add fullOptions parameter

* Change NPM command name

* Remove logging

* Remove npm run test

* Await additional commands

* Add test command to package.json

* Add timeout

* Add test as separate task

* Change foreach to for

* Remove test from package.json command

* Uncomment npm install commands

* Add latest ms-rest-js to npm install

* Add autorest.typescript DevOps task

* Add npm link

* Change link to install

* Remove prepack script

* Change package name to ../..

* Remove rm -rf

* Add build step

* Add git checkout

* Add dependent project directory

* Remove git branch checkout

* Bump the version to 1.8.6

* Add git checkout

* Change branch name

* Add execution directory

* Remove git checkout

* Add tsc --version command

* Remove local ms-rest-js install

* Move .tmp folder

* Change .tmp path creation

* Fix path in Azure DevOps config

* Renable logging

* Add run to build command

* Move scripts back to TypeScript

* Improve logging
2019-05-10 16:58:13 -07:00
Kamil Pajdzik 4c2b1c5390
Fix default HTTP client tests (#321)
* Enable CORS

* Add empty line

* Add mock http proxy

* Fix few tests

* Remove axios workaround that was fixed in current release

* Fix all tests except download/upload progress

* Fix stream HTTP tests

* Delete testserver

* Remove reporting skipped tests as warning

* Remove .only

* Add nodeIt

* Fix Constants.ts

* Remove it.skip()
2019-01-22 11:46:55 -08:00
Dan Schulte 11b35172dd Add checkConstantsVersion.ts 2019-01-15 12:53:12 -08:00
Dan Schulte a90d80f8d1 Working on requestPolicyFactories as a function 2019-01-15 10:57:10 -08:00
Dan Schulte c5aafbabfb Add checkEverything.ts 2018-12-20 12:37:38 -08:00
Dan Schulte 82c03c355f Add only() check 2018-12-20 11:03:56 -08:00
Dan Schulte 5ce3234a61 Initial changes to support local and latest again 2018-12-18 14:44:05 -08:00
Dan Schulte fffa8de772 Update version to 1.2.3 2018-12-17 12:32:12 -08:00
Dan Schulte 20d7bee7cc Add package.json version check 2018-12-17 12:24:42 -08:00
Dan Schulte df41e95c7d Enable test coverage reporting 2018-12-14 10:23:41 -08:00
Kamil Pajdzik 6f33a696d0
Extract dependencies-related scripts to an external package (#294) 2018-12-05 16:11:09 -08:00
Dan Schulte d90645ce29 Add isLernaPackage changes from autorest.typescript 2018-11-29 15:33:56 -08:00
Dan Schulte 7e9baca07b We don't publish preview packages anymore, so remove the preview scripts 2018-11-29 15:23:02 -08:00
Dan Schulte 78075521b0 Update dependencies.ts with latest changes from ms-rest-azure-js 2018-11-29 15:17:09 -08:00
Dan Schulte 8887fe5391 Change finally() to then() 2018-11-27 13:50:30 -08:00
Dan Schulte 1f68aa8b54 Make unit tests stable 2018-11-27 13:36:56 -08:00
Dan Schulte b7642e3320 Change test:unit to use ts-node instead of just node 2018-11-26 14:49:15 -08:00
Sergey Shandar 4a19567fe6
Build matrix (#269)
* matrix

* no default pool

* typo

* typo

* No Node 11 yet.

* no `prepare` script. Run `prepack`.

* Node 11

* run build before test

* Better displayName for `Install Node`.

* script in travis-ci

* install chromium

* sudo apt-get update

* Publish everithings

* no need to run build on test

* no need to run build

* minor

* drop

* build dist

* build everithing but rollup

* download artifact

* dependency

* no test result publishin

* script instead of NPM task

* alloc

* minor

* stop test-server

* only one job

* timeout for mocha-chrome

* pipelines.

* tree-kill

* one process?

* logging.

* no idea

* maxParallel = 1

* multiple jobs instead of matrix

* another try

* Template

* unique job name

* the same key?

* syntax

* parameter syntax

* parameters.

* no idea

* name

* name

* 6 & 8
2018-11-13 13:47:00 -08:00
Dan Schulte 1fcf05dc09 Update regular expressions to be non-greedy 2018-10-12 15:54:47 -07:00
Dan Schulte 3d7e8bda3b Change tilde to caret 2018-10-12 15:01:49 -07:00
Dan Schulte 294927a139 Remove writePackageJson() 2018-10-12 12:28:29 -07:00
Dan Schulte 5fa73d115f Remove script step that changes package.json main property 2018-10-12 12:20:26 -07:00
Dan Schulte 3cdc7ae9dc Enable strict on scripts, fix problems 2018-09-05 13:46:47 -07:00
Dan Schulte f169927d4f Small script fixes 2018-08-23 10:11:24 -07:00
Rikki Gibson c5d54d7e63
Typescript 3 (#182)
* Add module field referencing esm code. Update typescript and ts-node.

* Update package-lock.json

* Use <reference lib=dom /> to solve #157

* Add simple test for nonexistent host

* Use -T with ts-node

* Use forward declaration instead of reference lib directive
2018-08-22 16:16:40 -07:00
Dan Schulte 7de2b93474 Remove RefreshNodeModulesOptions and unnecessary checks 2018-08-21 13:38:45 -07:00
Dan Schulte 0a6ffbf6c3 Various improvements to our script infrastructure 2018-08-21 13:24:51 -07:00
Rikki Gibson 64401093fc
Show output when test process fails (#116) 2018-05-30 14:11:29 -07:00
Rikki Gibson ce09bc0435
Enable browser tests with npm test (#108)
* Enable browser tests with npm test

* Add chrome-unit script

* Add sudo: true to .travis.yml to support chrome testing

* Add back a safe amount of parallelism

* Fix bug in testserver

* Run node tests in script

* chrome-unit -> unit
2018-05-30 14:01:03 -07:00
Dan Schulte 5ff7cd54cd Add newline to end of package.json file 2018-05-22 14:54:52 -07:00
Dan Schulte ed699232f9 Update dependencies.js to indicate path to package.json being modified 2018-05-17 10:13:57 -07:00
Dan Schulte d0800f5dd6 Remove unused dev script functions 2018-05-17 10:08:22 -07:00
Dan Schulte 0aa2b6b323 Add dev scripts 2018-05-17 10:06:12 -07:00
Rikki Gibson 76131a1848 Add publish scripts 2018-05-16 12:36:03 -07:00