Skip to content

Add support for not having to pin strip-ansi #1286

Closed

Description

@TheLarkInn

Currently we've had to pin @sindresorhus's strip-ansi because of the use of arrow functions. We should essentially make whatever changes needed to allow us to use that code (transpilation etc.) so that it still works for strip-ansi@4+ but without breaking IE 11 compat.

See #1273

Activity

  1. alexander-akait commented on Jan 19, 2018

    @alexander-akait
    Member

    @TheLarkInn need patch release after merge, otherwise babel would be a more rational solution

  2. lydell commented on Jan 19, 2018

    @lydell

    See #1279 for a potential solution of running node_modules through Babel.

  3. TheLarkInn commented on Jan 19, 2018

    @TheLarkInn
    MemberAuthor
  4. wayofthefuture commented on Jan 21, 2018

    @wayofthefuture

    Broke the entire build

  5. kaiyoma commented on Jan 23, 2018

    @kaiyoma

    This is causing issues with our project too. If I try to upgrade to the latest version, I start getting yarn errors:

    error "nyc#string-width#strip-ansi" is wrong version: expected "4.0.0", got "3.0.1"
    warning "nyc#string-width#strip-ansi#ansi-regex@^2.0.0" could be deduped from "2.1.1" to "ansi-regex@2.1.1"
    error "nyc#strip-ansi#ansi-regex" is wrong version: expected "3.0.0", got "2.1.1"
    error Found 2 errors.
    

    We're currently on version 2.10.0 and would like to upgrade as the dev server is broken in IE11 in this version.

  6. robvree commented on Feb 2, 2018

    @robvree

    This is also breaking our dev build in IE11. Running node_modules through babel is not a solution. Everything in node_modules should already be transpiled.

  7. robvree commented on Feb 2, 2018

    @robvree

    Update: Updating from 2.11.0 to 2.11.1 (which uses v3 of strip-ansi) and moving my polyfill for es6-object-assign above the first import in my entry point (not sure if this is related) has fixed my IE11 build.

    // polyFills for IE11 that need to run before the imports
    require("es6-object-assign").polyfill();
    
    // react-hot-loader must come before importing React
    import "react-hot-loader";
    import * as React from "react";
    import { render } from "react-dom";
    import App from "./staffhub/sh-application/components/App";
    import DateUtils from "sh-application/utility/DateUtils";
    import StringsStore from "sh-strings/store";
    import { loadTheme } from "@uifabric/styling";
    import { preinitApplication } from "sh-application";
    import { initializeIcons } from "@uifabric/icons";
    
    // polyFills for IE11
    require("es6-promise").polyfill();
    require("string.prototype.startswith");
    require("element-closest");
    require("ie-array-find-polyfill");
    require("array.from").shim();
    require("array.prototype.findIndex").shim();
    
  8. added this to the 3.2.0 milestone on Aug 26, 2018
  9. modified the milestones: 3.2.0, 4.0.0 on Feb 21, 2019
  10. alexander-akait commented on May 12, 2020

    @alexander-akait
    Member

    Done for v4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions