Transforming covalent organic framework into thin-film composite membranes for hydrocarbon recovery