profile
viewpoint
Adam Krantz akrantz @microsoft Seattle, Washington

akrantz/Chakra-Samples 0

Repository for Chakra JavaScript engine related samples.

akrantz/ChakraCore 0

ChakraCore is the core part of the Chakra Javascript engine that powers Microsoft Edge

akrantz/ChakraCore-Debugger 0

Debugging companion library for the ChakraCore JavaScript engine

akrantz/ChakraCore-Debugger--old 0

Debugging companion for the ChakraCore JavaScript engine

akrantz/create-react-app 0

Create React apps with no build configuration.

akrantz/DefinitelyTyped 0

The repository for high quality TypeScript type definitions.

akrantz/edge-diagnostics-adapter 0

Microsoft Edge Diagnostics Adapter is a protocol adapter that enables tools to debug Microsoft Edge using the Chrome DevTools Protocol.

akrantz/Excel-Custom-Functions 0

Learn about custom functions in Excel.

akrantz/Excel-Custom-Functions-JS 0

Write your own functions in Excel using JavaScript.

akrantz/generator-office 0

Yeoman generator for building Microsoft Office related projects.

pull request commentOfficeDev/Office-Addin-Scripts

add option to open dev tools when debugging

I should update tests to provide coverage of these changes. I'm not sure if the package-lock.json changes should be included. I just noticed that was added.

akrantz

comment created time in 6 days

PR opened OfficeDev/Office-Addin-Scripts

add option to open dev tools when debugging

This is being added to support the scenario where a developer wants to use the browser dev tools for debugging, but the add-in is running in the background, so there are no controls available to open the dev tools from the webview.

The office-addin-dev-settings "debugging" command has a new option "--open-dev-tools" which will write a registry value ("OpenDevTools" REG_DWORD 1) when present.

This is implemented by adding an optional parameter to the enableDebugging() function, openDevTools: boolean = false, which will write the registry value when true, or remove it (if present) when false.

The office-addin-debugging "start" command has a new option "--dev-tools" which will specify true for the openDevTools parameter when calling devSettings.enableDebugging().

This will only have an effect when supported.

As Office adds support for the Edge Chromium webview (WebView2) on Windows, this will allow the dev tools to be opened (if desired) when using that webview.

+37 -142

0 comment

10 changed files

pr created time in 6 days

create barnchakrantz/Office-Addin-Scripts

branch : open-dev-tools

created branch time in 6 days

delete branch akrantz/Office-Addin-Scripts

delete branch : fix-vulnerabilities

delete time in 7 days

push eventOfficeDev/Office-Addin-Scripts

Adam Krantz

commit sha 5863375434a6c8d63c62a3a67c34179763d565f8

add scripts for doing npm audit across lerna and all packages

view details

Adam Krantz

commit sha 38215165f638f46918a06948385fe7363143e77a

use `npm audit fix` to fix vulnerabilities

view details

Adam Krantz

commit sha 53dc3a07af30b7c5cac6472e3118c27f2cedd8fa

Merge pull request #320 from akrantz/fix-vulnerabilities Fix vulnerabilities

view details

push time in 7 days

PR merged OfficeDev/Office-Addin-Scripts

Fix vulnerabilities

This adds scripts so that you can run npm run audit and npm run audit:fix to use npm to audit and fix all packages. Note that npm audit and npm audit fix will just do the root lerna package. Take care to use the correct syntax.

This also fixes the existing vulnerabilities.

+304 -71

0 comment

19 changed files

akrantz

pr closed time in 7 days

PR opened OfficeDev/Office-Addin-Scripts

Fix vulnerabilities

This adds scripts so that you can run npm run audit and npm run audit:fix to use npm to audit and fix all packages. Note that npm audit and npm audit fix will just do the root lerna package. Take care to use the correct syntax.

This also fixes the existing vulnerabilities.

+304 -71

0 comment

19 changed files

pr created time in 7 days

create barnchakrantz/Office-Addin-Scripts

branch : fix-vulnerabilities

created branch time in 7 days

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

pull request commentOfficeDev/Office-Addin-TaskPane-JS

Master bug fix

