Coder Social home page Coder Social logo

Comments (34)

Zlatkovsky avatar Zlatkovsky commented on August 10, 2024 2

@eblancperso , thanks for bringing up the PromiseConstructor issue. Let me look into it more. Opening #150 to track this. If you have suggestions in the meantime on how else to author the d.ts file to achieve the same result but without the ES6 problem -- I'm all ears :-)!

from office-js.

trmini avatar trmini commented on August 10, 2024 1

Thanks @weird-dreams and @magnusdanielson. I was able to repro and verify the fix using your samples. I will work on getting it deploy in the next few weeks.

Thanks,
Trang

from office-js.

Zlatkovsky avatar Zlatkovsky commented on August 10, 2024 1

Sorry for the delay. An update to NPM is forthcoming, I am working on it (and, more importantly, on making it trivial to publish NPM at the same time as our CDN in the future). I hope to have it ready in the next few days.

from office-js.

Zlatkovsky avatar Zlatkovsky commented on August 10, 2024 1

@eblancperso & others on this thread: I'm happy to say that the NPM package is now updated.

You can get the latest Office.js version using “npm install @microsoft/office-js”! This will install version 1.1.6 which, today, is the latest version of office.js, corresponding to what you'd get on the public CDN today.

I’ve also updated our internal build process so that future official-version creation is simple. That way, we'll be able to keep the CDN and NPM package in sync.

Thanks for your patience on this.

from office-js.

Zlatkovsky avatar Zlatkovsky commented on August 10, 2024 1

@eblancperso , sorry, I somehow had missed your previous question. Thanks for re-pinging me on it.

It's a good question. In general:

  1. The d.ts file published on @types/office-js, https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/office-js/index.d.ts, @microsoft/office-js/dist/office.d.ts, and http://appsforoffice.microsoft.com/lib/1/hosted/office.d.ts should all be near-identical. I say "near" because there is a bit of a timing difference between how those are released, but they should be very very similar.
  2. For the host-specific APIs for Excel, Word, OneNote, and Visio, there is a pretty-much-guaranteed match-up between the implementation and the d.ts file, because the TypeScript is auto-generated, and the d.ts is thus auto-generated off of it. Unfortunately, this is not the case with Outlook, where the d.ts is written manually, and separately from the underlying implementation. As such, there can be cases where the two diverge. If you see this happen, please file a bug on https://github.com/OfficeDev/office-js/issues (or feel free to submit a pull request to https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/office-js/index.d.ts if you know what the right fix should be). In either of those cases, whether in an issue or a pull request, please give a link to the docs, so that we can figure out where the mismatch happened -- and I can pass it along to that team.

Thanks, and apologies for the mismatch,

~ Michael

from office-js.

Zlatkovsky avatar Zlatkovsky commented on August 10, 2024

Thanks for reporting! We actually had a discussion recently about aria-web-telemetry, so your report is well-timed. I will being it up to the team.

from office-js.

ndeeH avatar ndeeH commented on August 10, 2024

Hi @Zlatkovsky , my add in just was rejected by the store validation because of this error!
On Windows clients we get this error from time to time depending on load timings of the dependant modules (a reload mostly does load the add in properly).
On Mac clients the loading of modules seems to be different and the store tester does not get the app to start (require.js missmatch error).
So PLEASE name the define in aria-web-telemetry to avoid us doing those ugly workArounds.
TIA, Andi

from office-js.

Zlatkovsky avatar Zlatkovsky commented on August 10, 2024

@weird-dreams , let me re-ping one of my colleagues, who might be able to help with this.

from office-js.

IanPearce avatar IanPearce commented on August 10, 2024

Hi
Any news on this or a beta version, I am currently using 16.0.9010.1000 and I get exactly the same issue.
Kind regards
Ian

from office-js.

ndeeH avatar ndeeH commented on August 10, 2024

@Zlatkovsky Please set a named define in the aria-web-telemetry.js to avoid those work arounds!!!
The work around described by @magnusdanielson also has performance issues on caching.

from office-js.

trmini avatar trmini commented on August 10, 2024

Hi @weird-dreams and @magnusdanielson,

We have a proposed fix that I would like to verify myself. However, I can't repro the issue in the first place. Is this possible if you can send me the test bundle that repro the issue? I tried to reference office.js via script tag and load it using require.js but neither case repro. Perhaps, I didn't have the same loading sequence to trigger the conflicts, so your repro file will help.

Thanks,
Trang

from office-js.

ndeeH avatar ndeeH commented on August 10, 2024

@trmini I will send you a mail with manifest files to reproduce.

from office-js.

magnusdanielson avatar magnusdanielson commented on August 10, 2024

@trmini I have sent you my manifest.

from office-js.

ndeeH avatar ndeeH commented on August 10, 2024

Thank you @trmini . Good job!

from office-js.

IanPearce avatar IanPearce commented on August 10, 2024

Hi @trmini , any news on it going out?

from office-js.

trmini avatar trmini commented on August 10, 2024

Hi @IanPearce, we deployed the update to our test environment but was behind some unrelated changes before we can get to production CDN. In the mean time, you can test out the fix by referencing the Office.js here: https://appsforoffice.edog.officeapps.live.com/lib/1.1/hosted/office.js

Thanks,
Trang

from office-js.

ndeeH avatar ndeeH commented on August 10, 2024

Hi @trmini, double checked your fix in our app - it works!
Could you please notfify me, when I can remove the work around?
TIA, Andi

from office-js.

