Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Master] Add npm-pack and npm-publish tasks #2029

Merged
merged 1 commit into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions AISKU/Tests/PerfTests.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,17 @@
modules.add("qunit");

loadFetchModule(modules, "whatwg-fetch");
loadCommonModules(modules);
loadCommonModules(modules, function() {

modules.add("@microsoft/ai-test-framework", "./node_modules/@microsoft/ai-test-framework/dist/ai-test-framework");

var testModule = modules.add("Tests/Perf/src/aiskuperftests", "./Perf/dist/aiskuperftests.tests.js")
testModule.run = function (tests) {
console && console.log("Starting tests");
QUnit.start();
tests.runTests();
};
var testModule = modules.add("Tests/Perf/src/aiskuperftests", "./Perf/dist/aiskuperftests.tests.js")
testModule.run = function (tests) {
console && console.log("Starting tests");
QUnit.start();
tests.runTests();
};

modules.run();
modules.run();
});
</script>

<script>
Expand Down
43 changes: 10 additions & 33 deletions AISKU/Tests/UnitTests.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,39 +26,16 @@
modules.add("pako","./node_modules/pako/dist/pako");

loadFetchModule(modules, "whatwg-fetch");
loadCommonModules(modules);

modules.add("@microsoft/dynamicproto-js", "./node_modules/@microsoft/dynamicproto-js/lib/dist/umd/dynamicproto-js", true);

// Load and define the app insights Shims module
modules.add("@microsoft/applicationinsights-shims", "./node_modules/@microsoft/applicationinsights-shims/browser/applicationinsights-shims");

// Load Core
modules.add("@microsoft/applicationinsights-core-js", "./node_modules/@microsoft/applicationinsights-core-js/browser/applicationinsights-core-js");

// Load Common
modules.add("@microsoft/applicationinsights-common", "./node_modules/@microsoft/applicationinsights-common/browser/applicationinsights-common");

// Load Analytics
modules.add("@microsoft/applicationinsights-analytics-js", "./node_modules/@microsoft/applicationinsights-analytics-js/browser/applicationinsights-analytics-js");

// Load Channel
modules.add("@microsoft/applicationinsights-channel-js", "./node_modules/@microsoft/applicationinsights-channel-js/browser/applicationinsights-channel-js");

// Load Properties
modules.add("@microsoft/applicationinsights-properties-js", "./node_modules/@microsoft/applicationinsights-properties-js/browser/applicationinsights-properties-js");

// Load Dependencies
modules.add("@microsoft/applicationinsights-dependencies-js", "./node_modules/@microsoft/applicationinsights-dependencies-js/browser/applicationinsights-dependencies-js");

var testModule = modules.add("Tests/Unit/src/aiskuunittests", "./Unit/dist/aiskuunittests.tests.js")
testModule.run = function (tests) {
console && console.log("Starting tests");
QUnit.start();
tests.runTests();
};

modules.run();
loadCommonModules(modules, function() {
var testModule = modules.add("Tests/Unit/src/aiskuunittests", "./Unit/dist/aiskuunittests.tests.js")
testModule.run = function (tests) {
console && console.log("Starting tests");
QUnit.start();
tests.runTests();
};

modules.run();
});
</script>
</head>

