Code Monkey home page Code Monkey logo

barrelsby's Introduction

Barrelsby Logo

Automatically create TypeScript barrels for your entire code base.

npm version Node.js CI CodeQL

About Barrels

Barrels are files that rollup exports from several modules into a single convenient module typically named index.ts. They tend to help simplify large blocks of import statements at the top of files and help to group up related functionality.

A barrel file looks like this:

export * from "./DropDown";
export * from "./TextBox";
export * from "./CheckBox";
export * from "./DateTimePicker";
export * from "./Slider";

It can help you go from messy imports like this:

import {DropDown} from "./src/controls/DropDown";
import {TextBox} from "./src/controls/TextBox";
import {CheckBox} from "./src/controls/CheckBox";
import {DateTimePicker} from "./src/controls/DateTimePicker";
import {Slider} from "./src/controls/Slider";

...to something tidier like this:

import {DropDown, TextBox, CheckBox, DateTimePicker, Slider} from "./src/controls";

...or even this:

import * as Controls from "./src/controls/index";

More Reading

Barrelsby Articles

Alternatives

Usage

To install Barrelsby:

npm install --save-dev barrelsby

To run barrelsby first add a script to the package.json file:

{
  "scripts": {
    "generate-barrels": "barrelsby --delete"
  }
}

You can now generate barrels:

npm run generate-barrels

Configuration Options

Barrelsby accepts a number of options to help refine how your barrels are created. These options can be configured from the command line or using a configuration file.

-c [path] or --config [path]

Specifies the location of the barrelsby configuration file. This file must be a .json file. You can include any of the configuration options using their long name.

-d [path...] or --directory [path...]

Specifies a list of root directories where barrels will be created from. Uses the current directory by default.

Note: This is backwards compatible with previous versions. Existing configuration files will be parsed correctly. The following two json files will behave identically.

{
  "directory": "./src"
}

{
  "directory": ["./src"]
}

-D or --delete

Deletes any existing barrels encountered by barrelsby. Disabled by default.

-e [regex...] or --exclude [regex...]

Excludes any files whose paths match any of the specified regular expressions.

-E or --exportDefault

Also export the default export of the file. Currently works only with the flat mode.

export * from "./barrel";
export { default as barrel } from "./barrel";

-F or --fullPathname

exportDefault with full pathname to create distinct name. Currently works only with the flat mode and exportDefault flag.

export * from "./example/of/the/path";
export { default as exampleOfThePath } from "./example/of/the/path";

-h or --help

Displays help information on the command line arguments that barrelsby accepts.

-i [regex...] or --include [regex...]

Only include files whose paths match any of the specified regular expressions.

-l [mode] or --location [mode]

The mode that barrelsby should use to determine where which directories to create barrels in. Defaulted to top.

  • top only creates a barrel in the target directory.
  • below creates a barrel in every directory just below the target directory.
  • all creates a barrel in every directory below (and including) the target directory.
  • replace only creates barrels in directories where one already existed.
  • branch creates a barrel in every directory that contains other directories.

-L or --local

Enable this to prevent barrels including modules that exist in the same directory, rather than recursively searching child directories.

-n [name] or --name [name]

Specifies the name to use for creating new barrels (and identifying old ones). .ts wil be appended if not included in the name. Barrels names will be defaulted to index.ts.

-s [mode] or --structure [mode]

The structure that barrelsby should create inside the barrels. Defaulted to flat.

flat

Exports modules without any nesting.

export * from "./barrel";
export * from "./index";
export * from "./directory2/script";
export * from "./directory2/directory4/deeplyNested";
export * from "./directory3/program";

filesystem

Exports modules as a nested structure that matches the file system directories.

import * as barrelts from "./barrel";
import * as directory2directory4deeplyNestedts from "./directory2/directory4/deeplyNested";
import * as directory2scriptts from "./directory2/script";
import * as directory3programts from "./directory3/program";
import * as indexts from "./index";
export {barrelts as barrel};
export const directory2 = {
  directory4: {
    deeplyNested: directory2directory4deeplyNestedts,
  },
  script: directory2scriptts,
};
export const directory3 = {
  program: directory3programts,
};
export {indexts as index};