IanPearce avatar IanPearce commented on August 10, 2024

Hi @trmini , I just checked too, it loads perfectly now, can you post on here when it goes live?
Thanks for your help
Ian

from office-js.

trmini avatar trmini commented on August 10, 2024

I verified that the change has been deployed to Production. Thanks again for reporting the issue and working with us to get it resolved.

Thanks,
Trang

from office-js.

anoop7181 avatar anoop7181 commented on August 10, 2024

Hi @trmini ,

Any idea when this update will be pushed as latest NuGet Package.

Thanks
Anoop

from office-js.

ndeeH avatar ndeeH commented on August 10, 2024

Hi @anoop7181 ,
I think "aria-web-telemetry.js" is always loaded on demand from an CDN and therefore will not be part of a nuget package. Is this true @trmini ?
see https://github.com/OfficeDev/office-js/search?utf8=%E2%9C%93&q=aria&type=

from office-js.

anoop7181 avatar anoop7181 commented on August 10, 2024

Hi @weird-dreams ,

I am not quite sure if the is only issue with aria-web-telemetry.js . The latest Office js nuget still throws error. When i refer to Dogfood link of Officejs https://appsforoffice.edog.officeapps.live.com/lib/1.1/hosted/office.js) , i don't face the issue anonymous define module.

Just wondering when that update would be pushed to NuGet.

Regards
Anoop

from office-js.

trmini avatar trmini commented on August 10, 2024

Hi @anoop7181,

We are working on updating the Nuget package with the fix. I will update the thread when it is ready.

@weird-dreams, a copy of the Aria SDK is part of the package as Office.js loads it from a relative path.

Thanks,
Trang

from office-js.

anoop7181 avatar anoop7181 commented on August 10, 2024

Hi @trmini ,

Thank you for the response. I will await update from you.

Regards
Anoop

from office-js.

anoop7181 avatar anoop7181 commented on August 10, 2024

Hi @trmini ,

Just checking again if there is an ETA for pushing the hosted prod update of officejs to NPM or nugget installer.
I couldn't find latest files in Gtihub.

My customer has concern using it from CDN and our go-live is coming soon. Please advise.

Regards
Anoop

from office-js.

trmini avatar trmini commented on August 10, 2024

Hi @anoop7181,

Unfortunately, there are some other dependencies that prevent us from publishing a new NugGet package right away. In the mean time, is this possible for you to override the ariatelemetry\aria-web-telemetry.js file with https://appsforoffice.microsoft.com/lib/1/hosted/ariatelemetry/aria-web-telemetry.js?

Thanks,
Trang

from office-js.

magnusdanielson avatar magnusdanielson commented on August 10, 2024

@trmini @anoop7181 No that is not possible. aria-web-telemetry is loaded by Word not by us. We have no control over that, we don't use it at all. It is an internal Microsoft file that sends telemetry data about usage to Microsoft.

from office-js.

Zlatkovsky avatar Zlatkovsky commented on August 10, 2024

I think what Trang meant was that if you are OK using an NPM package, then at that point you have flexibility to twiddle with this NPM package when you publish out your website (and also publish the contents of the NPM package, that is -- Office.js is not modularized/bundleable today, so essentially you'd just be hosting your own copy of what is on the CDN, modulo the one tweak).

That being said, using a non-CDN reference is not currently allowed in the Store, so it would be more of a development-time workaround rather than a workaround you can ship to the Store (under current Store policies). Hopefully we should be able to get the fix out onto the CDN soon.

from office-js.

eblancperso avatar eblancperso commented on August 10, 2024

I know this issue is closed but, do you have any ETA when this fix will be available through npm? I've tested with the CDN and it works but our configuration requires the npm package.

Thank you!

from office-js.

trmini avatar trmini commented on August 10, 2024

Hi,
We have updated the NuGet package with the change:
https://www.nuget.org/packages/Microsoft.Office.js/

Thanks,
Trang

from office-js.

eblancperso avatar eblancperso commented on August 10, 2024

@trmini Thank you for your answer, but what about the npm package?

from office-js.

eblancperso avatar eblancperso commented on August 10, 2024

@Zlatkovsky Is it normal that the definitelytyped "office.d.ts" in the @ microsoft/office-js package is not as up-to-date as the definitelytyped "index.d.ts" in the @ types/office-js package.

If you look at the definitelytyped from @ types/office-js, you can see that there is a method named "getSelectedEntities(): Entities;" from Mailbox 1.6, which can be found in the "outlook-win32-16.02.js" file under @ microsoft/office-js. This method is not in the definitelytyped under @ microsoft/office-js. The definitelytyped is not up-to-date within its own npm package?

from office-js.

eblancperso avatar eblancperso commented on August 10, 2024

@Zlatkovsky I'm sorry to poke you again but is it possible to have an answer about my previous question please? Thank you!

from office-js.

eblancperso avatar eblancperso commented on August 10, 2024

Thank you @Zlatkovsky for your response! Quick remark here about the latest definitely typed package (under @ types/office-js). My web project is currently setuped to target ES5. When I try to use the definitely typed under @ types/office-js, I get an error about PromiseConstructor. I switched my project's typescript build target to ES6 and it seems to work. Isn't it a bit odd that you use a ES6 feature (PromiseConstructor) from lib.es6.d.ts for Office Add-In which doesn't support ES6 since it runs under IE11. The solution we found now is to target ES5 but specify lib ES6 so our project can build (the problem with that is that we can write/compile ES6 features like async, promise, etc but they will not work on runtime).

from office-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.