Expand Down
6 changes: 4 additions & 2 deletions AISKU/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@
"nightwatch:ie10": "nightwatch -c Tests/nightwatch/nightwatch.json Tests/nightwatch/run_nightwatch.js --env ie10",
"nightwatch:ie11": "nightwatch -c Tests/nightwatch/nightwatch.json Tests/nightwatch/run_nightwatch.js --env ie11",
"nightwatch": "start node Tests/nightwatch/serve_nightwatch.js && npx concurrently \"npm run nightwatch:chrome\" \"npm run nightwatch:ie11\" \"npm run nightwatch:ie10\" && npm run nightwatch:done || npm run nightwatch:done",
"nightwatch:done": "curl http://localhost:8000/_done"
"nightwatch:done": "curl http://localhost:8000/_done",
"npm-pack": "npm pack",
"npm-publish-ai": "node ../tools/release-tools/npm_publish.js ."
},
"devDependencies": {
"@microsoft/ai-test-framework": "0.0.1",
Expand Down Expand Up @@ -66,7 +68,7 @@
"tslib": "*"
},
"dependencies": {
"@microsoft/dynamicproto-js": "^1.1.7",
"@microsoft/dynamicproto-js": "^1.1.9",
"@microsoft/applicationinsights-shims": "2.0.2",
"@microsoft/applicationinsights-analytics-js": "2.8.11",
"@microsoft/applicationinsights-channel-js": "2.8.11",
Expand Down
34 changes: 10 additions & 24 deletions AISKULight/Tests/UnitTests.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,16 @@
modules.add("pako","./node_modules/pako/dist/pako");

loadFetchModule(modules, "whatwg-fetch");
loadCommonModules(modules);

modules.add("@microsoft/dynamicproto-js", "./node_modules/@microsoft/dynamicproto-js/lib/dist/umd/dynamicproto-js", true);

// Load and define the app insights Shims module
modules.add("@microsoft/applicationinsights-shims", "./node_modules/@microsoft/applicationinsights-shims/browser/applicationinsights-shims");

// Load Core
modules.add("@microsoft/applicationinsights-core-js", "./node_modules/@microsoft/applicationinsights-core-js/browser/applicationinsights-core-js");

// Load Common
modules.add("@microsoft/applicationinsights-common", "./node_modules/@microsoft/applicationinsights-common/browser/applicationinsights-common");

// Load Channel
modules.add("@microsoft/applicationinsights-channel-js", "./node_modules/@microsoft/applicationinsights-channel-js/browser/applicationinsights-channel-js");

var testModule = modules.add("Tests/Unit/src/aiskuliteunittests", "./Unit/dist/aiskuliteunittests.tests.js")
testModule.run = function (tests) {
console && console.log("Starting tests");
QUnit.start();
tests.runTests();
};

modules.run();
loadCommonModules(modules, function() {
var testModule = modules.add("Tests/Unit/src/aiskuliteunittests", "./Unit/dist/aiskuliteunittests.tests.js")
testModule.run = function (tests) {
console && console.log("Starting tests");
QUnit.start();
tests.runTests();
};

modules.run();
});
</script>
</head>

Expand Down
6 changes: 4 additions & 2 deletions AISKULight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
"dtsgen": "api-extractor run --local && node ../scripts/dtsgen.js 'Microsoft.ApplicationInsights'",
"sri": "node ../tools/subResourceIntegrity/generateIntegrityFile.js",
"ai-min": "grunt aiskulite-min",
"ai-restore": "grunt aiskulite-restore"
"ai-restore": "grunt aiskulite-restore",
"npm-pack": "npm pack",
"npm-publish-ai": "node ../tools/release-tools/npm_publish.js ."
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -51,7 +53,7 @@
"tslib": "*"
},
"dependencies": {
"@microsoft/dynamicproto-js": "^1.1.7",
"@microsoft/dynamicproto-js": "^1.1.9",
"@microsoft/applicationinsights-shims": "2.0.2",
"@microsoft/applicationinsights-common": "2.8.11",
"@microsoft/applicationinsights-channel-js": "2.8.11",
Expand Down
26 changes: 10 additions & 16 deletions channels/applicationinsights-channel-js/Tests/UnitTests.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,16 @@
modules.add("sinon");

loadFetchModule(modules, "whatwg-fetch");
loadCommonModules(modules);

// Load Core
modules.add("@microsoft/applicationinsights-core-js", "./node_modules/@microsoft/applicationinsights-core-js/browser/applicationinsights-core-js");

// Load Common
modules.add("@microsoft/applicationinsights-common", "./node_modules/@microsoft/applicationinsights-common/browser/applicationinsights-common");

var testModule = modules.add("Tests/Unit/src/aichannel.tests", "./Unit/dist/aichannel.tests.js");
testModule.run = function (tests) {
console && console.log("Starting tests");
QUnit.start();
tests.runTests();
};

modules.run();
loadCommonModules(modules, function() {
var testModule = modules.add("Tests/Unit/src/aichannel.tests", "./Unit/dist/aichannel.tests.js");
testModule.run = function (tests) {
console && console.log("Starting tests");
QUnit.start();
tests.runTests();
};

modules.run();
});
</script>
</head>

Expand Down
6 changes: 4 additions & 2 deletions channels/applicationinsights-channel-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
"dtsgen": "api-extractor run --local && node ../../scripts/dtsgen.js \"Microsoft Application Insights JavaScript SDK Channel\"",
"sri": "node ../../tools/subResourceIntegrity/generateIntegrityFile.js",
"ai-min": "grunt aichannel-min",
"ai-restore": "grunt aichannel-restore"
"ai-restore": "grunt aichannel-restore",
"npm-pack": "npm pack",
"npm-publish-ai": "node ../../tools/release-tools/npm_publish.js ."
},
"devDependencies": {
"@microsoft/ai-test-framework": "0.0.1",
Expand All @@ -48,7 +50,7 @@
"tslib": "*"
},
"dependencies": {
"@microsoft/dynamicproto-js": "^1.1.7",
"@microsoft/dynamicproto-js": "^1.1.9",
"@microsoft/applicationinsights-shims": "2.0.2",
"@microsoft/applicationinsights-core-js": "2.8.11",
"@microsoft/applicationinsights-common": "2.8.11"
Expand Down
5 changes: 3 additions & 2 deletions common/Tests/Framework/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"browser performance monitoring",
"web analytics"
],
"main": "dist/ai-test-framework.js",
"module": "dist-esm/src/ai-test-framework.js",
"types": "dist-esm/src/ai-test-framework.d.ts",
"scripts": {
Expand All @@ -34,7 +35,6 @@
"grunt": "^1.5.3",
"grunt-contrib-qunit": "^6.2.1",
"@nevware21/grunt-ts-plugin": "^0.4.3",
"@nevware21/ts-async": "^0.1.0",
"@rollup/plugin-commonjs": "^18.0.0",
"@rollup/plugin-node-resolve": "^11.2.1",
"@rollup/plugin-replace": "^2.3.3",
Expand All @@ -50,6 +50,7 @@
"tslib": "*"
},
"dependencies": {
"@microsoft/dynamicproto-js": "^1.1.7"
"@microsoft/dynamicproto-js": "^1.1.9",
"@nevware21/ts-async": ">= 0.1.0 < 2.x"
}
}
Loading