-q or --singleQuotes

Use 'single quotes' in the generated barrel files instead of the default "double quotes".

-S or --noSemicolon

Omit semicolons from the end of lines in the generated barrel files.

-H or --noHeader

Omit adding a header comment to the top of the barrel file.

-v or --version

Display the barrelsby version number.

-V or --verbose

Display additional debug information.

Requirements

Requires node v6.0.0 or greater for ES6 syntax.

Contributing

See CONTRIBUTING.md

barrelsby's People

Contributors

aborovsky avatar bencoveney avatar benjamin658 avatar bitforger avatar cmiksche avatar dependabot[bot] avatar greenkeeper[bot] avatar gregaubert avatar markuseckstein avatar mrantix avatar nozzlegear avatar rupeshtiwari avatar sqdk avatar thekarel avatar zigang93 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

barrelsby's Issues

An in-range update of @types/sinon is breaking the build 🚨

The devDependency @types/sinon was updated from 5.0.5 to 5.0.6.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/sinon is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ ci/circleci: Your tests failed on CircleCI (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of rimraf is breaking the build 🚨

The devDependency rimraf was updated from 2.6.2 to 2.6.3.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

rimraf is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ ci/circleci: Your tests failed on CircleCI (Details).

Commits

The new version differs by 6 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Delete Option is Deleting Excluded Files

When using the --delete and --exclude options, index files excluded by the filter are still deleted. It looks like deletes happen before exclusion filters are accounted for.

Here are the relevant lines from the log:

Deleting existing barrel @ D:/SRC/Redacted/portal/src/state/ducks/displayTemplate/index.ts
...
D:/SRC/Redacted/portal/src/state/ducks/displayTemplate/index.ts is excluded by /.*\.d\.ts|.*\/ducks\/.*\/.*/

Errors running tests on windows

Hi Ben

I forked the repo to have a look at ignoring empty barrels, but I get an error running the tests on Windows

'info lifecycle [email protected]~test: Failed to exec test script'

looks like a problem spawning a process - not sure

anyhoo, running npm update fixes this and gets rid of a vulnerability warning in brace-expansion (https://nodesecurity.io/advisories/338)

these are the resulting changes

https://github.com/MrAntix/barrelsby/commit/573a062a23e562981f3fa371af338fc79ddefd96

Are you happy for me to PR the update? Ant

An in-range update of @types/mocha is breaking the build 🚨

Version 2.2.41 of @types/mocha just got published.

Branch Build failing 🚨
Dependency @types/mocha
Current Version 2.2.40
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As @types/mocha is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details - ❌ **ci/circleci** Your tests failed on CircleCI [Details](https://circleci.com/gh/bencoveney/barrelsby/43?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link)

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Barrels for empty directories

Barrelsby could potentially encounter a scenario where it is trying to create a barrel for a directory that doesn't contain any modules (either it is empty or it is only contains non-typescript files).

When this happens what is the best thing to do? Should we create an empty barrel or not create a barrel at all?

If there are valid reasons for both then perhaps this behavior should be controllable via a config option.

An in-range update of sinon is breaking the build 🚨

Version 2.2.0 of sinon just got published.

Branch Build failing 🚨
Dependency sinon
Current Version 2.1.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As sinon is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details - ❌ **ci/circleci** Your tests failed on CircleCI [Details](https://circleci.com/gh/bencoveney/barrelsby/53?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link)

Commits

The new version differs by 40 commits0.

  • f7ff840 Update docs/changelog.md and set new release id in docs/_config.yml
  • 59a7a34 Add release documentation for v2.2.0
  • 37676e8 2.2.0
  • b35d217 Update Changelog.txt and AUTHORS for new release
  • 0127365 Merge pull request #1363 from greena13/master
  • 4fe0a73 Flatten structure of getWindowLocation()
  • 38e3ec4 Fix matchers.md in v1.17.6 and v1.17.7 releases. (#1379)
  • 3d4bc16 Merge pull request #1364 from blacksun1/add-custom-promise
  • 7ac4f60 Fixes for pull request comments
  • 25bfde0 Added docs for usingPromise
  • 0a3518f Added usingPromise method to sandbox.
  • 17edad7 Added usingPromise method to stub.
  • c5bc9ab Merge pull request #1359 from kevincennis/kce/fix-1066
  • c633202 Merge pull request #1320 from ashirley/master
  • 17c2639 Merge pull request #1366 from GProst/master

There are 40 commits in total.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of tslint is breaking the build 🚨

Version 5.5.0 of tslint just got published.

Branch Build failing 🚨
Dependency tslint
Current Version 5.4.3
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As tslint is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • ❌ ci/circleci Your tests failed on CircleCI Details

Release Notes v5.5.0

Editor's note: This release features an important bugfix for overlapping fixes when using --project and --fix (#2864).

πŸŽ‰ New rules and options

πŸ›  Bugfixes & enhancements

Thanks to our contributors!

  • Klaus Meinhardt
  • Josh Goldberg
  • Petr Kosikhin
  • Pablo NΓΊΓ±ez
  • Benny Neugebauer
  • Radon Rosborough
  • reduckted
  • Chris Barr
  • Julian Verdurmen
Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Include/exclude files earlier in the process

Currently the barrelsby code loads information about all files it sees in the directories. This is built into a model and then passed through the entire application. This could be tidied up by applying the checks earlier in the process to see if a file is typescript, included or excluded.

Child Dir Barrel Generation

Hi,

Is there a way to generate child directory barrels and have the parent directory export from the child barrel? Rather than mentioning all the exports in the main directory barrel.

Example

src/app/shared contains directories services and enums. Run barrelsby on src/app/shared and have it recursively generate barrels from bottom-up. So, this would generate barrel for src/app/shared/services then src/app/shared/ barrel will just be a:

export * from './services';

While the child barrel (src/app/shared/services/index.ts) will contain all the individual exports like:

export * from './logger.service';
export * from './state.service';

Awesome job with the project πŸ‘ .

Thanks

Allow custom builders

Maybe quite a large undertaking...

There are currently 2 different barrel builders and adding alternate ones requires changes to the Barrelsby library. This would be a problem for anyone using different linting rules or coding styles.

It would be good to allow people to specify their own barrel building logic similar to how tslint allows you to specify custom formatters.

I think this would require the following:

  • Work out the interface for a builder function (for example input parameters and output format)
  • Port existing barrels to implement the new builder interface
  • Add a config option to allow the custom builder to be specified (via a path?)
  • Add documentation on how to create a builder function
  • Ensure all utility functions used by the current builders are bundled up nicely so that people can reuse them easily

Support baseUrl tsconfig option

Currently all barrel files use relative import paths.

If someone is using the baseUrl tsconfig option they may want their barrel files to have absolute-style import paths. We should allow an equivalent setting and eventually be able to infer it by looking at a tsconfig file.

--delete barrels by default

See discussion in #34 related to the --delete flag.

For most users it makes sense to be running with --delete most of the time.

This is not enabled by default because I was not sure about user accidentally overwriting a file accidentally. #15 could make this safer.

An in-range update of @types/yargs is breaking the build 🚨

The dependency @types/yargs was updated from 12.0.2 to 12.0.3.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/yargs is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ ci/circleci: Your tests failed on CircleCI (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Bad line ending breaks barrelsby usage when running on Linux.

Hey, I've been having this problem for a while. barrelsby will break any build process that uses it on Linux due to bad line endings on #! /usr/bin/env node in barrelsby/bin/index.js:

image

I can get around this by installing the dos2unix on my Linux distro, which takes a file and converts its line endings to a unix format. After installing that I can run dos2unix node_modules/barrelsby/bin/index.js before running barrelsby, which fixes the problem but it'd be better if it was fixed in the package itself.

Deletes unrelated index.ts files

Hi there,

thanks for barrelsby!

I run it like the following:

barrelsby --delete --exclude 'node_modules|dist'

This works. But if I had an unrelated index.ts file with application-level code, e.g. in src/models/index.ts, it will get deleted.

Is is a known issue?

I guess that a workaround could be renaming the affected file.

Victor

How do I use?

Hey!

This tool looks really interesting, however I am bad at Node JS stuff so I don't exactly know how to use it. I have a large Angular 4 project and I don't really understand why there isn't some way to automatically generate index.ts files for specific directories? Maybe I could use this tool somehow to sweep the project and create these for me.

Use directory names as barrel names

Possibly someone might want to have the barrels names after the directory they live in, for example form/controls/controls.ts rather than form/controls/index.ts

If this flag is enabled then should the name option be used for the root barrel or in cases where there is no resolvable directory name?

Add ability to specify multiple directories

I've recently run into a use case where it could be great to be able to specify multiple directories to apply a barrel pattern for, and I'd like to get your input on this.

Let's say I have the following directory structure:

helpers/
  ...
src/
  components/
    collections/
    containers/
    layouts/
    models/
barrelsby.json

The two primary candidates are helpers/ and src/components/. In fact, I might go as far as to only barrel the subdirectories of components/ for import clarity. What I mean by this, is that I want to be clear that I'll be importing { Header } from components/containers instead of just at components/.

Would you then suggest using multiple scripts with multiple barrelsby.json files, or would it be possible to add the ability to specify multiple directories?

I could use the below option, but it will not generate an index.ts for each successive subdirectory, so I've chosen to use all in order to obtain the benefit of having those nested index files be generated for me. However, I now have a topmost-level index.ts that I don't necessarily want there.

Include/exclude using comment in file

Rather than using the include/exclude options someone may want to identify files that should/shouldn't be included by marking them with a header at the top of the file. This is along the lines of tools like istanbul and tslint that allow checks to be disabled using a comment.

Should this be a predetermined string? I am not sure of any use cases where someone would need to use their own format.

I assume as well that users could have some other restriction on the content of the first line in the file so perhaps it should be looked for anywhere within the file.

Watch Mode

Add the ability to have Barrelsby run in watch mode. Should be possible to enable this using a -w or --watch command line flag. Barrelsby should watch for any file changes and re-run to generate the barrel files again. There are many "watch" node modules that could be utilized to accomplish this.

1.0 release?

Hello,

Is this software production-ready? For my use case it seems to be working perfectly. Our department standards prohibit me from using software that's not at least 1.0. Do you feel like this software is stable and bug-free, and if so will you release it as 1.0.0?

Thanks,
froodley

An in-range update of @types/sinon-chai is breaking the build 🚨

The devDependency @types/sinon-chai was updated from 3.2.0 to 3.2.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/sinon-chai is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ ci/circleci: Your tests failed on CircleCI (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of dir-compare is breaking the build 🚨

The devDependency dir-compare was updated from 1.5.1 to 1.5.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

dir-compare is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ ci/circleci: Your tests failed on CircleCI (Details).

Commits

The new version differs by 3 commits.

  • 3adafdf v1.5.2
  • 191c217 Add option to ignore line endings and white space differences #10
  • 9b04500 Add codecov badge

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of sinon-chai is breaking the build 🚨

Version 2.10.0 of sinon-chai just got published.

Branch Build failing 🚨
Dependency sinon-chai
Current Version 2.9.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As sinon-chai is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details - ❌ **ci/circleci** Your tests failed on CircleCI [Details](https://circleci.com/gh/bencoveney/barrelsby/50?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link)

Release Notes 2.10.0

Added the calledImmediatelyBefore() and calledImmediatelyAfter() asserters.

Commits

The new version differs by 3 commits0.

  • 9aa5a73 Version 2.10.0
  • 4d32c50 Add a test showing that #94 is not a problem
  • f0628a1 Add calledImmediatelyBefore/calledImmediatelyAfter

false

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Install fails (npm install barrelsby).

Installing this module via NPM fails.

MacBook-Pro:plo-canvas user$ npm install barrelsby
npm ERR! Darwin 16.5.0
npm ERR! argv "/usr/local/Cellar/node/7.10.0/bin/node" "/usr/local/bin/npm" "install" "barrelsby"
npm ERR! node v7.10.0
npm ERR! npm  v4.2.0
npm ERR! path /Users/user/Developer/project/node_modules/barrelsby/bin/index.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/user/Developer/project/node_modules/barrelsby/bin/index.js'
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/user/Developer/project/node_modules/barrelsby/bin/index.js'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.

I don't know for sure, but from what I've gathered, NPM is using your .gitignore file as the .npmignore file. You should use a separate .npmignore file.

An in-range update of @types/sinon is breaking the build 🚨

The devDependency @types/sinon was updated from 7.0.2 to 7.0.3.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/sinon is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ ci/circleci: Your tests failed on CircleCI (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @types/chai is breaking the build 🚨

Version 3.5.2 of @types/chai just got published.

Branch Build failing 🚨
Dependency @types/chai
Current Version 3.5.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As @types/chai is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details - ❌ **ci/circleci** Your tests failed on CircleCI [Details](https://circleci.com/gh/bencoveney/barrelsby/45?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link)

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of mocha is breaking the build 🚨

Version 3.3.0 of mocha just got published.

Branch Build failing 🚨
Dependency mocha
Current Version 3.2.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As mocha is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details - ❌ **ci/circleci** Your tests failed on CircleCI [Details](https://circleci.com/gh/bencoveney/barrelsby/35?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link)

Release Notes coverave

Thanks to all our contributors, maintainers, sponsors, and users! ❀️

As highlights:

  • We've got coverage now!
  • Testing is looking less flaky \o/.
  • No more nitpicking about "mocha.js" build on PRs.

πŸŽ‰ Enhancements

  • #2659: Adds support for loading reporter from an absolute or relative path (@sul4bh)
  • #2769: Support --inspect-brk on command-line (@igwejk)

πŸ› Fixes

  • #2662: Replace unicode chars w/ hex codes in HTML reporter (@rotemdan)

πŸ” Coverage

πŸ”© Other

Commits

The new version differs by 89 commits0.

  • fb1687e :ship: Release v3.3.0
  • 1943e02 Add Changelog for v3.3.0
  • 861e968 Refactor literal play-icon hex code to a var
  • 1d3c5bc Fix typo in karma.conf.js
  • 9bd9389 Fix spec paths in test HTML files
  • 0a93024 Adds tests for loading reporters w/ relative/absolute paths (#2773)
  • 73929ad Comment special treatment of '+' in URL query parsing
  • e2c9514 Merge pull request #2769 from igwejk/support_inspect_break_in_opts
  • 038c636 Support --inspect-brk on command-line
  • b4ebabd Merge pull request #2727 from lamby/reproducible-build
  • 882347b Please make the build reproducible.
  • a2fc76c Merge pull request #2703 from seppevs/cover_utils_some_fn_with_tests
  • ed61cd0 cover .some() function in utils.js with tests
  • f42cbf4 Merge pull request #2701 from craigtaub/landingSpec
  • 6065242 use stubbed symbol

There are 89 commits in total.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of @types/sinon is breaking the build 🚨

Version 2.1.3 of @types/sinon just got published.

Branch Build failing 🚨
Dependency @types/sinon
Current Version 2.1.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As @types/sinon is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details - ❌ **ci/circleci** Your tests failed on CircleCI [Details](https://circleci.com/gh/bencoveney/barrelsby/37?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link)

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of @types/node is breaking the build 🚨

Version 7.0.14 of @types/node just got published.

Branch Build failing 🚨
Dependency @types/node
Current Version 7.0.13
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As @types/node is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details - ❌ **ci/circleci** Your tests failed on CircleCI [Details](https://circleci.com/gh/bencoveney/barrelsby/39?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link)

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Configurable path separator

Currently barrelsby only uses unix-style separators in any paths in barrel files.

Is there any benefit to allowing the separator style to be configured?

Possible options:

  • Unix style
  • Windows style
  • Observe current OS (would create inconsistent results)

Barrelsby as an plugin/extension to the TypeScript compiler's module resolution

There are a couple of aspects of Barrelsby that I think could be improved by the ability to hook into they TypeScript compiler's module resolution.

  • Generating lots of barrels can help simplify your real code but contribute some level of noise to the codebase.
  • There may be a delay while barrelsby includes new .ts files before the TypeScript compiler can start compiling them as part of your application.

It would be great if we could hook into the TypeScript compiler's module resolution so that:

  • The barrel files could be "virtual" and not exist on disk.
  • There is no delay for the TypeScript compiler in accessing barrels or the files they contain.

Potentially this could be achieved using one of the following methods:

Distributing an extended TypeScript compiler may come with its own issues:

  • Keeping up with TypeScript's release schedule so that Barrelsby users get new TypeScript versions.
  • Not all build tools for TypeScript compilation may allow use of a custom TypeScript compiler.
  • Our extended compiler may prevent people using a TypeScript compiler extend in other ways.

Load settings from tsconfig file

Some settings in tsconfig files map across to Barrelsby settings:

  • Include
  • Exclude
  • Potentially baseUrl from #18

It would be good to allow a --project option or similar. This would allow people to include the options from the tsconfig file and avoid settings duplication in the barrelsby config file.

Add a header to barrel files

Barrelsby should identify the files it has created. This will help inform users, and also allow barrelsby to more safely delete barrel files.

An in-range update of mock-fs is breaking the build 🚨

Version 4.7.0 of mock-fs was just published.

Branch Build failing 🚨
Dependency mock-fs
Current Version 4.6.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

mock-fs is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ ci/circleci: Your tests failed on CircleCI (Details).

Commits

The new version differs by 15 commits.

  • 8f84cc7 4.7.0
  • c463fde Log changes
  • 7c224b0 Merge pull request #252 from tschaub/updates
  • 5e68c29 Merge pull request #247 from tricoder42/patch-1
  • f54a322 Merge pull request #249 from maxwellgerber/fix/buffer-copy
  • 15df910 Remove dev dependency on minimatch
  • b81c39b Merge pull request #251 from maxwellgerber/fix/dirent-patch
  • 38ca5db binding.readdir can take anywhere from 2 to 4 arguments
  • 29f82dc Add tests for reading and writing using Uint8Array
  • a90b7ac docs: add note about snapshot testing
  • 28d65a7 Remove redundant check
  • 076fca8 Merge pull request #242 from maxwellgerber/patch/open-directory-error
  • f8e4eb6 add tests
  • e363112 Limit package contents
  • b3e86cb Throw error when a directory is opened

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

camelCase alias builder

Would you accept a PR for a new builder that aliases the exports by the camelCase name of the file?

export * as camelCaseModule from './components/directory/camel-case-module';

An in-range update of mock-fs is breaking the build 🚨

Version 4.3.0 of mock-fs just got published.

Branch Build failing 🚨
Dependency mock-fs
Current Version 4.2.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As mock-fs is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details - ❌ **ci/circleci** Your tests failed on CircleCI [Details](https://circleci.com/gh/bencoveney/barrelsby/48?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link)

Commits

The new version differs by 4 commits0.

false

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of typescript is breaking the build 🚨

Version 2.3.1 of typescript just got published.

Branch Build failing 🚨
Dependency typescript
Current Version 2.3.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As typescript is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details - ❌ **ci/circleci** Your tests failed on CircleCI [Details](https://circleci.com/gh/bencoveney/barrelsby/41?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link)

Release Notes TypeScript 2.3

For release notes, check out the release announcement

For new features, check out the What's new in TypeScript 2.3.

For breaking changes, check out the Breaking changes in TypeScript 2.3 page.

For the complete list of fixed issues, check out the issues fixed in TypeScript 2.3 RC and after TypeScript 2.3 RC.

Download:

Special thanks to all contributors to this release:

  • Akinmade Bond
  • Anders Hejlsberg
  • Andy Hanson
  • Argelius Andreas
  • @arjunyel
  • Artem Roshko
  • Arthur Ozga
  • Bill Ticehurst
  • Christian Silver
  • Christophe Vidal
  • @cedvdb
  • Daniel Lehenbauer
  • Daniel Rosenwasser
  • Diullei Gomes
  • @e-cloud
  • Erik McClenney
  • @falsandtru
  • Hendrik Liebau
  • Herrington Darkholme
  • Igor Novozhilov
  • James Henry
  • Jason Jarrett
  • Jason Ramsay
  • Josh Goldberg
  • K. Preißer
  • Kagami Sascha Rosylight
  • Kanchalai Tanglertsampan
  • Klaus Meinhardt
  • Logan Mzz
  • Magnus Hiie
  • Matt Bierner
  • Matt McCutchen
  • Mike Busyrev
  • Mine Starks
  • Mohamed Hegazy
  • Natalie Coley
  • Nathan Shively-Sanders
  • Nico Kemnitz
  • Nicolas Henry
  • Oleg Mihailik
  • Ron Buckton
  • Ryan Cavanaugh
  • Soo Jae Hwang
  • Tuure Savuoja
  • Vadi Taslim
  • Vincent Bel
  • Vladimir Matveev
  • Zhengbo Li
Commits

The new version differs by 346 commits0.

  • 47e5569 Update LKG
  • 9ada915 Merge pull request #15381 from Microsoft/revert15104
  • fe0a307 Revert "Treat callback parameters as strictly covariant"
  • 96a3c91 Revert "Fix callback types to match covariantly"
  • 70bb2d3 Revert "Accept new baselines"
  • 3abd0c8 Revert "Add tests"
  • 42d6a9c Revert "Check callback return values bi-variantly"
  • d581bed Revert "Accept new baselines"
  • cf17be2 Revert "Add another test case"
  • e86512e Revert "Allow callbacks unioned with null and/or undefined"
  • 22647bb Revert "Update tests"
  • 8a85f4a Update LKG
  • 3c3b73e Merge branch 'master' into release-2.3
  • a0abadb Merge pull request #15320 from Microsoft/fixTypePredicateThisParameter
  • 5783435 Merge pull request #15330 from gcnew/exportConsts

There are 250 commits in total.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of @types/node is breaking the build 🚨

Version 8.0.18 of @types/node just got published.

Branch Build failing 🚨
Dependency @types/node
Current Version 8.0.17
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As @types/node is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • ❌ ci/circleci Your tests failed on CircleCI Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of @types/node is breaking the build 🚨

The devDependency @types/node was updated from 10.11.0 to 10.11.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ ci/circleci: Your tests failed on CircleCI (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Ensure .tsx files are supported

Haven't used these personally so am unsure if barrelsby will be compatible with them at this stage.

If barrelsby doesn't work with the .tsx files then that will need to be resolved first. Additional we should add .tsx files to the unit tests and documentation once it is definitely supported.

default exports are not exported

// library.ts
export default class DummyClass {

}

barrelsby generates the following

// index.ts
export * from './library';

Problem is that default export from library.ts is not available through index.ts.

It should generate this if think.

// index.ts
export * from './library';
import librarydefault from './library';
export default librarydefault 

Of course, it'll cause problem if multiple modules have default exports, but anyway it's up to the developer to take care of this, as it's up to him to avoid duplicate names in the whole project.

Maybe we could implement some magic comment like the following ?

// library.ts
export default /** @barrelsby:default */ class DummyClass {

}

Then this class would be exported as default in index.ts file.

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.