Thanks for the PR. We regularly make updates to address vulnerabilities. Our usual approach is to first update https://github.com/Office-Addin-TaskPane and then merge those same changes to the other templates, such as this one, and the React and Angular variations etc. As you saw, we've now done this, and so these changes have been incorporated.

FelixBoscoJ

comment created time in 7 days

PullRequestReviewEvent
PullRequestReviewEvent

issue commentOfficeDev/Office-Addin-Scripts

custom-functions-metadata-plugin: doesn't work with clean-webpack-plugin@3.0.0

That's a reasonable workaround. @TCourtneyOwen you could make this change.

akrantz

comment created time in 8 days

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

pull request commentOfficeDev/Office-Addin-TaskPane-Angular

Merge office-addin-taskpane/master

I just got the branch and was going to take a look.

TCourtneyOwen

comment created time in 9 days

PullRequestReviewEvent
PullRequestReviewEvent

issue commentOfficeDev/Office-Addin-Scripts

custom-functions-metadata-plugin: doesn't work with clean-webpack-plugin@3.0.0

The change in v3.0.0 to use emit hook seems to interfere with custom-functions-metadata-plugin.

c:\dev\git\Excel-Custom-Functions>npm run build

> excel-custom-functions@2.0.0 build c:\dev\git\Excel-Custom-Functions
> webpack -p --mode production --https false

c:\dev\git\Excel-Custom-Functions\dist\functions.json created for file: c:\dev\git\Excel-Custom-Functions\src\functions\functions.ts
Error: ENOENT: no such file or directory, stat 'c:\dev\git\Excel-Custom-Functions\dist\functions.json'
    at Object.statSync (fs.js:1009:3)
    at c:\dev\git\Excel-Custom-Functions\node_modules\custom-functions-metadata-plugin\lib\customfunctionsplugin.js:46:34
 

So far, we've just stayed using the older version.

akrantz

comment created time in 9 days

PullRequestReviewEvent

PR closed OfficeDev/Office-Addin-TaskPane

Reviewers
App insights web support

I've been able to get office-addin-usage-data-web to send telemetry up. Please let me know what suggestions you have!

+197 -250

0 comment

5 changed files

arttarawork

pr closed time in 10 days

PR opened OfficeDev/Office-Addin-TaskPane

Support debugging using Edge webview (EdgeHTML)

Add launch configs to allow debugging Excel, PowerPoint, or Word desktop apps on Windows when the Edge webview is being used.

This does not check or enforce for whether the Office desktop apps are using the Edge webview. The developer can run the following command to force it: npx office-addin-dev-settings webview manifest.xml edge.

Note that this is for the older non-Chromium version of Edge. For Edge Chromium, once the Office apps are updated with the ability to enable debugging, it will be possible to extend this to add launch configs for Edge Chromium which use type: edge and the relevant settings.

+61 -18

0 comment

3 changed files

pr created time in 12 days

create barnchakrantz/Office-Addin-TaskPane

branch : debug-edge-webview

created branch time in 12 days

push eventOfficeDev/office-toolbox

dependabot[bot]

commit sha ebefe280012187e42a227a787ae695323466d54a

