The Chinese haven't shared nuclear tech with the DPRK, an explicit PRC ally, whose advancements are instead based on Russian designs. PRC leadership are quite miffed with the North Koreans and view proliferation there as pushing RoK to manufacture weapons as well.
The PRC has been hard against nuclear proliferation as a policy over decades, it is highly compliant with IAEA inspection norms, despite the NPT not making it mandatory to be under those inspections. This policy is not something the US has in the past or will in the future engender into it through force.