Bump tree-kill from 1.1.0 to 1.2.2 (#45) Bumps [tree-kill](https://github.com/pkrumins/node-tree-kill) from 1.1.0 to 1.2.2. - [Release notes](https://github.com/pkrumins/node-tree-kill/releases) - [Commits](https://github.com/pkrumins/node-tree-kill/compare/v1.1.0...v1.2.2) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

view details

push time in 13 days

PR merged OfficeDev/office-toolbox

Bump tree-kill from 1.1.0 to 1.2.2 dependencies

Bumps tree-kill from 1.1.0 to 1.2.2. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/pkrumins/node-tree-kill/releases">tree-kill's releases</a>.</em></p> <blockquote> <h2>v1.2.1</h2> <p>Changelog:</p> <ul> <li>add missing LICENSE file</li> <li>fix TypeScript definitions</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pkrumins/node-tree-kill/commit/cb478381547107f5c53362668533f634beff7e6e"><code>cb47838</code></a> 1.2.2</li> <li><a href="https://github.com/pkrumins/node-tree-kill/commit/deee138a8cbc918463d8af5ce8c2bec33c3fd164"><code>deee138</code></a> fix: handle sanitising better, add tests</li> <li><a href="https://github.com/pkrumins/node-tree-kill/commit/ff73dbf144c4c2daa67799a50dfff59cd455c63c"><code>ff73dbf</code></a> fix: sanitise pid parameter (<a href="https://github-redirect.dependabot.com/pkrumins/node-tree-kill/issues/31">#31</a>)</li> <li><a href="https://github.com/pkrumins/node-tree-kill/commit/3b5b8feeb3175a3e16ea7e0e09fdf5b8d2b87b08"><code>3b5b8fe</code></a> update Changelog</li> <li><a href="https://github.com/pkrumins/node-tree-kill/commit/d408f04316d8656cf520f35799518d5838d53955"><code>d408f04</code></a> 1.2.1</li> <li><a href="https://github.com/pkrumins/node-tree-kill/commit/32624c18b8ae42bb0c093b6024044de515b0802c"><code>32624c1</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pkrumins/node-tree-kill/issues/24">#24</a> from LinusU/patch-1</li> <li><a href="https://github.com/pkrumins/node-tree-kill/commit/c784c3d538f117fdf4fbbce1c783c88678f3bd87"><code>c784c3d</code></a> Add callback-as-second-argument support to typings</li> <li><a href="https://github.com/pkrumins/node-tree-kill/commit/6d6843c68aa0353813f259103ca1ead72d1a3d20"><code>6d6843c</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pkrumins/node-tree-kill/issues/21">#21</a> from orodley/patch-1</li> <li><a href="https://github.com/pkrumins/node-tree-kill/commit/d515c804963d495fbe7e24a693682f3f9f931e51"><code>d515c80</code></a> Add LICENSE file</li> <li><a href="https://github.com/pkrumins/node-tree-kill/commit/92ead1111360eb54432e9f4f65f49bfb5ee6cca2"><code>92ead11</code></a> 1.2.0</li> <li>Additional commits viewable in <a href="https://github.com/pkrumins/node-tree-kill/compare/v1.1.0...v1.2.2">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+3 -3

0 comment

1 changed file

dependabot[bot]

pr closed time in 13 days

PullRequestReviewEvent
PullRequestReviewEvent

push eventmicrosoft/ChakraCore-Debugger

Courtney Owen

commit sha 72506982826f22e40fea25c5fac23b258500a866

Update ChakraCore version to latest

view details

Adam Krantz

commit sha ae392aa9b8deb6d9e068fe1f1f71cb23586f2559

Merge pull request #93 from TCourtneyOwen/update-chakracore-version Update ChakraCore version to latest

view details

push time in 14 days

PR merged microsoft/ChakraCore-Debugger

Reviewers
Update ChakraCore version to latest

Addresses CG issues and gets us up to date

+15 -15

0 comment

10 changed files

TCourtneyOwen

pr closed time in 14 days

PullRequestReviewEvent

pull request commentOfficeDev/Office-Addin-Scripts

Add support to parameter addressses feature

I see that there are changes for the CustomFunctionsRuntime.d.ts file here: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/47122

This provides me more context that this is similar to the @requiresAddress tag in that @requiresParameterAddresses allows the invocation context to have another property with the parameter addresses.

I now see that these code changes are OK.

Please add test cases for the following scenarios:

  1. Having both @requiresAddress and @requiresParameterAddress.
  2. A function with more than one parameter which uses @requiresParameterAddresses.

Please also update the specification to add documentation for @requiresParametersAddresses.

jiju-MS

comment created time in 15 days

push eventOfficeDev/Office-Addin-TaskPane

Adam Krantz

commit sha 86d5b310a3c41048e9fb4ddf96767258bd2e629a

AppDomain in manifest should include the protocol

view details

Adam Krantz

commit sha 4f1e950f25c4623dc85fa73a808f6ba94f24c068

Merge pull request #84 from akrantz/appdomain-protocol AppDomain in manifest should include the protocol

view details

push time in 16 days

Pull request review commentDefinitelyTyped/DefinitelyTyped

Update to CustomFunctionsRuntime to 1.3

 declare namespace CustomFunctions {          * `{ "requiresAddress": true }`          *          * If the metadata JSON file is being generated from JSDoc comments, include the tag `@requiresAddress`.+         * [Api set: CustomFunctionsRuntime 1.1]          */         address?: string;+        /**+         * The range addresses where the function parameters are located, if requested, otherwise undefined.+         *+         * To request the parameter addresses for the function, in the metadata JSON file, the function options should specify:+         * `{ "requiresParameterAddresses": true }`+         *+         * If the metadata JSON file is being generated from JSDoc comments, include the tag `@requiresParameterAddresses`.+         * [Api set: CustomFunctionsRuntime 1.1]+         */+        parameterAddresses?: string;

Given that I don't have any context for this feature, it's not very clear to me what this would return when there are multiple parameters to the custom functions. A single custom function parameter could be a single cell address, or could represent a range as input, and there could be multiple parameters. When more than one, is this a list of ranges? It might help to explain this more in the JSDoc description. @mscharlock

mscharlock

comment created time in 16 days

PullRequestReviewEvent

pull request commentOfficeDev/Office-Addin-TaskPane

AppDomain in manifest should include the protocol

@TCourtneyOwen The 1903 build failed. I didn't do anything regarding the CI loop. Can you see about getting this all passing so we can merge it?

akrantz

comment created time in 16 days

pull request commentOfficeDev/Office-Addin-Scripts

Add support to parameter addressses feature

The specification is here: https://github.com/OfficeDev/Office-Addin-Scripts/blob/master/packages/custom-functions-metadata/Specification.md

When @requiresParameterAddress is specified, where is the address for the parameter passed into the function? Can you use this with multiple parameters? Can this co-exist with @requiresAddress (which provides the address where the function is being invoked in CustomFunctions.Invocation.address)?

Also, the CustomFunctionsRuntime.d.ts file would need to be updated to reflect the IntelliSense that the user would see when editing. I want to understand how they would write code that uses the parameter address, so the IntelliSense shows the appropriate information.

jiju-MS

comment created time in 16 days

PullRequestReviewEvent

pull request commentOfficeDev/Office-Addin-Scripts

Add support to parameter addressses feature

Before making these changes, the specification should be updated to make it clear about this feature. There is no description here about this feature and what capability it is intended to provide. Let's meet to discuss in more detail.

jiju-MS

comment created time in 16 days

Pull request review commentmicrosoft/ChakraCore-Debugger

Add ARM64 support

     <Import Project="..\..\packages\boost.1.68.0.0\build\boost.targets" Condition="Exists('..\..\packages\boost.1.68.0.0\build\boost.targets')" />     <Import Project="..\..\packages\boost_date_time-vc141.1.68.0.0\build\boost_date_time-vc141.targets" Condition="Exists('..\..\packages\boost_date_time-vc141.1.68.0.0\build\boost_date_time-vc141.targets')" />     <Import Project="..\..\packages\Microsoft.ChakraCore.vc140.1.11.20\build\native\Microsoft.ChakraCore.vc140.targets" Condition="Exists('..\..\packages\Microsoft.ChakraCore.vc140.1.11.20\build\native\Microsoft.ChakraCore.vc140.targets')" />+    <Import Project="..\..\packages\ReactWindows.ChakraCore.ARM64.1.11.20\build\native\ReactWindows.ChakraCore.ARM64.targets" Condition="'$(Platform)' == 'ARM64' AND Exists('..\..\packages\ReactWindows.ChakraCore.ARM64.1.11.20\build\native\ReactWindows.ChakraCore.ARM64.targets')" />

A separate ChakraCore ARM64 NuGet. Regardless of who produced this NuGet, it doesn't have anything to do with ReactWindows other than it wants to be a consumer of the NuGet. Couldn't the name be updated to reflect that by using "Microsoft" instead of "ReactWindows"?

JunielKatarn

comment created time in 16 days

PullRequestReviewEvent

Pull request review commentmicrosoft/ChakraCore-Debugger

Add ARM64 support

     <Import Project="..\..\packages\boost.1.68.0.0\build\boost.targets" Condition="Exists('..\..\packages\boost.1.68.0.0\build\boost.targets')" />     <Import Project="..\..\packages\boost_date_time-vc141.1.68.0.0\build\boost_date_time-vc141.targets" Condition="Exists('..\..\packages\boost_date_time-vc141.1.68.0.0\build\boost_date_time-vc141.targets')" />     <Import Project="..\..\packages\Microsoft.ChakraCore.vc140.1.11.20\build\native\Microsoft.ChakraCore.vc140.targets" Condition="Exists('..\..\packages\Microsoft.ChakraCore.vc140.1.11.20\build\native\Microsoft.ChakraCore.vc140.targets')" />+    <Import Project="..\..\packages\ReactWindows.ChakraCore.ARM64.1.11.20\build\native\ReactWindows.ChakraCore.ARM64.targets" Condition="'$(Platform)' == 'ARM64' AND Exists('..\..\packages\ReactWindows.ChakraCore.ARM64.1.11.20\build\native\ReactWindows.ChakraCore.ARM64.targets')" />

Let's have a discussion about this. If they are providing the binaries, then they will need to do so for each release. Why wouldn't ChakraCore then be creating the NuGet? Could we have the ChakraCore-Debugger pipeline create the separate NuGet for ARM64 rather than do this from ReactWindows?

JunielKatarn

comment created time in 17 days

PullRequestReviewEvent

pull request commentOfficeDev/Office-Addin-TaskPane

AppDomain in manifest should include the protocol

The other option would be to remove <AppDomains>...</AppDomains> altogether since it is not required by default.

akrantz

comment created time in 17 days

pull request commentOfficeDev/Office-Addin-TaskPane

AppDomain in manifest should include the protocol

I also formatted the XML which made some minor updates to the manifest files.

akrantz

comment created time in 17 days

PR closed OfficeDev/Office-Addin-TaskPane

"https://" in AppDomain

This to avoid parsing issues when developer adds AppDomains without "https://".

+2 -2

4 comments

1 changed file

exextoc

pr closed time in 17 days

pull request commentOfficeDev/Office-Addin-TaskPane

"https://" in AppDomain

I've made the changes in this pull request for all Office hosts: https://github.com/OfficeDev/Office-Addin-TaskPane/pull/82

exextoc

comment created time in 17 days

create barnchakrantz/Office-Addin-TaskPane

branch : appdomain-protocol

created branch time in 17 days

pull request commentOfficeDev/Office-Addin-TaskPane

"https://" in AppDomain

After investigating this, we should do this for all of the Office hosts, not just Outlook.

exextoc

comment created time in 17 days

PullRequestReviewEvent

Pull request review commentmicrosoft/ChakraCore-Debugger

Add ARM64 support

     <description>Debugging companion library for the ChakraCore JavaScript engine.</description>     <authors>Microsoft</authors>     <projectUrl>https://github.com/microsoft/ChakraCore-Debugger</projectUrl>-    <licenseUrl>https://github.com/microsoft/ChakraCore-Debugger/blob/master/LICENSE</licenseUrl>+    <repository type="git" url="$repoUrl$" branch="$repoBranch$" commit="$repoCommit$" />+    <license type="file">LICENSE.txt</license>     <requireLicenseAcceptance>false</requireLicenseAcceptance>-    <copyright>Copyright © 2019 Microsoft</copyright>+    <copyright>Copyright &#169; 2019 Microsoft</copyright>

Looking at the license change, should the year be updated to 2020?

JunielKatarn

comment created time in 18 days

Pull request review commentmicrosoft/ChakraCore-Debugger

Add ARM64 support

     <Import Project="..\..\packages\boost.1.68.0.0\build\boost.targets" Condition="Exists('..\..\packages\boost.1.68.0.0\build\boost.targets')" />     <Import Project="..\..\packages\boost_date_time-vc141.1.68.0.0\build\boost_date_time-vc141.targets" Condition="Exists('..\..\packages\boost_date_time-vc141.1.68.0.0\build\boost_date_time-vc141.targets')" />     <Import Project="..\..\packages\Microsoft.ChakraCore.vc140.1.11.20\build\native\Microsoft.ChakraCore.vc140.targets" Condition="Exists('..\..\packages\Microsoft.ChakraCore.vc140.1.11.20\build\native\Microsoft.ChakraCore.vc140.targets')" />+    <Import Project="..\..\packages\ReactWindows.ChakraCore.ARM64.1.11.20\build\native\ReactWindows.ChakraCore.ARM64.targets" Condition="'$(Platform)' == 'ARM64' AND Exists('..\..\packages\ReactWindows.ChakraCore.ARM64.1.11.20\build\native\ReactWindows.ChakraCore.ARM64.targets')" />

Could you explain what's required to be imported for ARM64? These should not be coming from the ReactNative project.

JunielKatarn

comment created time in 18 days

Pull request review commentmicrosoft/ChakraCore-Debugger

Add ARM64 support

   <config>     <add key="repositoryPath" value="packages" />   </config>+  <packageSources>+    <add key="msreact-public" value="https://pkgs.dev.azure.com/ms/react-native/_packaging/react-native-public/nuget/v3/index.json" />

Why is there something related to ReactNative here? This should not depend on React Native.

JunielKatarn

comment created time in 18 days

PullRequestReviewEvent
PullRequestReviewEvent

pull request commentOfficeDev/Office-Addin-TaskPane

"https://" in AppDomain

I'd like to understand better the motivation behind this change. The protocol is not part of the domain. Is this a workaround for a bug in Outlook?

exextoc

comment created time in a month

PR closed OfficeDev/Office-Addin-TaskPane-JS

"https://" in AppDomain

This to avoid parsing issues when developer adds AppDomains without "https://".

+2 -2

1 comment

1 changed file

exextoc

pr closed time in a month

pull request commentOfficeDev/Office-Addin-TaskPane-JS

"https://" in AppDomain

Because changes in the https://github.com/OfficeDev/Office-Addin-TaskPane are merged into the other templates such as this one, we only need a pull request to be made in one place.

exextoc

comment created time in a month

delete branch akrantz/Office-Addin-TaskPane

delete branch : prod-assets

delete time in a month

push eventOfficeDev/Office-Addin-TaskPane

Adam Krantz

commit sha 079264801a9940ee9d26bf403ab030afaeaed698

ensure prod build contains assets

view details

Adam Krantz

commit sha 4ef2313ddf797ef9214a95ef6cab9d2d1e2e36ce

Merge pull request #81 from akrantz/prod-assets ensure production build contains assets

view details

push time in a month

PR merged OfficeDev/Office-Addin-TaskPane

ensure production build contains assets

Currently, production builds output the assets files using the hash for the file name, and do not include assets that are in the manifest but not referenced in the code.

Change the webpack config so the output path for assets keeps the original folder path, and add a reference in the code to icons in the manifest so they will also be in the build output.

+49 -1

1 comment

7 changed files

akrantz

pr closed time in a month

Pull request review commentOfficeDev/Office-Addin-TaskPane

ensure production build contains assets

 const HtmlWebpackPlugin = require("html-webpack-plugin"); const fs = require("fs"); const webpack = require("webpack"); +const urlDev="https://localhost:3000/";+const urlProd="https://www.contoso.com/"; // CHANGE THIS TO YOUR PRODUCTION DEPLOYMENT LOCATION

It does copy the manifest for both production and development. The buildType variable is "dev" or "prod" so the manifest output is "manifest.dev.xml" or "manifest.prod.xml". It can handle manifests with other names, e.g. "manifest.excel.xml" will be output as "manifest.excel.dev.xml".

The file doesn't get written out when running the dev server since it serves everything from memory. You can still browse to "https://localhost:3000/manifest.dev.xml". If you do npm run build -- --mode development you can also see the dist file output.

akrantz

comment created time in a month

Pull request review commentOfficeDev/Office-Addin-TaskPane

ensure production build contains assets

 const HtmlWebpackPlugin = require("html-webpack-plugin"); const fs = require("fs"); const webpack = require("webpack"); +const urlDev="https://localhost:3000/";+const urlProd="https://www.contoso.com/"; // CHANGE THIS TO YOUR PRODUCTION DEPLOYMENT LOCATION

yes, when we build for production, the dist output will have a manifest that points to the urlProd location. We can't possibly know what this value should be, the developer would want to specify where they plan to deploy it. I put the fake "https://www.contoso.com/" value so you can see that get written to the manifest.prod.xml in the dist folder.

akrantz

comment created time in a month

Pull request review commentOfficeDev/Office-Addin-TaskPane

ensure production build contains assets

 const HtmlWebpackPlugin = require("html-webpack-plugin"); const fs = require("fs");

I don't think we need to. It is not common to want to run the dev-server as prod. It can be done with: npm run dev-server -- --mode production so I don't think we need a separate npm run script for it.

akrantz

comment created time in a month

PR opened OfficeDev/Office-Addin-TaskPane

ensure prod build contains assets

Currently, production builds output the assets files using the hash for the file name, and do not include assets that are in the manifest but not referenced in the code.

Change the webpack config so the output path for assets keeps the original folder path, and add a reference in the code to icons in the manifest so they will also be in the build output.

+49 -1

0 comment

7 changed files

pr created time in a month

create barnchakrantz/Office-Addin-TaskPane

branch : prod-assets

created branch time in a month

issue commentOfficeDev/generator-office

required icon not generated when creating office angular/typescript project

Yes. Let's track the issue in https://github.com/OfficeDev/Office-Addin-TaskPane and we'll merge the fix through all of the Yo Office templates.

marsop

comment created time in a month

pull request commentOfficeDev/Office-Addin-Scripts

Fix security vulnerabilities

@TCourtneyOwen I renamed the PR just because "CG" doesn't mean much to anyone. Hope that's OK with you.

TCourtneyOwen

comment created time in a month

pull request commentOfficeDev/generator-office

Fixes issue where postInstallHints wasn't getting called

@TCourtneyOwen This pull request is still active. Your latest release notes implied that it was included.

TCourtneyOwen

comment created time in a month

PR closed OfficeDev/generator-office

Update package-lock.json

Thank you for your pull request. Please provide the following information.


  1. Do these changes impact User Experience? (e.g., how the user interacts with Yo Office and/or the files and folders the user sees in the project that Yo Office creates)

    • [ ] Yes
    • [x] No

    If Yes, briefly describe what is impacted.

  2. Do these changes impact documentation? (e.g., a tutorial on https://docs.microsoft.com/en-us/office/dev/add-ins/overview/office-add-ins)

    • [ ] Yes
    • [x] No

    If Yes, briefly describe what is impacted.

  3. Validation/testing performed:

    Describe manual testing done.

  4. Platforms tested:

    • [ ] Windows
    • [ ] Mac
+1 -1

3 comments

1 changed file

lindalu-MSFT

pr closed time in a month

pull request commentOfficeDev/generator-office

Update package-lock.json

Thanks Linda. @TCourtneyOwen is managing this repository and also receives the alerts. He should be addressing them in a timely fashion. If you see issues which aren't getting addressed, please contact him or me.

lindalu-MSFT

comment created time in a month

issue commentOfficeDev/generator-office

Hosting on Linux

Sure, if you know a different way to let webpack know to keep these assets it would be useful. This seemed to be the easiest way to do it that I could find.

bwong199

comment created time in 2 months

issue commentOfficeDev/generator-office

Hosting on Linux

I noticed recently that for production builds, the assets are not provided. I'm going to make an update to the Yo Office templates with a fix for this.

If you modify the webpack.config.js so that the module for the assets has the following config, it will output the assets with their original path.

        {
          test: /\.(png|jpg|jpeg|gif)$/,
          loader: "file-loader",
          options: {
            name: '[path][name].[ext]',
          }          
        }

In taskpane.ts, you can reference the assets in the manifest, so they will be included in the build output in the dist folder.

// images referenced in the manifest
import "../../assets/icon-16.png";
import "../../assets/icon-32.png";
import "../../assets/icon-80.png";

I hope this helps.

bwong199

comment created time in 2 months

push eventakrantz/office-addins

Adam Krantz

commit sha d470bef29dc4bb80972fb2df888f89f68171eba5

update browser-info

view details

push time in 2 months

push eventakrantz/Office-Addin-TaskPane

Adam Krantz

commit sha e7dee839b840fdab63b4943fdf587b9a928b545c

add reference in code to images in the manifest

view details

push time in 2 months

issue commentmicrosoft/vscode

Allow multiple preLaunchTasks to be defined

@isidorn Sure, compound tasks can be used but what I tried to point out is that it does lead to problems. Is this something where an outside contributor could do the work? It seems you have the expertise here but you don't view it as a priority -- which I can understand -- but I am wondering if it would be realistic to have someone else look to doing the work if it is important enough to them.

akrantz

comment created time in 2 months

issue commentmicrosoft/vscode

Allow multiple preLaunchTasks to be defined

@isidorn While I respect the VS Code team's decision as to whether it is reasonable to implement, is it possible to get information about why it was considered "out of scope"? Is this a problem with the request itself, or do resource or schedule constraints simply preclude this from being done? It would be nice to have more of your thoughts about this. Thanks.

akrantz

comment created time in 2 months

push eventakrantz/office-addins

Adam Krantz

commit sha 3b96de59aeb0293535f210ca77566eda32b1df99

update browser-info

view details

push time in 2 months

push eventakrantz/office-addins

Adam Krantz

commit sha 480ed8e237b24aa262a7401c55ed5f00b5b39676

update browser-info

view details

push time in 2 months

push eventakrantz/Office-Addin-TaskPane

Adam Krantz

commit sha d599e2065dd59c6fa3f9b97ca4e3c95d0cff73a3

update webpack config to keep assets path and filename

view details

push time in 2 months

pull request commentOfficeDev/Excel-Custom-Functions

npm audit fix addresses all vulnerabilities

package-lock.json was erroneous deleting in the previous PR. It's good to put it back. :-)

TCourtneyOwen

comment created time in 2 months

pull request commentOfficeDev/Excel-Custom-Functions

npm audit fix addresses all vulnerabilities

Why are there so many changes here? Shouldn't it just be lodash?

TCourtneyOwen

comment created time in 2 months

pull request commentOfficeDev/Office-Addin-TaskPane-JS

npm audit fix addresses all vulnerabilities

@TCourtneyOwen There is a merge conflict for package-lock.json. Did you really start from a clean master branch to create the fix-vulnerabilities branch, or are you reusing a branch? I can sometimes reuse the branch name but I delete the branch then create a new branch off of master with that name.

TCourtneyOwen

comment created time in 2 months

push eventakrantz/office-addins

Adam Krantz

commit sha 22bc83a0b816cd3c419e71a976d5dbad21901fc8

update browser-info

view details

push time in 2 months

push eventakrantz/Office-Addin-TaskPane

Adam Krantz

commit sha 332d4a6c29f16e422f221878596176788ac6718e

resize images

view details

push time in 2 months

push eventakrantz/Office-Addin-TaskPane

Adam Krantz

commit sha 725768fb2bbe7333413e3db4e31eeb49ffad4bd8

update webpack config to copy all manifest files during build

view details

Adam Krantz

commit sha 0c5f425ad4fbfb386b463d38985f74f62b882350

fix manifest file formatting

view details

push time in 2 months

push eventakrantz/office-addins

Adam Krantz

commit sha fdd81557ba98743a0aada992e0a1b066998f477f

update browser-info

view details

push time in 2 months

push eventakrantz/Office-Addin-TaskPane

Adam Krantz

commit sha 154e191312e5145721d22d1cfad3a190f68638ab

update support url in manifests

view details

push time in 2 months

issue commentOfficeDev/generator-office

Spelling `global AppCpntainer` -> `global AppContainer`

Pull requests are welcome. Repository

wandyezj

comment created time in 2 months

push eventakrantz/office-addins

Adam Krantz

commit sha bd54197ff32168121f76cf29d667e5b92b24b81a

update browser-info

view details

push time in 2 months

push eventakrantz/Office-Addin-TaskPane

Adam Krantz

commit sha 0cef3ae9e1df623510ed079b35f9aa563c601efe

no version for Safari on Mac

view details

push time in 2 months

push eventakrantz/office-addins

Adam Krantz

commit sha c75263e4828601259f99fe1913d09c3f3a08405a

update browser-info

view details

push time in 2 months

more